Dear All,
I' m using itext 5.5.13.2 api (
https://api.itextpdf.com/iText5/java/5.5.13.2/) to manipulate pdf. I need to set the duplex print option with shortedge flip .
My rpg code is the following. No error is generated but the pdf still remain as simplex. Can someone help me to identify if there is an error in the rpg code
Thank you very much for your help
Basilio
D pdfName_DUPLEXFLIPSHORTEDGE...
D C 'DUPLEXFLIPSHORTEDGE'
D pdfName_DUPLEX...
D C 'DUPLEX'
D ITX5PdfName S O CLASS(*JAVA
D :'com.itextpdf.text.pdf.PdfName')
D ITX5PdfObject S O CLASS(*JAVA
D :'com.itextpdf.text.pdf.PdfObject')
D ITX5_addViewerPreference...
D PR
D ExtProc(*JAVA:
D 'com.itextpdf.text.pdf.PdfWriter':
D 'addViewerPreference')
D pdfNameKey like(ITX5PdfName)
D pdfNameValue like(ITX5PdfObject)
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* new_ITX5PdfName()
* Create a new Ppf Name
*
* Returns the new Pdf Name
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D new_ITX5PdfName...
D PR like(ITX5PdfName)
D ExtProc(*JAVA:
D 'com.itextpdf.text.pdf.PdfName':
D *CONSTRUCTOR)
d testo like(jstring)
Dcl-s pdfNameDuplex like(ITX5PdfName);
Dcl-s pdfNameShortEdge like(ITX5PdfName);
Dcl-s shortedge like(jstring);
Dcl-s duplex like(jstring);
shortedge = new_String(pdfName_DUPLEXFLIPSHORTEDGE);
pdfNameshortedge = new_ITX5PdfName(shortedge);
duplex = new_String(pdfName_DUPLEX);
pdfNameduplex = new_ITX5PdfName(duplex);
ITX5_addViewerPreference(writer:duplex:shortedge);
***********************************************************************************************************
CONFIDENTIALITY NOTICE
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information.
If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to email.security@xxxxxxxxxxxxxxxxx with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. NISSAN EUROPE and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks.
NISSAN EUROPE is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection NISSAN EUROPE does not accept liability.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them.
***********************************************************************************************************
As an Amazon Associate we earn from qualifying purchases.