I'm trying to fill in a PDF with query data using ColdFusion. I think it does not have field names. Is there any way I can still use cfpdfformparam
to fill it in?
The PDF was created with LiveCycle and I cannot modify it, it comes from https://www.formulaires.modernisation.gouv.fr/gf/cerfa_10069.do
When I run this on the pdf:
<cfpdf action="getInfo" source="cerfa_10069.pdf" name="PDFInfo">
<cfdump var="#PDFInfo#" >
<cfpdfform source="cerfa_10069.pdf" result="resultStruct" action="read"/>
<cfdump var="#resultStruct#" >
it returns a struct showing
topmostSubform
struct
Champ_de_texte1
array
1 N° 10069*04
2 [empty string]
3 [empty string]
4 [empty string]
with 24 fields unnamed but numbered. If I could figure out the order of the fields, could I fill them in using just the number? But this below does not work:
<cfpdfsubform name="topmostSubform">
<cfpdfsubform name="Champ_de_texte1">
<cfpdfformparam name="17" value="572 Evergreen Terrace">
</cfpdfsubform>
</cfpdfsubform>
I only need to fill in the PDF's form fields with data, not submit the form.
Use the
index
attribute of cfpdfformparam: