ahausladen / PdfiumLib

PDF VCL Control using PDFium
Mozilla Public License 2.0
169 stars 62 forks source link

How to fill fields in a PDF with forms? #45

Open niloblack opened 1 month ago

niloblack commented 1 month ago

I'm trying to use "FPDFAnnot_SetStringValue" but without success :'(.

Can anyone help me?

The output file is generated, but with the form fields blank.

image

ahausladen commented 1 month ago

A FPDFPage_GenerateContent(Page); may help before calling FPDF_ClosePage.

// Before you save the page to a file, or reload the page, you must call
// |FPDFPage_GenerateContent| or any changes to |page| will be lost.
FPDFPage_GenerateContent: function(page: FPDF_PAGE): FPDF_BOOL
niloblack commented 1 month ago

Thanks for the quick response, I'll try it now!

niloblack commented 1 month ago

Unsuccessful 🙁.

I'll leave my code to make it easier:

TestPDFium.zip