Merge PDF documents into single file contains both XFA and Acroforms using Aspose.PDF - [Resolved]

@olawinRidwan

We appreciate your cooperation on this.

Shared Visual Studio solution contains several projects and many classes so for efficiency purpose, would you rather create a narrowed down sample application reproducing the problem part so that we may address your concerns well. Please share your kind feedback on our request so that we may proceed accordingly.

Hi @Farhan.Raza,

Could you please explain what you mean by I should create a narrowed down sample application reproducing the problem part? I’m a bit confused as to what you mean.

@olawinRidwan

We mean that shared solution contains several projects and classes thus requesting you to share the minimum possible code that is combining different PDF documents into one so that we may proceed accordingly.

Hi @Farhan.Raza,

So, the least possible shared solution is given below. Be sure to make PdfPackager your startup project and it is very easy to follow the code from program.cs. Also, don’t forget to create the folders as instructed above. When the program starts, use the Aspose.PDF command.

Packager: https://drive.google.com/open?id=1yexiK4ZT799LYw5Zj9Jz6QzYCaF_dYfN

Thanks,

@olawinRidwan

Thank you for sharing requested data.

A ticket with ID PDFNET-46859 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

Thank you so much @Farhan.Raza… I was also hoping to know if there might be an ETA on this.

@olawinRidwan

As the issue has just been logged, it is currently pending for further investigations because of previously logged tickets. Therefore, we are afraid any ETA may not be available yet. We will let you know as soon as any significant update will be available in this regard.

@Farhan.Raza Hi apologies for the multiple series of replies. I wanted to just follow-up to know if possibly this issue has potentially been reproduced on your end?

@olawinRidwan

Thank you for getting back to us.

The issue has been logged after initial investigations and reproduction using the data shared by you. However, it has been logged under free support model and will be investigated on first come first serve basis. Therefore, it may take some months to resolve. As soon as we have some definite updates regarding ticket resolution, we will let you know.

Furthermore, we also offer paid support model where issues are resolved on urgent basis and have priority over the issues logged under free support model. You may check our Paid Support options for your reference.

@Farhan.Raza This is Manoj Kumar from iPipeline. Ridwan was working in my team, I would like to follow-up on this issue and also would like to know more about “paid support”, like what the process is and how much it would cost to get this issue addressed. Please get back to me asap as this issue is critical and we need to address it asap. Thanks for your help with this.

@manoj.ipipeline

Thank you for following up.

The ticket is still pending for investigations and any update is not available yet. Moreover, please create a post at Purchase Forum while sharing your 12 digit order ID so that our sales team can guide you with all further details of Paid Support.

@Farhan.Raza what is 12 digit order ID?

@manoj.ipipeline

In your license file, there should be a 12 digit number between <OrderID></OrderID> tag. This will enable our sales team to guide you better when you contact them as mentioned above.

Thanks, got it, Order ID no is 140227145606. We will contact Sales Team to see if this can be addressed asap.

@manoj.ipipeline

Thank you for your kind feedback.Please proceed accordingly.

We have made payment for license and support, can we now get an ETA when this issue can be addressed. We need it asap.

@manoj.ipipeline

Please request at Paid Support Helpdesk to escalte the priority of PDFNET-46859 so that we may proceed accordingly. If you face any problem while requesting for priority escalation at the Helpdesk, then you may report the problem over Purchase forum.

Hi Farhan,
My name is Cody and I work with Manoj at iPipeline

When I go to the Paid Support Helpdesk, it says that my account isn’t authorized to create a Paid Support Ticket.
For some reason, my account is only associated with order ID 140808135346 which is the old order from 2014.

Can you tell me how I can get my account associated with the most recent order ID so that I can open a Paid Support ticket?

@codymaust1

Kindly contact at Purchase Forum while mentioning your recent order ID, as guided above.

@codymaust1

Please use the following code:

        public void Merge(string[] files, string output)
        {
            Stream[] inputStreams = new Stream[files.Length];
            for (int i = 0; i < files.Length; i++)
            {
                Document doc = new Document(files[i]);
                if (doc.Form.Type != FormType.Standard)
                {
                    doc.Form.Type = FormType.Standard;
                    MemoryStream ms = new MemoryStream();
                    doc.Save(ms);
                    inputStreams[i] = ms;
                }
                else
                {
                    doc = null;
                    inputStreams[i] = new FileStream(files[i], FileMode.Open, FileAccess.ReadWrite);
                }
            }
            PdfFileEditor pfe = new PdfFileEditor();
            pfe.UniqueSuffix = "_%NUM%";
            FileStream outputStream = new FileStream(output, FileMode.Create, FileAccess.ReadWrite);
            pfe.AllowConcatenateExceptions = true;
            pfe.Concatenate(inputStreams, outputStream);
            outputStream.Flush();
            outputStream.Close();
            foreach (Stream stream in inputStreams)
            {
                stream.Close();
            }
        }

This code at first step converts forms to standard type (if required). Resultant documents after conversion to standard form is stored into memory stream, if this take a lot of memory, temporary files may be used.

At first step, resultant documents are concatenated using PdfFileEditor facade. We tested it with bot AcroForms and XFA dynamice form.

Also we tested it for your example document (issues.zip). Please note that for some fields in your documents, names of fields are equal (for example “text1.0”), for this cases PdfFileEditor adds suffix to root field name, i.e. if both documents have fields text1.0, text1.1, text1.2 etc, in concatenated document fields of second document will have form text1_1.0, text1_1.1 etc).

This behavior may be controlled with UniqueSuffix property.