Document.Print method doesn't seems to work

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
DanielBordeleau
Posts: 21
Joined: Tue Apr 29 2003
Location: Montreal, Quebec

Document.Print method doesn't seems to work

Post by DanielBordeleau »

Hi,
I'm using the following code in VB:

------------------------------------------------------------------
Private Sub Command1_Click()
Dim pdf As New CDIntfEx.Document

pdf.SetLicenseKey "My Company Name", "My License"

pdf.Open "c:\test.pdf"

pdf.Print "4th-4100-BARD-PCL6 on srv-printers", 1, pdf.PageCount, 1

End Sub
-----------------------------------------------------------------

When I try to run that code, I got an error message saying that the "Object doesn't support this property or method" on the "print" line... how come?

Thanks

Daniel
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello Daniel,

The .Print method is available in the Professional version 2.10 of the PDF Converter.

Please double check that you have the Professional version of the driver.

Have a nice day !
DanielBordeleau
Posts: 21
Joined: Tue Apr 29 2003
Location: Montreal, Quebec

Post by DanielBordeleau »

I have the 2.10d version of the CDIntf.dll file
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Version 2.10d Professional or Standard edition?
DanielBordeleau
Posts: 21
Joined: Tue Apr 29 2003
Location: Montreal, Quebec

Post by DanielBordeleau »

professionnal version
Keith
Posts: 12
Joined: Fri May 16 2003

Post by Keith »

I am also having trouble with the Document.Print method.

I am using VB 6.0 with the ActiveX interface into Cdintf210.dll.

When I call the Print method of the Document object, I get a "runtime error 438, object not supported" error message.

This should be the Pro Edition as we just recently paid for an upgrade to version 2.10 Developer Pro (to be specific, I am using 2.10d).

Is there anything I can check to make sure I have the Pro version installed? I am installing the printer using install.exe so the printer properties of the driver are available to check.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Keith, to know which version of the driver you have you can right click on the printer and choose 'Properties', you will get the version of the driver you have.

If you have the latest update of the driver you check the version of the printer from the 'Amyuni Tech' tab in the 'Properties' window.

Also you can send us a pdf file and we will check with which version of the driver it is generated.

Daniel and Keith, if you are still facing any problem with the .print method please send an e-mail to support@amyuni.com.

Thanks.
Keith
Posts: 12
Joined: Fri May 16 2003

Post by Keith »

The General tab states "Amyuni Document Converter 2.10".

The Amyuni Tech tab states "Amyuni PDF Converter 2.10d".

Is there anywhere that it is supposed to state if I have either the Standard or Pro edition? That's what I'm looking for because we are supposed to have the Pro edition. I'm wondering if I have either downloaded the wrong version or been given an incorrect license code since it seems the functionality of the .Print method looks to be disabled, as if I don't have suficient access.
Keith
Posts: 12
Joined: Fri May 16 2003

Post by Keith »

I opened a PDF I created yesterday with a text editor and found this:

/Title (Crystal Reports - INLTLNMS.RPT)
/Producer (Amyuni Document Converter)
/Version (Version 2.10d - Licensed to Network Microdesigns Corporati)
/CreationDate (4/6/2003 16:16:35)
DanielBordeleau
Posts: 21
Joined: Tue Apr 29 2003
Location: Montreal, Quebec

Post by DanielBordeleau »

My opinion on that is that the print method should not be called print since that word is reserved. Take notice in a VB code; if you write :

PDFObject.print

the "print" word is written in blue like any other reserved words.... It may be the problem! :?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Keith in the properties dialog box or near producer, there should be metioned if you have the professional edition. From the information you give you seem to have the Standard not Professional edition. To solve this issue please send a pdf file generated by the driver to support@amyuni.com and explain to them the situation so we can check which product you bought.

Daniel, I tried to use the .Print function from VFP, Access, Delphi and PowerBuilder and didn't encounter any problem. I also advise you to contact our support@amyuni.com regarding this matter so they can check this issue more closely.
mrmyers
Posts: 13
Joined: Fri Jun 06 2003

Post by mrmyers »

I beleive your problem does stem from Print being a reserved word.

try it like this:

pdf.[Print] "4th-4100-BARD-PCL6 on srv-printers", 1, pdf.PageCount, 1

I Believe that this Works.

good Luck,
Mike
Keith
Posts: 12
Joined: Fri May 16 2003

Post by Keith »

Thanks for the suggestion, Mike.

Putting .Print inside the brackets does suppress the error message. However, nothing is printed.

Anyone else have any suggestions? This is the last issue that is holding me up from releasing my software with the latest version of the PDF Converter. I would really like to have this print feature so I can get away from requiring our users to have Acrobat Reader installed to print certain reports from our system.

The code sample for what I am doing is this:

...
(Already successfully generated a PDF using the CDIntfEx.CDIntfEx object)
...

Set objPDFDoc = New CDIntfEx.Document

objPDFDoc.SetLicenseKey "My Company Name", _
"My Company License Code"

objPDFDoc.Open strReptdir & "\proposal.pdf"

objPDFDoc.[Print] strPDFPrinter, 1, objPDFDoc.PageCount, 1
Keith
Posts: 12
Joined: Fri May 16 2003

Post by Keith »

It works!

The reason no output was being sent to the printer was because I passed the wrong string to the printer name parameter of the .Print method (full name, driver name and port as one string instead of just the printer name).

I did have an unusual result the first time it did print. The PDF document I generated prior to the .Print call was 2 pages. Only one was printed. I tried a different report and it was printed correctly. Went back to the original and the correct number of pages printed the second time.

Also, the return value from the .Print method is always False. According to the latest documentation, it is supposed to be True if successful, False if unsuccessful. Right now, False is always being returned, regardless of if the document printed correctly or not.
Post Reply