Inconsinstent COM object behavior

PFDCreator 1.7.3 under Windows 2003-32bit.

I have a VB6 application which parses a folder and inside a loop, all crystal reports in the folder are loaded and printed to PDF creator. The behavior is not consistent though. The first two reports are printed just fine. After that, problems start.

The process opens PDFCreator, sets some options (Autosave and AutoSaveDir mainly) and then prints the report. In the third report though (and in some reports after that) the Options window pops up, even though it shouldn’t.

The following options are being set:
    PDFCreatorOptsNew.UseAutosave = 1
    PDFCreatorOptsNew.UseAutosaveDirectory = 1
    PDFCreatorOptsNew.AutosaveStartStandardProgram = 0
    PDFCreatorOptsNew.AutosaveDirectory =
    PDFCreatorOptsNew.AutosaveFilename =
    PDFCreatorOptsNew.AutosaveFormat = 0 'PDF

    PDFCreator1.cSaveOptions PDFCreatorOptsNew

At some point after 7 or 8 reports, PDFCreator may also crash.

I would say there are some bugs in the code but it’s just a loop doing the same thing and it works (most of the time). More than 80% of the reports are actually being printer normally. Only in some of them the options window pops up (apart from the occasional PDFCreator crash).

Other than posting the whole code (which is not that easy for several reasons), is there a way to actually find what’s causing this behavior?


you can enable logging for the PDFCreator from the “Printer” menu inside PDFCreators “PDF Print Monitor”. You can also enable logging for the monitor pdfcmon.dll by adding the following to your registry:In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\pdfcmon create the  DWORD entry logging with the value 1. The log will get placed under  %Windir%\Temp\_pdfcmonLog.txt . Maybe these two logs can give you a clue what is going wrong. Another thing I should mention is the COM interface has been completely redesigned in version 1.9.5 and is not backwards compatible to 1.7.3 . The new COM interface is designed to be compatible with all new versions of PDFCreator for .NET, so if you need future updates or bugfixes, it might be worth looking at the new COM interface.

best regards,

Thanks Robin. I might try the new COM then…