Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Jun 15, 2020 8:14 pm

Something about this pdf will not allow it to have it's form controls populated by spire pdf.
Can you give me any insight as to why?

I am using Spire PDF .net
I have been able to populate hundreds of pdfs, but this one will not and gives no error or message as to why.

Thanks

dwhaley66
 
Posts: 2
Joined: Mon Jun 15, 2020 8:08 pm

Tue Jun 16, 2020 7:44 am

Hello,

Thanks for your inquiry.
After further investigation, we found that your PDF file contains JavaScript code for resetting the form, as shown below. This causes the populated data to be reset when the document is opened. Please comment out the corresponding code. And I also attached the modified PDF document for your reference.
JavaScript_Code.png


Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Jun 16, 2020 1:27 pm

Thank you very much!

Is there a way from spire to disable pdf scripting?

dwhaley66
 
Posts: 2
Joined: Mon Jun 15, 2020 8:08 pm

Wed Jun 17, 2020 1:39 am

Hello,

Thanks for your feedback.
Sorry to tell you that our Spire.PDF doesn't support this feature as present. But, we are considering adding it to our upgrade list with the ticket SPIREPDF-3345. If we have some definite news regarding its implementation, we will notify you. Sorry for the inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Jan 06, 2022 10:21 am

Hello,

Thanks for your patience!

Glad to inform you that we just released Spire.PDF Pack Version:8.1 which fixes the issue of SPIREPDF-3345.

Please download the fix version from the following links and refer to the following code to test.

Code: Select all
PdfDocument doc = new PdfDocument(@"input.pdf");
doc.RemoveDocumentJavaScript();


Website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/8.1.0

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF