Addin: Print using Acrobat Distiller

Addin: Print using Acrobat Distiller

Anonymous
Not applicable
511 Views
2 Replies
Message 1 of 3

Addin: Print using Acrobat Distiller

Anonymous
Not applicable
I had a macro that used distiller to create a PDF, which worked fine. I converted the macro to an addin and now am having issues with it. It creates a postscript file and then creates the PDF on first run ok. The next time I use it, it fails because the distiller process is still running.

I read some info that you need to add the distiller object to its own class and then dispose of it. That's where I'm lost as to how to do this? Anyone have any instructions on how to go about doing this? I'm using VB Express 2005.

Basic code:
myPDF = New ACRODISTXLib.PdfDistiller

And then:
' Submit the print.
Dim myPSS As String
myPSS = (txtFolderPath.Text & ("\" & oDocName & oDocNameSuffix & ".ps"))
oPrintMgr.PrintToFile(myPSS)

' Create the PDF
myPDF.FileToPDF(myPSS, (txtFolderPath.Text & "\" & oDocName & oDocNameSuffix & ".pdf"), "")
0 Likes
512 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
is there not a close method for the ACRODISTXLib.PdfDistiller object?

you might also try:

Set myPDF = Nothing
0 Likes
Message 3 of 3

Anonymous
Not applicable
Set myPDF = nothing just removes the value from memory but does not shutdown the instance of distiller. I googled it and saw others with similar issues, the answers were vague.
0 Likes