en de fr
Forum

how to escape the print dialog

5 replies [Dernier message]
marito
offline
Inscription: 10/27/2009

Is possible to print using pdfcreator without the print dialog? Using the pdfcreator with a web application.

thanks

Frank
Frank's picture
offline
DeveloperTranslator
Inscription: 05/05/2006

AutoSave mode

com interface

__________________

Frank Team pdfforge

eengel821
offline
Inscription: 01/06/2010

Hello,

I'm having some issues trying to do the same thing.  I can see how to set the auto save options for the PDFCreator, but I can't seem to figure out how to associate that with the print command.  When I do the following, the print dialog still shows, and the filename is still the default.  I imagine this is a simple problem.

Dim _PDFCreator as PDFCreator.clsPDFCreator

Dim pd as New PrintDocument

pd.PrinterSettings.PrinterName = "PDFCreator"

_PDFCreator.cOptions.UseAutosave = 1

_PDFCreator.cOptions.UseAutosaveDirectory = 1

_PDFCreator.cOptions.AutosaveDirectory = "C:\Temp"

_PDFCreator.cOptions.AutosaveFilename = "test"

_PDFCreator.cOptions.AutosaveFormat = 0

pd.Print()

 

eengel821
offline
Inscription: 01/06/2010

Ok so I found that the intellisense in VB for PDFCreator is no good, however this is only part of the problem.  What I have now is:

Dim _PDFCreator as PDFCreator.clsPDFCreator

 

Dim pd as New PrintDocument

 

pd.PrinterSettings.PrinterName = "PDFCreator"

 

_PDFCreator.cOption("UseAutosave") = 1

 

_PDFCreator.cOption("UseAutosaveDirectory") = 1

 

_PDFCreator.cOption("AutosaveDirectory") = "C:\Temp"

 

_PDFCreator.cOption("AutosaveFilename") = "test"

 

_PDFCreator.cOption("AutosaveFormat") = 0

 

pd.Print()

GuillermoSp
GuillermoSp's picture
offline
Inscription: 02/23/2010

I'am using com interface, but not luck, PDFCreator is showing the dialog whre asking for Title,Author,Subject and so on.

of course I've the cOption changed but there is a lot of other properties.

I've used also a way based in your sample1 example, thus change properties in the opt "object" and then apply using Set .cOptions = opt.

Thanks very much for heariung.

btw, using 0.9.9 with vb6

UPDATE:
Thanks to an post created by "Sandos" I'm in the good "old" way.
The "COM interface" have some error but in fact it seems that these "COM interface" is mainly (at least for the autosave thing) an wrapper of write registry API, so it is really easy change the values directly in the registry.
for this concrete affair, changing registry values works.
of course this will be only the surface, but nice for the very first steps.

 

 

 

__________________

 


Guillermo
Madrid, Spain

David.camaleon
offline
Inscription: 01/27/2012

Hi Guillermo,

I'm actually working with COM interface in Delphi 5.0 and I'm having some problems. So I like  to know how can I work with the PDFCreatror's keys registry values.