1. John Fauss
  2. PowerBuilder
  3. Friday, 2 February 2018 22:11 PM UTC

I'm trying to evaluate whether or not I should utility the ImageFormat setting that has been added to NativePDF support. If I understand the description of this setting in the DataWindow Reference pub (page 257), this setting specifies the format of (imbedded) images when the PDF file is created. Since this setting cannot be manipulated in the DataWindow painter, I am manually setting the value in the DataWindow source via Edit Source for the purpose of this evaluation.

I have a DataWindow object (a customer invoice) that contains an image (the company logo; it is in JPG format). The PDF that is produced is *identical*, byte for byte, no matter which PDFNative.ImageFormat setting is used; BMP, JPG, PNG, or GIF.

Since these four image formats are vastly different from one another, it would seem unlikely that the PDF's would be identical when the imbedded image format is changed...therefore this new NativePDF setting looks like it is ignored, and NativePDF appears to actually use only one format, regardless of the setting. Is that what is happening "under the covers"? 

It also seems unusual that there is no way to manipulate this setting via the DataWindow Painter.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Sunday, 4 February 2018 04:36 AM UTC
  2. PowerBuilder
  3. # 1

Hi John;

   This setting is has two effects ... a) speed of PDF creation and b) overall PDF file size. The feature is particularly geared to embedded images withing a DW object. Without any embedded images, the only basic difference is the PDF creation speed. However, with embedded images - the overall PDF size is definitely affected as well as speed, as follows:

 

HTH

Regards ... Chris

 

 

 

 

Comment
  1. John Fauss
  2. Tuesday, 6 February 2018 21:50 PM UTC
Thank you to all who responded! Thank you, Chris, for the illustrative test example results!



To summarize:



If I have an embedded image in my DataWindow, the recommended PDFNative.ImageFormat setting is the one that matches the embedded image's format; because this will allow the PDFNative "driver" to, in effect, pass the image through without requiring an image conversion?

  1. Helpful
There are no comments made yet.
Gerry Whitmarsh Accepted Answer Pending Moderation
  1. Saturday, 3 February 2018 08:25 AM UTC
  2. PowerBuilder
  3. # 2

I create a pdf of ~ 5 pages with up to 40 images(jpg). Before R2 native pdf was unusable, the pdf was something in the range of 25-30MB. Now, with format 1 (JPG) the resulting size is down to 3MB! Format 0, 2 and 3 BMP/PNG/GIF still create 25MB files. So yes, it does make a huge difference. I do agree though, BMP, PNG and GIF don't seem to do anything. There seem to be just two formats, JPG and the BMP(default).

Gerry.

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Saturday, 3 February 2018 02:09 AM UTC
  2. PowerBuilder
  3. # 3

JPEG is already compressed.  Try a very high resolution image in a non-compressed format and then see how the different formats change the clarity and filesize.

Comment
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.