Setup pdf filename in runtime

Hello all,


I have an application, that following some parameters changes the default Windows printer to PDFCreator and then send a file to be transformed to pdf.

The files are automatically generated and created in the configured folder.
My problem is with the name of the file.
It is created as .pdf as configured but I’d like to be able to set this filename in runtime with some values that are in the file.

Is possible to send the filename as parameter or to have it assume the name of the original file that is beeing converted?

Hi,


yes you can use the COM interface for this.
It will require some custom script though.
http://www.pdfforge.org/content/com-interface

regards,

Robin

Hello

I`ve got the same problem,i was reading the documentation to set the defaultfilename as
the original file, but i couldn´t,
please;
maybe could you write a code example, or just some help,?, please

i´ve got this working:

 With obj_PDF
        .cOption(“UseAutosave”) = 1
        .cOption(“UseAutosaveDirectory”) = 1
        .cOption(“AutosaveFilename”) = DocumentTitle '<-- WHAT MUST I PUT HERE?
        .cOption(“AutosaveDirectory”) = str_ruta
        DefaultPrinter = .cDefaultPrinter
        .cDefaultPrinter = “PDFCreator”
        .cClearCache
        .cPrinterStop = 0


Thank you very much.

Hi,


best have a look at the example Convert2PDF located in PDFCreator\COM\Windows Scripting Host\VBScripts.

regards,

Robin

Hi there,

The new version 2.2 does not have the PDFCreator\COM\Windows Scripting Host\VBScripts file.
Is there any script in version 2.2 that replaces this file or that has the same funcionalities?

Thanks!