Pdfcreator class definition VFP

creating an object using this command "Createobject("PDFCreator.clsPDFCreator","pdfcreator")" produces an err of Class not found. The error is generated when executing this code block:
lcOldPrinter = SET("printer",2)
oPDFC = Createobject("PDFCreator.clsPDFCreator","pdfcreator")
oPDFC.cStart("/NoProcessingAtStartup")
oPDFC.cOption("UseAutosave") = 1
oPDFC.cOption("UseAutosaveDirectory") = 1
oPDFC.cOption("AutosaveFormat") = 0
DefaultPrinter = oPDFC.cDefaultprinter
oPDFC.cDefaultprinter = "pdfcreator"
oPDFC.cClearCache
ReadyState = 0
oPDFC.cOption("AutosaveFilename") = "myPdf"
oPDFC.cOption("AutosaveDirectory") = "c:\temp"
oPDFC.cprinterstop=.F.
Report Form c:\test.frx To Printer
INKEY(5)
Set Printer To Name (lcoldPrinter)
oPDFC.cDefaultprinter = DefaultPrinter
oPDFC.cClearCache
Release oPDF
Where is the class definition stored by the Pdfcreator install.?

Hi,

the above code is outdated, please have a look at the docs for the current releases:
https://docs.pdfforge.org/pdfcreator/3.5/en/pdfcreator/com-interface/

Best regards

Robin

Is there anew sample available that is not obsolete? I have looked at the docs but not found any documentation that points me in the right direction; perhaps if nothing new is available youcould point me to helpful document sections?

Hi,

if you already installed PDFCreator, you can find examples for different kinds of coding languages inside the "COM Scripts" folder in your PDFCreator installation path.

Best regards

Robin

Im looking for a VFP sample. VFP is too old to be included in a sample scripts but maybe a usable sample exists somewhere

Hi,

I found this: Printing a report from MS Visual Foxpro as pdf file
It uses the new COM interface and was marked as solution by another user, so I hope it will work.

Best regards

Robin