-2147467259 - Automation error while Printing

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
schmidtdarren
Posts: 3
Joined: Mon Jan 31 2005

-2147467259 - Automation error while Printing

Post by schmidtdarren »

We have an issue with a client that is having problems printing.

They will have a number of pdf documents to print, say 15.

We were using the common dialog to select a printer and then using the following code

for nCounter = 0 to nDocCount
if pdfCreator.Open(asFiles(nCounter), "") then
pdfCreator.Print printer.devicename, false
end if
next

I'm trapping exactly where the error occurs and its on the pdfCreator.Print statement. The error is "-2147467259 - Automation error ", no other information is given. The thing is, its happening at various times in the loop. Sometimes it occurs at the first iteration, sometimes at the 12 iteration, etc.

Any ideas???

Is the following code better (no common dialog)?

pdfCreator.StartDoc printer.devicename, true
for nCounter = 0 to nDocCount
if pdfCreator.Open(asFiles(nCounter), "") then
for nPageCounter = 1 to pdfCreator.PageCount
pdfCreator.PrintPage nPageCounter
next
end if
next

As stated above the opening of the documents is not the issue. Printing seems to be. The clients printing are on a wireless 802.11 network. They are using competent PC's and were working fine printing with Adobe. We are trying to remove our Adobe dependancy. This would appear to be an issue with respect to the pdfCreator control. Please advise.

Regards,
Darren A. Schmidt
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

The second code is better.

If you are using version 1.5 or 2.0 of the PDF Creator please add a call to SetLicenseKey right before printing. This should help.

Have a nice day!
Post Reply