Using PDFCreator under Visual Foxpro - PDFCreator becomes disabled (how to prevent)

(Question posted in behalf of user)

I have been using PDF Creator version 1.7.3 from my VFP application to create .pdf files from within the application, without the need for user dialog. I create a PDFCreator object, modify its properties, broadly as follows :

oPDFC = CREATEOBJECT(“PDFCreator.clsPDFCreator”,”pdfcreator”)
oPDFC.cOption(”UseAutosave”) = 1
. . . .
. . . .
oPDFC.cOption(“AutosaveFileName”) = m.lcFileName

This has generally worked, thank you. However I am experiencing a problem; If my program fails (no doubt because of my own errors), I am finding that the PDFCreator becomes disabled even for applications like Microsoft Word. It still exists as a printer (under Windows 7), and can be selected, but printing to this PDFCreator printer no longer has any effect: the File | Print command goes through all the motions, and Word thinks it has done its work, but no dialog (to select the output filename) is displayed.

The only way to resolve the problem is to un-install PDF Creator and to re-install it. I have done this several times. I accept the responsibility of correcting my own errors, but feel that it is unfortunate that PDFCreator is then disabled for other applications like Word and Excel.

Does anyone know why this should be happening? And is there any way of re-enabling the PDF Creator printer when I have accidentally disabled it.

In an attempt to resolve the problem I have tried installing version 2.1 of PDFCreator. However my VFP application then fails at first base : the CREATEOBJECT() function returns the error :

Class definition PDFCreator.clsPDFCreator not found

I would like to know what sequence of commands I can use to generate a .pdf file from version 2.1 of PFCreator.

Thank you. 

Hi there!

The class name is different with 2.0.

Try this: 

loPDFCreator = CREATEOBJECT(“PDFCreatorBeta.PDFCreator”)
loJobQueue = CREATEOBJECT(“PDFCreatorBeta.JobQueue”)

You’ll find the COM reference helpful:

Good luck!