User login

Who's online

There are currently 1 user and 60 guests online.

Online users

Advertisements


SourceForge.net Logo

Whats The Point Of PDF Creator?

Submitted by Stremit on Fri, 2008-05-02 13:13.

Hi all,

This may be contentious but what the heck.

I posted a request in the Help forum to try to find out a definitive, robust solution to the problem of PDFCreator hanging when cClose is executed ie one which does not rely on putting "wait" statements all over your code and hoping. I have tried everything I could think of but to no avail. There seem to be many instances of other people reporting the same issue from several versions ago but the problem still doesnt appear to be solved in the latest version (0.9.5).

If the product cant be used without hanging and there is no clear solution, whats the point of continuing distributing new versions without first fixing that?

If this cant be solved does anyone know of an alternative free solution which will work with VB macros?

Submitted by Stremit on Tue, 2008-05-06 13:38.

Hi Philip,
Appologies, I had spent quite a long time trying to get it working then looked on the forum and found lots of references to similar problems (call it a bad day). My details are below:

I am using:
Windows XP Pro
MS Excel 2003
PDFCreator 0.9.5
Creating a print to pdf VB macro controlled from a button control on an excel worksheet.
Using early binding technique

Whenever i let the macro (see below for extract) "free run" it hangs on the cClose command. PDFCreator doesnt close, sits in the task list consuming 100% procesor time and excel eventually reports an error "waiting for application to complete OLE activity"
If i put a breakpoint in just above the cClose command and then single step the cClose everything is fine. I assumed that this was a timing thing so tried to put a few "waits" in before the cClose but with no success.
Can anyone suggest a robust solution to this problem, I have attached the code fragment I am using (based on the example on the web)?
...
'Wait until all print jobs have entered the print queue
Do Until pdfjob.cCountOfPrintjobs = 2
DoEvents
Loop
'Combine all PDFs into a single file and stop the printer
With pdfjob
.cCombineAll
.cPrinterStop = False
End With
'Wait until PDF creator is finished then release the objects
Do Until pdfjob.cCountOfPrintjobs = 0
DoEvents
Loop
pdfjob.cClose
Set pdfjob = Nothing
End Sub

© 2006 by pdfforge.org :: Contact us

Validate XHTML or CSS.