1. Philippe PILAT
  2. PowerServer 2020 or older (Obsolete)
  3. Wednesday, 18 July 2018 15:02 PM UTC

Hi all,

I have a PB 2017 R2 (build 1769) application in which I create a PDF file from a datawindow using SaveAs PDF! (Native PDF).

 

Here is my code :

<

 dw_m.Modify("DataWindow.Export.PDF.NativePDF.UsePrintSpec = No")
 dw_m.Modify("DataWindow.Export.PDF.Method = NativePDF!")
 dw_m.Modify("DataWindow.Export.PDF.NativePDF.PDFStandard = 1")
 dw_m.Modify("DataWindow.Export.PDF.NativePDF.CustomOrientation = 2")
 dw_m.Modify("DataWindow.Export.PDF.NativePDF.CustomSize = 4")
 
 li_ret = dw_m.SaveAs("onepager.PDF", PDF!, true)

>

The result in PB is great and the PDF file is excactly the same as the DW in preview mode. When this application is published to Powerserver WEB, the PDF file is totally different : the report is splitted on 2 horizontal pages, looks not so good (no font is Embedded in the PDF).

Does anyone have a solution with this problem ?

BTW I'll have to publish the same application on Powerserver Mobile for Ipad ...

TIA.

Best regards,

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 July 2018 15:15 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Philippe;

     Yes, the PDF rendering engines are different in PowerServer Web & Mobile vs native PB. I was just reviewing the PowerServer 2018 features this AM from Engineering and there are no anticipated changes to the PDF feature in the next release.

     My only suggestion at this time would be to call a Web Service from either the Web or Mobile app. In the WS, call a PB native App that utilizes the same code as you listed. Then transfer the PDF from the WS server back to the Web or Mobile app. Its certainly a little more work though but maybe a better solution until PowerServer catches up PDF feature wise. Food for thought.

   In the mean time, please open a support ticket for this issue so that it gets on Engineering's PS "ToDo" list.

Regards ... Chris

 

Comment
  1. Philippe PILAT
  2. Thursday, 19 July 2018 06:52 AM UTC
Hi Chris,

thanks for your answer and great suggestion. I'll see with the project leader which route to go. I'll open a ticket for this issue.



Regards,

Philippe.
  1. Helpful
There are no comments made yet.
Appeon Support Team Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 03:25 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Hi Philippe,

PowerServer PB edition that is included in PB 2017 R3 will support this feature. It will be released around the end of this month. And PowerServer 2018 which is planned to be released around the end of October will support this feature too.

You can use the script like below.
dw_1.object.datawindow.export.pdf.method = NativePDF!
dw_1.saveas("C:\Temp2\test2.pdf",pdf!,true)

And the print specifications does not work with native pdf currently. We will fix it as soon as possible.

Regards,
ZhaoKai

Comment
  1. Philippe PILAT
  2. Thursday, 19 July 2018 06:54 AM UTC
Hi,

the problem is not to generate the PDF, it is created either in PB or via Powerserver. The problem is the quality and the rendering when the PDF is generated via Powerserver.



Regards,

Philippe.
  1. Helpful
  1. Appeon Support Team
  2. Thursday, 19 July 2018 07:50 AM UTC
Hi,



Understood. The problem is that with the current version, even if you sepecify .export.pdf.method = NativePDF!, the generated pdf is not real native pdf. So there’re quality and rendering issues. This will be improved in the coming PB 2017 R3.



So in the current version, you may try the below resolution to generate a real native pdf with better quality and rendering.

1 call saveas function without any parameter, for example:

dw_1.saveas()

2 select ‘NativePDF’ as ‘Save as Type’



Regards,

ZhaoKai

  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.