1. Valdas Vaitiekaitis
  2. PowerBuilder
  3. Tuesday, 30 June 2020 16:12 PM UTC

I've got a logo of my local government organization from www.cab.lt and I want to use in a datawindow print form, however when I try to export it using NativePDF image gets all pixelated and I can not find a way keep the quality. 

Initial image:

Resulting pdf view:

https://drive.google.com/file/d/1sg0dzNWMDCFayBPfehnMmcMRoHfnyIZI/view

Please see attached test sample.

Using Distill! method it exports without quality loss. All other images export without quality loss with NativePDF. Only this one picture is getting butchered with NativePDF. Any ideas?

I am using PB 2019 R2 build 2328.

Update 1: tried changing Export.PDF.NativePDF.ImageFormat option, did not help.

Update 2: submitted a ticket.

Attachments (1)
Tobias Roth Accepted Answer Pending Moderation
  1. Saturday, 4 July 2020 19:21 PM UTC
  2. PowerBuilder
  3. # 1

Hi Valdas,

i already opened a ticket about the same problem in april 2019 without a solution.

https://www.appeon.com/standardsupport/track/view?id=2584

The PNG format would offer so many advantages, e.g. Transparencies and partial transparencies.

Regards Tobi

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 1 July 2020 15:41 PM UTC
  2. PowerBuilder
  3. # 2

I don't see in your test app where you are setting Export.PDF.NativePDF.ImageFormat to '2' (PNG), so I added that:

dw_1.Object.DataWindow.Export.PDF.NativePDF.UsePrintSpec = 'Yes'
dw_1.Object.DataWindow.Export.PDF.NativePDF.ImageFormat  = '2'  //PNG
dw_1.Object.DataWindow.Export.PDF.Method = NativePDF!
dw_1.SaveAs("", PDF!, true)

I concur this does not resolve the resolution issue.

I then tried setting ImageFormat to '1' (JPG), which converts the PNG to a JPG before including it in the PDF. No change.

Using Windows Paint, I converted the PNG to a JPG, changed the DW to reference the JPG, leaving ImageFormat = '1' (JPG). No change.

I then switched gears and tried PB 2017 R2. Using the PNG image, ImageFormat = '2' (PNG). Resolution still bad.

Using the JPG image, ImageFormat = '1' (JPG) in PB 2017 R2. Success! Image resolution in the PDF is much improved and the size of the PDF is noticeably smaller. We are using JPG's with PB 2017 R2 for our applications, which is why this feature is working for us.

Once more test: Used the JPG image, ImageFormat = '2' (PNG) in PB2017 R2. This works also.

So, your issue does appear to be a bug in PB19 R2.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 30 June 2020 17:47 PM UTC
  2. PowerBuilder
  3. # 3

Greetings, Valdas -

Armeen is on point. What he didn't say is that the NativePDF driver appears to convert images to the type defined in this setting. So, not only are CPU cycles needlessly spent on the image conversion, the resultant PDF becomes significantly larger than needed because BMP is a non-compressed image format.

We ran into this issue early on and using the ImageFormat option made the issue go away.

Regards, John

Comment
  1. Valdas Vaitiekaitis
  2. Wednesday, 1 July 2020 05:17 AM UTC
Tried that, did not help. Tried all 4 ImageFormat options, all got same result.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 1 July 2020 14:39 PM UTC
Hi Valdas;

Please open a support ticket for the image clarity within a NativePDF rendered file if you cannot resolve this issue.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 30 June 2020 17:21 PM UTC
  2. PowerBuilder
  3. # 4

There is option to use different image types. Default is BMP.  Set it to PNG.  https://docs.appeon.com/pb2017r3/datawindow_reference/ch03s03.html#XREF_19761_Export_PDF_NativePDF_ImageFormat

Comment
  1. Valdas Vaitiekaitis
  2. Wednesday, 1 July 2020 05:17 AM UTC
Tried that, did not help. Tried all 4 ImageFormat options, all got same result.
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.