Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Lose interactivity (fillin fields) on CFPDF MERGE

Guest
Oct 23, 2009 Oct 23, 2009

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

TOPICS
Advanced techniques
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Oct 23, 2009 Oct 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

...
Translate
Valorous Hero ,
Oct 23, 2009 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 23, 2009 Oct 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"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 23, 2009 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 23, 2009 Oct 23, 2009

ahhh, I didn't see that..hmm, well I'll start reading the iText docs and see what I can do with that   Thanks for the help!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 23, 2009 Oct 23, 2009
LATEST

IIRC you were using cfdocument to create part of the merged form?  You _might_ also be able to embed the forms in the cfdocument, achieving the same effect as a merge.  I would have to check if that works for embedding empty forms, or just ones you want to populate:

Update:   Scratch that idea.  I just checked an you can only embed one (1) form in a cfdocument.

Message was edited by: -==cfSearching==-

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources