Has there been any change in the way multiple PDFs are concatenated into a single one in the recent Aspose PDF libraries? I just updated my library to aspose.pdf-10.6.2.jar and it doesnt seem to be working.
My code below,
PdfFileEditor pdfEditor = new PdfFileEditor();
com.aspose.pdf.Document targetDoc = new com.aspose.pdf.Document();
com.aspose.pdf.Document[] docs = new com.aspose.pdf.Document[frameCounter];
for(int i=0; i<frameCounter; i++)
{
com.aspose.pdf.Document attachmentDoc = new com.aspose.pdf.Document(<>);
docs[i] = attachmentDoc;
}
pdfEditor.concatenate(docs, targetDoc); //concatenate all tiff pdf into the attachment pdf document
targetDoc.save(attachmentDocName);
I was looking at the examples and I found this but only for 2 PDFs.
Has there been any change in the way multiple PDFs are concatenated into a single one in the recent Aspose PDF libraries? I just updated my library to aspose.pdf-10.6.2.jar and it doesn’t seem to be working.
My code below:
PdfFileEditor pdfEditor = new PdfFileEditor();
com.aspose.pdf.Document targetDoc = new com.aspose.pdf.Document();
com.aspose.pdf.Document[] docs = new com.aspose.pdf.Document[frameCounter];
for(int i=0; i<frameCounter; i++) {
com.aspose.pdf.Document attachmentDoc = new com.aspose.pdf.Document(<<PDFs path>>);
docs[i] = attachmentDoc;
}
pdfEditor.concatenate(docs, targetDoc);
targetDoc.save(attachmentDocName);
I was looking at the examples and I found this but only for 2 PDFs. Concatenate PDF Files
Please note there is no change in concatenation feature of API. I have tested your shared code with both 10.6.1 and latest release 10.9.0 without any issue. We will appreciate it if you please share some more details about the issue faced, so we will look into it and guide you accordingly.
Itsak26:
I was looking at the examples and I found this but only for 2 PDFs. Concatenate PDF Files
In reference to DOM approach of concatenation, it is not limited to two PDFs. You can concatenate as many files as you wish and your system resources allow.
com.aspose.pdf.Document targetDoc = new com.aspose.pdf.Document();
com.aspose.pdf.Document[] docs = new com.aspose.pdf.Document[4];
for(int i=0; i<4; i++) {
com.aspose.pdf.Document attachmentDoc =
new com.aspose.pdf.Document(myDir+"HelloWorld.pdf");
docs[i]=attachmentDoc;
}
for(int j=0; j<docs.length; j++) {
targetDoc.getPages().add(docs[j].getPages());
}
targetDoc.save(myDir+"merged.pdf");
Please feel free to contact us for any further assistance.
The issue seems to be with licensing. After updating the library, license gets invalid. I have raised that in the forum and being looked at. Will try once licensing issue is resolved and let you know the outcome.
Just curious, in which timezone does the Aspose support team work?
Thanks for your feedback. Sure, we will update you as soon as your license related ticket is resolved then you can test the scenario and share the results.
Furthermore in reference to timezone, different team members of Aspose works in different time-zones.
The issue seems to be with licensing. After updating the library, license gets invalid. I have raised that in the forum and being looked at. Will try once licensing issue is resolved and let you know the outcome.
Hi Wasim,
Please take your time and we will be waiting for further updates from your side.
Itsak26:
Just curious, in which timezone does the Aspose support team work?
The support team works in different times zones but most of the team is available from 8:00 (Greenwich Meantime + 5) till 23:00 (GMT + 5).
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.