1. Lemuel Bacli
  2. PowerBuilder
  3. Tuesday, 30 July 2019 06:58 AM UTC

Hi,

I know this has been resolved over the years of powerbuilder and exporting datawindow to pdf. But somehow, it gives me a hard time doing it. I can manage to export the datawindow contents to pdf using this script:

dw_printer.retrieve(s_cpno)
dw_printer.Modify("DataWindow.Export.PDF.Method = XSLFOP! ")
dw_printer.Object.DataWindow.Export.PDF.Distill.CustomPostScript="No"
dw_printer.SaveAs("C:\appdir\" + s_cpno + ".pdf", PDF!, FALSE)

 

The pdf output is as the same as the datawindow layout but I encountered problems when i put images and exporting it:

1)  when exporting to pdf the layout of the data window gets different. The header of the first page is normal but when you reached the 2nd page, it's header data is missing. 

2) The image is not displaying any images but if preview using datawindow, the image is there but not on the exported to pdf.

I have tried installing ghostscript but unfortunately the organization's UAC prohibits mo to do so because, it'll be deployed to client pc whose cannot be bothered by changing default printers from there and then. 

i have attached the images. pdf1 and pdf2 are the exported data from the datawindow, the pdf3 is the design of the datawindow that supposedly be showing. 

please help me in resolving this. 

Im using Powerbuilder 2019 and Powerbuilder 12.5 side by side. 

 

the current version deployed to clients were 12.5 and has a plan on upgrading to 19. 

 

Thanks and God bless!

Attachments (3)
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 30 July 2019 15:21 PM UTC
  2. PowerBuilder
  3. # 1

Hi Lemuel;

    I see that you are using the "XSLFOP!" java based PDF  generation option. Trying to export images under this option almost always has issues. This imaging issue has happened even way back into the PB releases from PowerSoft and Sybase.

   Please use either the Distill! or the new NativePDF! option of PB2017 (and higher). These PDF generation options should handle your imaging issues.

HTH

Regards ... Chris

Comment
  1. Lemuel Bacli
  2. Wednesday, 31 July 2019 01:20 AM UTC
how about on pb12.5? can i use the nativepdf on pb12.5? im using xslfop! medthod, am i using it differently?

can you guide me on how to do this on pb12.5?
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 30 July 2019 07:33 AM UTC
  2. PowerBuilder
  3. # 2

Have you tried the native PDF export? But this will not available in PB 12.5!

Comment
  1. Lemuel Bacli
  2. Tuesday, 30 July 2019 07:38 AM UTC
Im reading about this a while ago... it there a way for pb12.5?
  1. Helpful
  1. René Ullrich
  2. Tuesday, 30 July 2019 07:45 AM UTC
I have good experience with "Distill" method that uses GhostScript.

If the new "Native" export works for you this may be a good replacement after your migration to 2017R3 or 2019. Maybe a good argument to migrate earlier. ;-)
  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.