COM interface and unwanted print dialog


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?


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

 Having the same problem here:


Also seeing that cClose hangs pdfcreator reliably.


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

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.

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.

 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)});




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

Try out the com function cPrintURL.

>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.

Hi Sandos,

Thanks very much for your idea.

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

The options have to be saved, or they won't take effect.


    With pdfCreator
        If .cStart("/NoProcessingAtStartup") = False Then
            MsgBox "Can't initialize PDFCreator.", vbCritical + _
                vbOKOnly, "Error!"
            Exit Sub
        End If
        .cOption("UseAutosave") = 1
        .cOption("UseAutosaveDirectory") = 1
        .cOption("AutosaveFormat") = 0 '0 = PDF
        .cSaveOptions .cOptions, "default"
    End With