en de fr

Submitted by adv on 31 August, 2009 - 08:10


I'm using COM interface for trying to convert a HTML file into a PDF file. My code is copied from the sample code provided with PDFCreator. Unfortunately when calling:


a print dialog appear.

Do you have any hints?


 >a print dialog appear.This

 >a print dialog appear.
This is the IE print dialog.

Try out the com function cPrintURL.

 What I do (from Java using

 What I do (from Java using Jacob) is to actuallt write all the autosave-settings to the registry before starting pdfcreator, and that works well enough, something like this:


    private static void configureSettingsHack(String baseDir, String outputFilename)


        ActiveXComponent wsh = new ActiveXComponent("WScript.Shell");


        wsh.invoke("RegWrite", new Variant[]{ new Variant("HKEY_CURRENT_USER\\Software\\PDFCreator\\Program\\UseAutosave"), new Variant(1)});

        wsh.invoke("RegWrite", new Variant[]{ new Variant("HKEY_CURRENT_USER\\Software\\PDFCreator\\Program\\UseAutosaveDirectory"), new Variant(1)});

        wsh.invoke("RegWrite", new Variant[]{ new Variant("HKEY_CURRENT_USER\\Software\\PDFCreator\\Program\\AutosaveDirectory"), new Variant(baseDir)});

        wsh.invoke("RegWrite", new Variant[]{ new Variant("HKEY_CURRENT_USER\\Software\\PDFCreator\\Program\\AutosaveFilename"), new Variant(outputFilename)});

        wsh.invoke("RegWrite", new Variant[]{ new Variant("HKEY_CURRENT_USER\\Software\\PDFCreator\\Program\\AutosaveFormat"), new Variant(0)});




Re:  What I do (from Java using

Hi Sandos,

Thanks very much for your idea.

Agter hours testing the "COM interface" your solution seems to work.

As for the problem with

As for the problem with cClose causing PDFCreator to crash - I posted a solution in the forums a few weeks ago, but unfortunately it was lost in the forum update.  I will see if I can figure out what I discovered was the cause and post it in Sourceforge.

I´m trying to use the

I´m trying to use the WebBrowser component (C# or VB), in my case C#, to navigate across the html temp file created in runtime and print to pdf from it. Obviously, setting AutoSaveDirectory property.

Plz, I'm having the same


I'm having the same problem. There seems no way to disable the print dialog/prompt.

I'm getting the same problem

I'm getting the same problem and I've tried the .ShowOptionsDialog(False), but the dialog is displayed anyway.

>I'm getting the same problem

>I'm getting the same problem and I've tried the
>.ShowOptionsDialog(False), but the dialog is displayed anyway.

Please describe exactly what you want. You can't disable the options dialog with this function. If you want disable the options you have to set a reg value.

 Having the same problem

 Having the same problem here: https://sourceforge.net/tracker/?func=detail&aid=2793247&group_id=57796&atid=485457


Also seeing that cClose hangs pdfcreator reliably.