Hi All,
When trying to merge multiple PDF files into one, some of the images are cut. In the attached files there are 2 issues:
1- ApprovalInPrincipleCommodity.pdf is the 3rd page of the Merged.pdf. The 2 images are cut.
2- PowerOfAttorney.pdf is the 9th page of Merged.pdf. The image is cut.
Here is the sample code used for converting word files into PDF then merging multiple PDF files into 1.
// Convert Docx to PDF
Document doc = new Document(filePath);
string outputFilePath = Path.GetDirectoryName(filePath) + “\” + Path.GetFileNameWithoutExtension(filePath) + “.pdf”;
doc.Save(outputFilePath, SaveFormat.Pdf);
// Merge PDFs
PdfFileEditor editor = new PdfFileEditor();
editor.Concatenate(filesToMerge.ToArray(), outputFilePath);
Please note that I have tried to merge the Word files first then convert the merged Docx file into PDF but the format was distorted as I have reported in this other thread <a href="https://forum.aspose.com/t/57140
Best regards,
Shehab.
Hi Shehab,
Thanks for using our products.
I have tested the scenario where I have tried concatenating ApprovalInPrincipleCommodity.pdf and PowerOfAttorney.pdf file into a single PDF document using our upcoming release version of Aspose.Pdf for .NET 7.1.0 and I am unable to notice any problem. However when I have tried concatenating PDF files using Aspose.Pdf for .NET 7.0.0, one of the image is being truncated.
Can you please share the source PDF documents which you have generated while converting Word documents into PDF format, so that I can again test the whole scenario. We are sorry for this inconvenience.
Hi Nayyer,
When will Aspose.Pdf 7.1 be released? I would like to try it and see if it solves my problem or not.
Anyway, I have attached a zip file that contains all the wrod files, the converted PDF files and the merged PDF file. The merging sequence is: Application, ApprovalInPrinciple, Contract (2 copies), PromissoryNote then PowerOfAttorney.
Best regards,
Shehab.
Hi Shehab,
Thanks for sharing the resource files.
I am pleased to share that Aspose.Pdf for .NET 7.1.0 has been published and during my testing, when I have tried concatenating all PDF documents into single merged document, I am unable to notice any problem. Please try using the latest release version and in case you encounter the same problem or you have any further query, please feel free to contact. We are sorry for this inconvenience.
For your reference, I have also attached the resultant PDF that I have generated. Please take a look.
Hi Nayyer,
I have tried the latest version of Aspose.Pdf and it is working fine. Thanks a lot for sharing the latest release quickly.
Best regards,
Shehab.
Hi Shehab,
I am glad to hear that your problem is resolved. Please continue using the new release version and in case you encounter the same problem, or in the event of any further query, please feel free to contact.