Unable To Save The XFA Form After ImportXml

We are utilizing ImportXml to fill in the XFA PDF form fields, but we noticed the form is unable to be edited afterward with the message below.
image.png (47.3 KB)

Then, we saw in one of the forum topics to try using RemoveUsageRights from Facades.PdfFileSignature as below.
image.png (5.0 KB)

The form is able to be edited now but is not able to be saved as an editable PDF form. Instead, the form needs to be printed/saved as a PDF but all the forms will be flattened.
image.png (50.9 KB)

Our expectation is to be able to import XML data into XFA PDF forms but also enable the users to edit the form afterward as they please and also be able to be saved into the same form. Is there any way we would be able to achieve this?

@afiq.mazli

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input PDF.
  • Please attach the output PDF file that shows the undesired behavior.
  • Please attach the expected output PDF file that shows the desired behavior.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Please find the requested zipped resources (8.0 MB) as attached.

Let me know if there is anything that I missed.

@afiq.mazli

We can save and edit your PDF files using Adobe writer. Could you please share the PDF editor name you are using?

I am using Adobe Acrobat Reader as below
image.png (14.9 KB)

Does this mean only a certain applications that can edit and save the PDFs?

@afiq.mazli

We have tested again the scenario using your shared PDF files with Adobe Reader 9 Pro and Adobe Writer. We have not found the shared issue.

We are trying to change from using iText, which we have been using for a long time for our PDF processing, to fully using Aspose, which we are currently using with our Words processing. We are trying to replicate the same behavior as iText’s unethicalreading as in [here](https://kb.itextpdf.com/home/it5kb/faq/how-to-read-pdfs-created-with-an-unknown-random-owner-password). However, we cannot find the way to recreate the same behavior using Aspose’s provided methods. May I know if there is any way to achieve this? To be able to edit and save a previously editable and saveable template using the free version of Adobe Acrobat Reader, but seems to lose that privilege after going through ImportXml?

@afiq.mazli

As per our understanding, you are unable to edit or save the form in PDF using iText and PDF is generated by Aspose.PDF. We have logged an investigation ticket as PDFNET-53425 in our issue tracking system. We will inform you once there is an update available on it.

Hi Tahir,

I think we have a bit of a misunderstanding from our last exchange.

What I meant was, currently we are using a component called iText to import data into our XFA PDFs. But going forward we are currently researching whether Aspose.PDF able to achieve the same behavior as iText.

All is okay except some existing permissions/privileges are removed from the document after data is imported into the PDF using ImportXml which causing the outcome documents to be un-editable and un-saveable which is not the case before the import. I am using the free version of Adobe Acrobat Reader.

This behaviour is achievable using iText. The PDF is editable and saveable before the import and also the same after the import. We are wondering can the same behavior be achieved using Aspose.PDF?

We also already tried the method listed here. Although the PDF is already editable afterwards but seems like it is still unable to be saved with the purple information bar on the top of the PDF viewer suggesting to print the PDF to save.

@afiq.mazli

We have got your actual concerns and earlier logged ticket has been updated accordingly. We will let you know in case further progress is made towards its resolution. Please spare us some time.

We are sorry for the inconvenience.

1 Like

Hi @asad.ali,

Any updates?

@afiq.mazli

We are afraid that the earlier logged ticket has not been yet resolved due to other pending issues in the queue. We will let you know once we have some updates in this regard. We apologize for your inconvenience.

Any update on this item?

@afiq.mazli

We are afraid that the ticket has not been yet resolved. You will be notified via this forum thread as soon as some progress is made in this regard. We are sorry for the inconvenience.