1. Pete Yankovich
  2. PowerBuilder
  3. Monday, 14 September 2020 19:42 PM UTC

In PB 2017R2, I have a datawindow that successfully saves as PDF in the prod environment, but in Dev and local environments the PDF fails.

This is in script, the file name is valid:

// Create the ticket PDF
ll_rc = dw_meter_ticket_email_form.SaveAs(is_pdf_file, PDF!, True)
SaveaAs returns -1

This is in pb.ini in all environments:

[Data Window]
NativePDF_Valid=1
NativePDF_IncludeCustomFont=1

PDF SaveAs has worked since implementing 2017R2.  No longer use Ghost Script.  Not sure where else to look.

Any help is appreciated.

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 14 September 2020 20:02 PM UTC
  2. PowerBuilder
  3. # 1

Hi Pete;

   If you are referring to running you Apps from the IDE, then you will need to update the "working" PB.ini file for PB 2017 R2 as follows:

  1. Open the IDE
  2. Open the menu "Tools = > System Options" dialogue.
  3. Take note of the PB.ini file instance location that the IDE is using (aka Initialization Path).
  4. Open the PB.ini from the location in step#3
  5. Add the same [Data Window] entries to that PB.ini as well & then save
  6. Restart the PB IDE.

HTH

Regards ... Chris

Comment
There are no comments made yet.
Pete Yankovich Accepted Answer Pending Moderation
  1. Monday, 14 September 2020 20:17 PM UTC
  2. PowerBuilder
  3. # 2

Thanks Chris, that did the trick.  I have since noticed that the non-IDE apps are saving correctly also.

Comment
  1. Chris Pollach @Appeon
  2. Monday, 14 September 2020 20:35 PM UTC
Hi Pete - that is awesome news ... you are most welcome!

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.