Powerbuilder 11.2 (Printer not activated, error code -20)

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
Jerrod
Posts: 1
Joined: Wed Sep 23 2009

Powerbuilder 11.2 (Printer not activated, error code -20)

Post by Jerrod »

I am getting the following error (Printer not activated, error code -20)

on the last line of the code below:

Using trial version of PDF Converter - Developer in Powerbuilder 11.2 on a Vista Business Platform

Any ideas?

gl_PDF=PDFDriverInit('Amyuni PDF Converter')
EnablePrinter(gl_PDF,"Evaluation Version Developer Pro","07EFCDAB010001001A62D63A2E234ADFD28E5C773A417CBCF622CE045AA431E6CCCFA12932B31B851AAA7C7E11A178A8A8883B10998560A0650A5827E42FDCD3BADC4C704277F8DC2876EE961D134CE69A4F19730A30176CF265BA20")

Int li_opt
Long ll_pjob
IF gl_PDF=0 THEN
MessageBox('Error','Could not print to PDF file')
RETURN
END IF
SetResolution(gl_pdf,600)
SetDefaultConfig(gl_pdf) // Apply the above settings.
SetDefaultPrinter(gl_pdf)
SetDefaultFileName (gl_pdf,'c:\test.pdf' )
li_opt=3
SetFileNameOptions (gl_pdf,li_opt)

tab_med.tabpage_2.dw_2.Object.DataWindow.Printer = "Amyuni PDF Converter"
tab_med.tabpage_2.dw_2.Print()
sebastien
Posts: 6
Joined: Fri Sep 25 2009

Re: Powerbuilder 11.2 (Printer not activated, error code -20)

Post by sebastien »

Hi,
if you have a non-english version of Vista, you have to add permissions in the registry on the following hive : HKEY_CURRENT_CONFIG\Software\<Your PDF printer Name>
Give full control to "users".
It worked for me (but I have another problem after, listed in another topic).
Regards,
Sebastien
Post Reply