1. Faisal Hayat
  2. PowerBuilder
  3. Wednesday, 3 March 2021 11:13 AM UTC

Hi Folks,

Couple of days ago I posted a question regarding Native PDF usage and the response was overwhelming. 

https://community.appeon.com/index.php/qna/q-a/native-pdf-using-pb-ini-in-pb-2019

I am trying to implement Native PDF using Native PDF configurations in application object in PB 2019 R2 and having following issues. 

  • If the report (DW) has grouping and when it is exported to PDF using Native PDF, values are overwritten and messed up.  The issue does not occur while using code or executables where PB itself is installed. The occurs where I am using PB runtime for 32 & 64 bit.
  • I have a dotted line as a row separator in the report (DW), The line has an extra shadow when the report is exported to PDF using Native PDF. The issue does not occur while using code or executables where PB itself is installed. The occurs where I am using PB runtime for 32 & 64 bit.
  • Page size remains 11.70 X 8.26 in Native PDF regardless of what layout size is of data or DW. Same report is exported to letter size using Ghost script but Native PDF keeps it it's A4 size (11.70X8.26) resulting into page splits and disturbing the report layout. The issue exists in code, executables on PB and PB runtime, everywhere. 

I also upgraded the PB from R2 to R3 and it didn't resolved any of the issues. Looking forward to hear your expert opinion on the above issues. Thank you. 

Kind Regards

Faisal Hayat

Accepted Answer
Faisal Hayat Accepted Answer Pending Moderation
  1. Monday, 19 July 2021 07:42 AM UTC
  2. PowerBuilder
  3. # Permalink

The issue was resolved after migrating code to PB 2019 R3

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

Rene is correct.

Look at the Help topic "Export.PDF.NativePDF.CustomSize property (DataWindow object)' and you will see that the default paper size for NativePDF is A4. You have to enable the UsePrintSpec property if you want NativePDF to utilize the print specifications that are defined in the DataWindow, or you have to override the default CustomSize property. If you examine the Help topic on this property you will see that it defaults to "No". Take no explicit action, and NativePDF will produce A4 output.

If you haven't done so already, I suggest you familiarize yourself with all of the properties and options related to NativePDF so that you can try to make it work for you the best that it can.

When we looked at NativePDF initially, it was pretty clear that we would not be able to use it without configuring the settings to best meet our needs. We had to make changes in our framework's ancestor objects (and some descendant objects) to make it work for us in an optimal fashion... and even then, there were compromises where we said "Well, that's not ideal, but we can live with it." If we hadn't been able to reach that point, we would still be using the distill/GhostScript solution today.

Comment
  1. Faisal Hayat
  2. Wednesday, 3 March 2021 20:57 PM UTC
Hi John

I was under the impression that Native PDF is a replacement to Ghost script and all I need to do is to configure the application for Native PDF and rest will be taken care by native PDF itself. My PB application PDF reports will remain same and on top of that I don't need Ghost Script anymore.



Now as you mentioned I will have to work through DW properties to achieve the expected results. Application has got more than 1000 DWs but my save as functionality is centric so hopefully it won't be a big deal.

I got you and I will look into it and to make it work.
  1. Helpful
  1. John Fauss
  2. Wednesday, 3 March 2021 21:18 PM UTC
I would categorize NativePDF as an Appeon-supported ALTERNATIVE to GhostScript, not as a replacement for it.

Our app is a commercial product, also with more than 1000 DW's. We did not have to manually edit ANY of our DW's... we were able to make the transition seamless for our customers solely by setting the Export.PDF.Method property and the various Export.PDF.NativePDF properties dynamically via code in our ancestor DataWindow control and DataStore objects, so it can be done without having to touch/edit the DataWindow DataObjects.



Post here again if you have more questions. Good luck!
  1. Helpful
  1. Faisal Hayat
  2. Tuesday, 16 March 2021 12:52 PM UTC
Hi John



I am trying to implement same, to achieve seamless transition without changing or modifying DW properties at design time. I have an ancestor which performs save as for all the DWs and trying to write modify script to achieve the Native PDF functionality without disturbing layout. Can you please share some sample code or insights to do that. Your help will be highly appreciated. Thank you
  1. Helpful
There are no comments made yet.
Andy Preman Accepted Answer Pending Moderation
  1. Wednesday, 3 March 2021 15:22 PM UTC
  2. PowerBuilder
  3. # 2

Hi Faisal,

I also had the same overwriting problem.  It was resolved with the current build of 2019 R2 2353.

As far as the page size is concerned, I also have that issue as well.  I had the page size set to default in many of my datawindows which in my case always defaulted to 8 1/2 x 11.  In 2019 R3 the default became the European size which cut off the right side of my reports.   I was also told that changing it from the default to 8 1/2 x 11 would solve the problem, which it did. From what I understand in the MR they will change the default behavior to what it was previously in R2.

 

Andy.

Comment
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 3 March 2021 12:03 PM UTC
  2. PowerBuilder
  3. # 3

Hi Faisal,

You can specify settings for paper size in the datawindow object ("Data Export" properties for NativePDF). 

You may use the same settings as in print specifications using checkbox "Use Paper Size and Orientation Settings from Print Specification" or specify size and orientation for PDF export.

 

The other two problems looks like a different runtime version. Check if runtime version of DLLs is the same as you PB IDE. If this doesn't solve it I think you should open a support ticket.

HTH,

René

 

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.