Hi,
I know nothing about "Iseries". You will usually need pdfbox and
fontbox, see also the dependencies section on the website. Make sure all
are from the same version.
Can you use other classes? E.g. PDDocument and PDPage?
Try
PDDocument doc = new PDDocument();
PDPage page = new PDPage();
System.out.println(page.getMediaBox());
doc.addPage(page);
doc.close();
Tilman
Am 12.07.2019 um 17:29 schrieb Smitha Thomas (Contractor):
Hi,
I am an Iseries developer , trying to merge two PDFs using the
org.apache.pdfbox.multipdf.PDFMergerUtility
I am getting error which says as below
*/ Java exception "java.lang.NoSuchMethodError: /*
*/ org/apache/pdfbox/multipdf/PDFMergerUtility.setDestinationFileName(Ljav"
/*
*/ when calling method "setDestinationFileName" with signature /*
*/ "(Ljava.lang.String;)V" in class /*
*/ "org.apache.pdfbox.multipdf.PDFMergerUtility". /*
Please let me know is this in any particular .jar.I have downloaded
the JAR files from https://pdfbox.apache.org/download.cgi
cid:image001.png@01D5389C.930946D0
When I am listing methods under the class path below command is for
iseries to list the methods in the classpath
Command used : javap -s org/apache/pdfbox/multipdf/PDFMergerUtility
*_Result _*
*_Method : setDestinationFileName_*
public void setDestinationFileName(java.lang.String);
Signature: (Ljava/lang/String;)V
*_Method : addsource_*
public void addSource(java.io.File) throws java.io.FileNotFoundException;
Signature: (Ljava/io/File;)V
*_Method : mergeDocuments _*
public void mergeDocuments() throws java.io.IOException;
Signature: ()V
I am converting the below source to Iseries methods ,I am able to do
the Instantiating PDFMergerUtility class. All the
methods(addsource,mergeDocuments,setDestinationFileName) under the
class gives same error saying method not found.
cid:image002.png@01D5389C.930946D0
Thanks
Smitha Thomas
------------------------------------------------------------------------
This e-mail message, including any attachments, is for the sole use of
the intended recipient, and may contain material that is privileged or
confidential and legally protected from disclosure. If you are not the
intended recipient or have received this message in error, you are not
authorized to copy, distribute, or otherwise use this message or its
attachments. Please notify the sender immediately by return e-mail and
permanently delete this message and any attachments.