1. Kieu Parrish
  2. PowerBuilder
  3. Friday, 10 August 2018 14:53 PM UTC

Hello,

We are using PowerBuilder2017 R2 . We have tried the NativePDF! and then compared the size to the PDF with GhostScript and we are using same datawindow ( exact same Stored Procedure , same data ) .

The PDF with GhostScript is 173 KB but the PDF with NativePDF! is  377 KB.

Is there a way to make size of PDF with NativePDF! same as the one with GhostScript ?

Thanks!

 

 

 

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Friday, 10 August 2018 15:52 PM UTC
  2. PowerBuilder
  3. # Permalink

Does the DataWindow contain any graphics/images and what image format? (.jpg, ,png, etc.)

If so, the larger file size is likely due to conversion of the image to a .bmp (bitmap) format. This is the default behavior for the NativePDF driver.

You can control the image format via Modify() or dot notation:

dw_1.Modify("DataWindow.Export.PDF.NativePDF.ImageFormat = '1'") // 1 = JPG
or
dw_1.Object.DataWindow.Export.PDF.NativePDF.ImageFormat = '1' // 1 = JPG

Valid values are: '0' (bitmap), '1' (JPG), '2' (PNG), '3' (GIF).

Look at section 3.3.66 in the DataWindow Reference publication for more info. I believe this functionality was added in PB 2017 R2.

HTH

Comment
There are no comments made yet.
Kieu Parrish Accepted Answer Pending Moderation
  1. Friday, 10 August 2018 16:05 PM UTC
  2. PowerBuilder
  3. # 1

The ImageFormat = '1' brings the size down about same as the one with GhostScript.

Thanks John Fauss and Kim Berghall!

Comment
There are no comments made yet.
Kim Berghall Accepted Answer Pending Moderation
  1. Friday, 10 August 2018 15:51 PM UTC
  2. PowerBuilder
  3. # 2

Does it include any images? In that case set ImageFormat='1' to save as jpg.

Comment
There are no comments made yet.
Kieu Parrish Accepted Answer Pending Moderation
  1. Friday, 10 August 2018 15:09 PM UTC
  2. PowerBuilder
  3. # 3

No custom fonts ,no barcodes and no changing datawindow design .
Do you know makes the size a lot bigger ?
Thanks!

Comment
There are no comments made yet.
John Vanleeuwe Accepted Answer Pending Moderation
  1. Friday, 10 August 2018 15:02 PM UTC
  2. PowerBuilder
  3. # 4

Hi,

Are you using any custom fonts/barcodes in your datawindow design ?

We have the same "problem" because we had to include a barcode font , and all our PDF sizes are at least doubled in size.

 

John

Comment
  1. Kieu Parrish
  2. Friday, 10 August 2018 15:09 PM UTC
No custom fonts ,no barcodes and no changing datawindow design .

Do you know makes the size a lot bigger ?

Thanks!

  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.