Skip to main content
Participant
June 13, 2022
Question

PDF edition with certificate on it.

  • June 13, 2022
  • 2 replies
  • 270 views

Hi There,

 

My name is Gabriel, and I would like to know if you can help me with the next problem. 

 

Problem: I have a PDF file that is signed by the proprietary using certificate. This PDF contains a bunch of fields regarding applicants that I need to complete automatically (automate).

 

I would like to know if anyone knows any application or developer that can write an application where you can pull the data from a database (could be mysql), and complete the form automatically.

 

I tried to open the PDF file with Python, and I was unable to going in because the security restrictions.

 

The only way that I can complete this PDF file is under Adobe Acrobat Reader. My job is try to automate the process.

 

If you know somebody that can performs the job, I really appreciate.

 

Thank you.

This topic has been closed for replies.

2 replies

MikelKlink
Participating Frequently
June 14, 2022

You say

quote

The only way that I can complete this PDF file is under Adobe Acrobat Reader. My job is try to automate the process.

Thus, it is possible in principle to fill in that bunch of fields. And then it also is possible to do so automatically.

 

How exactly do you complete the file in Adobe Acrobat Reader? Can you simply select the field and start writing? Or do you use some free text tool?
In the former case there appears to be a form definition in the PDF. The follow-up question would be whether it's an AcroForm or an XFA form definition (or a hybrid).

 

If it's a pure XFA form, the options are few. XFA use in PDFs has been deprecated for 5 years but still is used, in particular by governmental organizations. Many PDF libraries don't support XFA because of the deprecation, because it's somewhat alien to the rest of PDF structures, and because its publicly available documentation is incomplete.

If it's a hybrid AcroForm/XFA form, you had best throw away the XFA part and continue as for pure AcroForm forms.

If it's a pure AcroFormform, most PDF libraries support form fill-in.

If it's merely the appearance of a form and you fill-in using free text tools, that's also something many PDF libraries offer.

 

There appear to be two complications, a certification signature and encryption (with the default password).

To not break the certification signature, you need a PDF library that supports saving changes as incremental updates.

To handle the encryption, you need a PDF library that handles the encryption type used in your PDF. 

I assume you would have told us if there was a custom decryption module installed in your Acrobat Reader required to open the PDF in question. Thus, I assume a standard encryption type to be used.

 

Not all PDF libraries support incremental updates, and not all PDF libraries support all standard encryption types. But there are still many that support both incremental updates and all standard encryption types.

 

TL;DR: Analyze exactly which form type and which encryption is used in your file and then look for a matching PDF library. Or ask some developers specialized on PDFs to do that for you. There are some, and companies specialized on PDF development are easy to google.

try67
Community Expert
Community Expert
June 13, 2022

If the file is already certified you won't be able to do it, as that would break the digital signature that's applied to it.

You need to first import the data (in a process called Mail Merge) and then sign the file. If you're interested in a professional developer creating such a tool for you (either within Acrobat or as a stand-alone application), feel free to contact me privately to discuss it further.