en de fr
Forum

COM interface and unwanted print dialog

9 Antworten [Letzter Beitrag]
adv
Offline
Beigetreten: 08/31/2009

Hello,

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:

clsPDFCreator->cPrintFile(strIn);

a print dialog appear.

Do you have any hints?

Thanks

Naegle
Offline
Beigetreten: 08/31/2009

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

sandos
Offline
Beigetreten: 09/10/2009

 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.

cappa
Offline
Beigetreten: 09/14/2009

Plz,

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

IcaroCamelo
Offline
Beigetreten: 09/16/2009

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.

wolfpackmars2
Offline
Beigetreten: 07/23/2009

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.

sandos
Offline
Beigetreten: 09/10/2009

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

    }

 

 

Frank
Bild von Frank
Offline
DeveloperTranslator
Beigetreten: 05/05/2006

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

Try out the com function cPrintURL.

__________________

Frank Team pdfforge

Frank
Bild von Frank
Offline
DeveloperTranslator
Beigetreten: 05/05/2006

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

__________________

Frank Team pdfforge

GuillermoSp
Bild von GuillermoSp
Offline
Beigetreten: 02/23/2010

Hi Sandos,

Thanks very much for your idea.

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

__________________

 


Guillermo
Madrid, Spain