PDF Documents Cannot Be Merged

Hello,
We are using Aspose.Words .NET v23.7 and are getting an error when merging 2 PDF documents together. The error is “PDF documents cannot be merged. Please contact Aspose.Words support”.

We’re using the Low Code version of the merge, which looks like this:
Aspose.Words.LowCode.Merger.Merge(combinedPdf, new[] { pdf1Path, pdf2Path});

The interesting thing is that if I run this code through the VisualStudio solution, it works fine with the same PDFs. When running it through the deployed application with the same PDFs, we get the error noted above.

Here are the two PDFs in case it’s helpful: 6106f42e-8d29-44b7-860e-0b952f3ad417.pdf (134.0 KB) | f4f849e6-6f47-465a-8643-d9f44011977d.dxf.pdf (592.7 KB)

Any suggestions?

@kgrems Please make sure Aspose.Words.Pdf2Word.dll is deployed. Also, please try opening PDF document using the following code:

Document doc = new Document(@"C:\Temp\in.pdf");

Does it throw any exception?

@alexey.noskov
Aspose.Words.Pdf2Word.dll was referenced in the code’s project, but was not included in the deployment. I forced the include and now all is working again.

Thank you again for your help!

1 Like