Trail version 4 is not working

If you are a Power Builder developer and have any questions about using our products from Power Builder here is the place to post them.
Post Reply
cmjoshi2003
Posts: 1
Joined: Fri May 22 2009

Trail version 4 is not working

Post by cmjoshi2003 » Thu May 28 2009

Hi,

We are planning to use Amyuni pdf converter, But while testing Trail version 4 is not working and trail version 3 is working fine. I am trying with Powerbuilder 9. When I tried to print the pdf directly from word document, it is working fine with version 4 as well. But with Powerbuilder I am getting error in calling external function at DriverInit() line.
Please help.

OutputFile = "C:\test\TEST_DOCUMENT.pdf"
PrinterName = "Amyuni PDF Converter"

pdfobj = create oleobject
pdfobj.ConnectToNewObject("cdintfEx.cdintfEx")
pdfobj.DriverInit (PrinterName)
pdfobj.SetDefaultPrinter
pdfobj.DefaultFileName = OutputFile
pdfobj.FileNameOptions = NoPrompt + UseFileName
pdfobj.FileNameOptions = NoPrompt + UseFileName + Concatenate

// create the new ole object.
WordDoc = create oleobject
WordDoc.ConnectToNewObject("Word.Application")
WordDoc.documents.open("C:\test\TEST_DOCUMENT.doc")
WordDoc.application.visible = False
WordDoc.Application.ActivePrinter = PrinterName
WordDoc.ActiveDocument.PrintOut( False )
WordDoc.Application.quit()
pdfobj.FileNameOptions = 0
Destroy pdfobj

David
Amyuni Team
Posts: 89
Joined: Mon Dec 18 2006

Re: Trail version 4 is not working

Post by David » Thu May 28 2009

Hello

The DriverInit function initializes the library for use with an already installed printer. DriverInit cannot install a new printer and will fail if the printer does not already exist.

You need to make sure that the printer that you have specified exists on the system.

Hope that helps.

David
Amyuni Custom Development
Do you need a specific PDF solution? Are you looking for expertise that will enable you to start or complete a PDF integration project?
http://www.amyuni.com/en/company/services.php

Post Reply