Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: Programatically convert a document through ePrint API
Started by Nephilim2612 at 09-19-2007 11:38. Topic has 1 replies.

Print Search « Previous Thread Next Thread »
  09-19-2007, 11:38
Nephilim2612 is not online. Last active: 11/2/2007 3:24:45 PM Nephilim2612

Top 500 Posts
Joined on 06-19-2007
Posts 12
Programatically convert a document through ePrint API
Reply Quote
Hello,

After searching through the forums i've not found an answer for the question i'm writing below.

I have to build a simple application (VB.Net, Visual Studio 2005, .NET Framework 2.0) using the ePrint API/COM in order to convert a DOC file to PDF through a Task Printer. This simple application will be helpful in order to decide whether to deliver or not a prototype for a possible client. Till here, all ok, i can even add a new task printer without nearly any difficulty.

The point is that, until now, i thought it was possible to, at some point, "give" the path to the document to convert to the ePrint API/COM and, thus, it(ePrint) should use or "take" the native application of the document and make the whole process or open the file and convert it to the destination format. But actually i have not been able to find the right place to do that. I thought that place was the parameter "DocName" of the EPrint.StartDoc method, but it seems to be rather the print job's name..

My first question is: whenever i want to programatically convert a file from one format to another by using ePrint API, must i manage the native application of the source file so i open the document and "order" that API to print it out to the desired task printer? Or is there a way to tell the ePrint API/COM: "ok, this is the path of the source document and this is the task printer i want to use, do it, please"?

My second question is: if the answer to the first question is "you should deal with the source doc's native app API", how do i programatically manage the JobInfo events then in order to, f.e, detecting when a print job has finished? Should i write the code dealing with Word, for example, between the StartDoc and EndDoc calls? (i've tried to do that but i still don't catch the events, even if i've set the EnableJobInfo property of ePrint to 'true')

Thank you very much
   Report 
  09-20-2007, 6:35
Qasem Lubani is not online. Last active: 11/9/2008 3:40:25 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,135
Re: Programatically convert a document through ePrint API
Reply Quote

Currently only a C++ demo is shipped with the ePrint API that shows how to do such document conversions. The demo uses the DLL API functions rather than the COM interface.

The basic idea is to call the ePrint.StartDocumentConversion() function, then invoke the source document's native application to perform printing, then call the ePrint.EndDocumentConversion() function.

 

One way of invoking printing is using this Windows API function call:

ShellExecute(0, "print", "source.DOC", PrinterName, NULL, SW_SHOWMINIMIZED)

There are also other similar functions in other environments.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
Post
LEAD Support Fo... » Developer » ePrint API » Re: Programatically convert a document through ePrint API

Powered by Community Server, by Telligent Systems