[PDF Converter] How to convert as a service = silentmode

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
pmeems
Posts: 11
Joined: Mon Jul 23 2007
Location: The Netherlands

[PDF Converter] How to convert as a service = silentmode

Post by pmeems »

I'm using PDF Converter to convert my MS Word documents to pdf.
I've got the C# code working. I'm using

Code: Select all

cdiNet.BatchConvert(filename);
to do the job, but this pops up MS Word.
When I want to run my code as a windows service or as a sceduled task without logging in as a human it doesn't work because the desktop isn't available.

I've tried to first open the document in Word (using automation af course) and next use the printout of Word but now I get an error:

Code: Select all

Printer not activated, error code -30
So this approach isn't working either.

How should I use the pdf Converter to convert a doc file to a pdf without the need to be logged on.

Thanks
Paul
pmeems
Posts: 11
Joined: Mon Jul 23 2007
Location: The Netherlands

Catch events

Post by pmeems »

This problem is solved now after a day of Trail&Error.
I open the document in my previously created MS Word instance and do a printOut

I now only need to know when the page is finished printing so I can close the document. Currently I use a sleep() but I don't like that.

So if somebody has some C# sample code I would really appreciate it.

Thanks
Paul
Post Reply