PB9 with PDF converter 2.51 demo

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
orjaneil
Posts: 5
Joined: Mon Nov 24 2003

PB9 with PDF converter 2.51 demo

Post by orjaneil » Wed Aug 16 2006

I have been using the pdf converter 2.06 with our pb9 app for the last years with success in client-server environment. Lately I installed our pb9 application in a citrix environment and then I couldn't get the pdf converter to print.

I have however heard that the 2.51 driver should work in a citrix environment, but before I buy this driver I need to know if it will work successfully :?

Therefore I have downloaded the demo version of the driver and the technical note for pb for the driver. I have tried to test the demo driver without succes so far.

Can someone give me a easy code example that will work with the demo version so that I can test it with my pb9 application.

TIA

Ørjan

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

Post by Joan » Wed Aug 16 2006

The PB code samples are available at in the Powerbuilder technical note. There is a full sample there.

Version 2.50 works in a Citrix environment. Did you add EnablePrinter() to your code?

orjaneil
Posts: 5
Joined: Mon Nov 24 2003

Post by orjaneil » Thu Aug 17 2006

I have downloaded the technical note for powerbuilder, and this is what the code says:

PDFPrinter = DriverInit(PrinterName)
//PDFPrinter = PDFDriverInit("Amyuni PDF Converter")

ll_rc = SetResolution (PDFPrinter, 600)
ll_rc = SetDefaultConfig (PDFPrinter)
ll_rc = SetDefaultPrinter (PDFPrinter)
ll_rc = SetDefaultFileName (PDFPrinter, OutputFileDll )
ll_rc = SetFileNameOptions (PDFPrinter, NoPrompt + UseFileName )
ll_rc = EnablePrinter(pdfPrinter,LicensedTo,ActivationCode)

dw_list.print()

ll_rc = SetFileNameOptions (PDFPrinter, 0)
DriverEnd (PDFPrinter)

the ll_rc gets 1 on all of the function calls, I can see that the default printer is set to Amyuni PDF Converter but still the printer that is being used is the printer that it changed from.

I have even tried to set Amyuni as the default printer, even then another printer is used for printing.

If I change the code to use the second code line instead of the first, the Amyuni pdf converter driver simply disapears from the printer list and seems to be deleted as a printer driver.

//PDFPrinter = DriverInit(PrinterName)
PDFPrinter = PDFDriverInit("Amyuni PDF Converter")

Another thing, the code example from the technical note is for the 2.10 driver. I changed the declaring from cdintf210.dll to cdintf251.dll because the cdintf210.dll was not the one installed with the demo version of the printer driver.

If I can't get the demo driver to function correctly how can I get the licensed driver to work fine? I have some customers that need to be able to save to pdf in a windows 2003 citrix farm environment, will the normal 2.50 driver work there?

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

Post by Joan » Thu Aug 17 2006

Hello,

Both the demo and the release version would work properly with Powerbuilder 9 under Citrix.

Yes the technical note is for version 2.10 of the Converter but the same would apply to version 2.50.

Printing from Powerbuilder 9 and 8 however is a little bit different than printing from older versions of PB. starting Powerbuilder 8 the default windows printer is ignored and you have to use a new PB8 command (PrintSetPrinter) to set the print destination for the PDF Printer.

More information:

You can now modify the printer property to point to a particular printer without changing the default printer on the machine. The following example changes the DataWindow printer (but does not affect the system default printer device):
dw_1.Modify ('DataWindow.Printer="My LaserJet 3" ')

Note: From PowerBuilder 8 also you can use:
SetCurrentPrinter - a wrapper for PrintSetPrinter, this function changes the printer for subsequent print jobs executed from the current application session.


Hope this helps.

orjaneil
Posts: 5
Joined: Mon Nov 24 2003

Post by orjaneil » Fri Aug 18 2006

I tried the PrintSetPrinter() and the pdf was generated. Thanx a lot!!!

-ø-

Post Reply