Quantcast
Channel: Recent Discussions on pdfforge Forums
Viewing all articles
Browse latest Browse all 10270

Inconsinstent COM object behavior

$
0
0
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 = <Path>
    PDFCreatorOptsNew.AutosaveFilename = <FileName>
    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?

Viewing all articles
Browse latest Browse all 10270

Trending Articles