We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert Dynamic XFA to Standard Acroform and merge PDFs using Aspose.PDF for .NET

I am going to merge two PDFs, but the return value is false


Following in my code

List inputFiles = new List();
inputFiles.Add(“pdf1.pdf”);
inputFiles.Add(“pdf2.pdf”);
string outputFile = “pdf3.pdf”;

Aspose.Pdf.Kit.PdfFileEditor pdfEd = new Aspose.Pdf.Kit.PdfFileEditor();
bool result = pdfEd.Concatenate(inputFiles.ToArray(), outputFile);

The result is false. and the merged pdf is 0kb. Could you give me some suggestion? My .net framework in 4.0.

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using Aspose.Pdf.Kit;


The version of Aspose.PdfKit is 6.0.0.0. I also refer to help document http://www.aspose.com/docs/display/pdfnet/Concatenate+Array+of+PDF+Files+Using+File+Paths+(Facades)
It also does not work.

Hi Bob,


Thanks for your inquiry. You are using a quite older version of Aspose.Pdf for .NET. Please download and try latest version for Aspose.Pdf for .NET i.e. 9.1.0. Hopefully it will help you to fix the issue. If issue persist then please share your sample PDF documents here, so we will test the scenario at our end and will provide you information accordingly.

We are sorry for the inconvenience.

Best Regards,

Hi Bob,


Adding more to Tilal’s comments, please note that Aspose.Pdf.Kit for .NET has been discontinued as separate product since July-2011 and all its classes and enumerations are moved under Aspose.Pdf.Facacdes namespace of Aspose.Pdf for .NET. All the new fixes and new features will be introduced in latest Merged API of Aspose.Pdf for .NET.

For further information, please visit Migration from Aspose.Pdf.Kit

Thanks for your replay.


Our application AMS is using same assembly. It can successfully merged 2 PDF files. I copy the same code into my simplified sample application. It does not work. I don’t know what’s wrong with it.

Is there any additional configuration? or using?

After I change the order of PDFs, it works. It’s strange. However, when I try to open the merged PDF, it pop up a message “There was an error opening this document. Access denied”.


Do you know what’s wrong with it?
Hi Bob,

Bobwang:

Our application AMS is using same assembly. It can successfully merged 2 PDF files. I copy the same code into my simplified sample application. It does not work. I don't know what's wrong with it.

Is there any additional configuration? or using?

Thanks for your feedback. No API does not need any extra configuration. Same code should work.

Best Regards,
Hi Bob,

Bobwang:
After I change the order of PDFs, it works. It's strange. However, when I try to open the merged PDF, it pop up a message "There was an error opening this document. Access denied".

Do you know what's wrong with it?

Thanks for your inquiry. We will appreciate if you please share your sample documents here, as it seems your issue relates to file specific issue. In past our API was not supporting merger of XFA forms but in updated release we first convert XFA form to standard AcroForm and later merge the documents. However, we can suggest you exactly after looking into your source documents.

We are sorry for the inconvenience caused.

Best Regards,

Please see my attached project. It can not merge my PDFs if we set current order. If you know how to fix it, please let me know. Thanks a lot in advance.


Hi Bob,


Thanks for sharing sample project. We have tested the scenario using Aspose.Pdf for .NET 9.1.0 with Aspose.Pdf.Facades package instead Aspose.Pdf.Kit and I am afraid we are unable to replicate the issue even changing order of sourced files does not show any issue. Please download and add reference of Aspose.Pdf for .NET 9.1.0 dll it will fix the issue.

Best Regards,

Thanks for your help. My issue is fixed.

Hi Bob,


Thanks for your feedback. It is good to know that your issue has been resolved.

Please feel free to contact us for any further assistance, we will be more than happy to extend our support.

Best Regards,