Skip to main content
October 23, 2009
Answered

Lose interactivity (fillin fields) on CFPDF MERGE

  • October 23, 2009
  • 1 reply
  • 1203 views

Hi guys, doing a standard CFPDF merge using something like:

<cfpdf action="merge" name="builtpdf">
<cfpdfparam source="pdfsource">

        <cfpdfparam source="includes/nlv_affidavit.pdf">
        <cfpdfparam source="includes/mil_regfee_exemption.pdf">
        <cfpdfparam source="includes/mil_regfee_exemption_txt.pdf">
        <cfpdfparam source="includes/nlv_certapp.pdf">
        <cfpdfparam source="includes/mil_checklist.pdf">
  </cfpdf>
<cfcontent type="application/pdf" reset="true" variable="#toBinary(builtpdf)#">

This is working fine, taking the content in "pdfsource" and adding the pages in correct order.

However, I noticed that in my fillable PDF's (3 or them are), 2 have lost their interactivity, and depending on if I change the order (moving a NON fillable PDF to the bottom or not), will change which ones lose interactivity.  They all have proper interactivity if you open the actual files on the server.

Any ideas?  None of the files were created with CFPDF "write" and flattened.

Thanks in advance!

T

This topic has been closed for replies.
Correct answer -__cfSearching__-

I should have been more clear. What I meant was I do not know if it is intended to merge interactive forms and leave them in an iteractive state, because the documentation also says "Note: ColdFusion automatically flattens form fields when you use the merge action of the cfpdf tag.", which is more consistent with the behavior you are describing.

Though having said that, I have learned the hard way not to take the documentation as gospel ;-)   I also use iText a lot more than I do cfpdf, because it provides greater control.

1 reply

Inspiring
October 23, 2009

I could be wrong, but I think the "merge" action is only for documents, not interactive forms.  You can embed pdf forms in a cfdocument or you could also the underlying iText library to merge the forms.

October 23, 2009

I'd agree with you, except that some of the fill-in PDF's DO work after merge, and it varies which work and which don't depending on the order of the cfpdfparam's.  My thought is it's possible, but there has to be something else going on maybe?

According to Adobe's docs:

"You can use the cfpdf tag to assemble interactive PDF form files into a single PDF document and flatten forms created in Acrobat"

-__cfSearching__-Correct answer
Inspiring
October 23, 2009

I should have been more clear. What I meant was I do not know if it is intended to merge interactive forms and leave them in an iteractive state, because the documentation also says "Note: ColdFusion automatically flattens form fields when you use the merge action of the cfpdf tag.", which is more consistent with the behavior you are describing.

Though having said that, I have learned the hard way not to take the documentation as gospel ;-)   I also use iText a lot more than I do cfpdf, because it provides greater control.