Acrobat printer driver interferes

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
searer
Posts: 5
Joined: Wed Jun 02 2004
Contact:

Acrobat printer driver interferes

Post by searer » Wed Jun 02 2004

PDF Converter Version 2.1 developer version.
When a user chooses acrobat printer driver as the printer to use, and then later chooses the function in my application that uses the amyuni converter to generate a file, the acrobat printer driver is actually used and not the amyuni converter! It is as though the acrobat printer driver doesn't let go of being the default printer.

PB 7

Any suggestions?

Mike

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

Post by Joan » Thu Jun 03 2004

Hello,

When choosing the Adobe printer are you setting it as default on the system or are you choosing it as a printer for your PB application only?


Thanks.

searer
Posts: 5
Joined: Wed Jun 02 2004
Contact:

Post by searer » Sat Jun 05 2004

adobe chosen by user as printer for the PB application, not the default system printer.

I can check for when it is the default, if that helps.

I can get version info on the adobe printer or any other info if it helps.

regards,

mike

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

Post by Joan » Mon Jun 07 2004

Hello,

As far as I know, Powerbuilder 7 prints to the default printer of the system while Powerbuilder 8 prints to the specific printer of the application.

So if you have Powerbuilder 7, you need to set the PDF Converter as default before printing to it, unless you have a way to set it as the default printer of your datawindow.

In Powerbuilder 8 things are easier, you can call:

dw_1.Modify ('DataWindow.Printer="My PDF Printer" ')

to set the printer of your datawind to the PDF printer, in this way your datawindow will be always printed to the PDF Printer.

Hope this helps.

searer
Posts: 5
Joined: Wed Jun 02 2004
Contact:

Post by searer » Mon Jun 07 2004

Perhaps I should have mentioned that this is the developer version I am working with. I am using the dll interface.

As you know, the dll interface does that automatically already for PB 7.
It works fine when the default printer is set to a regular printer. It also works fine when a user selects a new 'regular' printer in the application.

It doesn't work when the adobe acrobat printer driver is selected. It is as though the PDF converter dll sees the adobe printer driver as the same as the amyuni pdf printer driver and it does NOT change it.

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

Post by Joan » Wed Jun 09 2004

Hello,

Please check the declaration of SetFileNameOptions(), this functions takes two long paramters, if you are passing to it a long and an integer than this could be the source of your problem.

If this is not the case, please send your functions declarations to support@amyuni.com so we can check them and see if there is any problem with those declarations.

Best Regards.
Last edited by Joan on Thu Jun 10 2004, edited 1 time in total.

searer
Posts: 5
Joined: Wed Jun 02 2004
Contact:

Post by searer » Wed Jun 09 2004

Just to be clear, SetFileNameOptions(Handle hPrinter, int nOptions) should be

SetFileNameOptions(Handle hPrinter, Long nOptions) ?

The documentation is incorrect?

I will try it.

Thanks!

Mike

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

Post by Joan » Thu Jun 10 2004

Hello,

The new version of SetFileNameOptions takes a large number of values, some of them are integers (Example NoPrompt, UseFileName, ect...) and some are Longs (Example: ExportToRTF, PostProcessing, ect...).

If you need to use Long values you need to declare SetFileNameOptions as taking two Long.

I am sure our Technical Wirter will include this issue when updating the documentation of the Developer version of the driver.

If you are still facing problems please send your declarations and a snippet of your code to support@amyuni.com so we can check it.

Thanks.

Post Reply