1. P Laceholder
  2. PowerBuilder
  3. Tuesday, 2 November 2021 10:59 AM UTC

Hello,

I have some texts, composed dynamically inside of a RTE control.

Now one of the things we need to achieve is exporting the PDF, that later needs to be archived.

While exporting a PDF is as simple as this:

rte_1.SaveAs("file.pdf", PDF!, true)

our necessity is to export it in the specific PDF/A-3a format; I tried changing format options on the RTE editor itself which turned out unsuccessful.

I tried importing the RTE text inside of a Rich Text (DataWindow) DataStore and changing its options in the following way:

dts_1.Object.DataWindow.Export.PDF.NativePDF.UsePrintSpec = 'Yes'
dts_1.Object.DataWindow.Export.PDF.Method = NativePDF!
dts_1.Object.DataWindow.Export.PDF.NativePDF.PDFStandard = '3' //PDF/A-3a

but this method failed as well (couldn't even change the page orientation).

While exporting, with the same settings, a Free Form datawindow does actually exports in a valid format; for reference tests were done on this online validation tool.

Is there a way to actually achieve generating a valid PDF/A-3a from a Rich Text?

Thank you in advance,

Accepted Answer
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Thursday, 4 November 2021 09:05 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Adrijan,

 

Thanks for reporting this problem.

The Rich Text DW or Rich Text control currently does not support the various PDF options, such as NativePDF.PDFStandard property setting. We will record this as an enhancement request.

 

Regards,

Comment
There are no comments made yet.
P Laceholder Accepted Answer Pending Moderation
  1. Tuesday, 2 November 2021 11:31 AM UTC
  2. PowerBuilder
  3. # 1

Hello,

Thank you very much for the fast response; I just tried exporting the PDF in all 4 of the (text) encoding options (ANSI, UTF8, 16LE, 16BE).

rte_1.SaveDocument("Test ANSI.pdf", FileTypePDF!, EncodingANSI!)
rte_1.SaveDocument("Test UTF8.pdf", FileTypePDF!, EncodingUTF8!)
rte_1.SaveDocument("Test UTF16LE.pdf", FileTypePDF!, EncodingUTF16LE!)
rte_1.SaveDocument("Test UTF16BE.pdf", FileTypePDF!, EncodingUTF16BE!)

It seems to always be exporting it compliant to PDF 1.4 (PDF/A-1); while what I need is PDF/A-3, more reference can be found here.

Best regards,

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 2 November 2021 14:12 PM UTC
Hi Adrijan .... Yes, the RTE control SaveDocument() command currently only supports PDF/A-1. The DW route should work (if not, please open a support ticket). The other alternative would be to use an external PDF printer to PDF software like PrimoPDF (as as one example) to accomplish the PDF/A-3 formatting.
  1. Helpful 1
  1. P Laceholder
  2. Tuesday, 2 November 2021 14:14 PM UTC
>The other alternative would be to use an external PDF printer

One of the reasons why we moved to Powerbuilder 2019 is because of the NativePDF functionality, and would gladly avoid dealing with external software (in our case: Bullzip PDF printer)

>The DW route should work (if not, please open a support ticket).

It did not work so I guess I will be opening a support ticket; thank you very much for the help
  1. Helpful
  1. Andreas Mykonios
  2. Tuesday, 2 November 2021 16:13 PM UTC
I guess it didn't work beacause you datawindow is a rte datawindow...
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 2 November 2021 11:16 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

The rte also has the : rtename.SaveDocument ( filename {, filetype {, encoding }} )

function, but there's no information at all on which standard it uses.
At least, I couldn't find it.

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.