Skip to main content
Participant
October 18, 2009
Question

flatten pdf in one scoop?

  • October 18, 2009
  • 1 reply
  • 4573 views

Hi

I'm new to cf, and wanting to flatten a form created from Acrobat. I tried to combine the code so it writes out the file once, but ran into the problem that cfpdfform doesn't flatten the file unless I use cfpdf. But cfpdf doesn't prefill the pdf textfields. I'm sure there's a way, any help or suggestions is greatly appreciated. Thanks in advance.

<cfpdfform action="populate" source="interactiveform.pdf" destination="interactiveform_temp.pdf"  overwrite = "true" >
        <cfpdfformparam name="company" value="ACME INC" />
        <cfpdfformparam name="address" value="123 Main St." />
</cfpdfform>

<cfpdf action="write" source="interactiveform_temp.pdf" destination="interactiveform_flatten.pdf" flatten="yes"  overwrite = "true" >
</cfpdf>

This topic has been closed for replies.

1 reply

Inspiring
October 18, 2009

I tried to combine the code so it writes out the

file once, but ran into the problem that cfpdfform doesn't

flatten the file unless I use cfpdf. But cfpdf doesn't

prefill the pdf textfields.

Yes, you must use two steps to flatten forms. First populate them with cfpdfform and second flatten them with cfpdf.

BUT ... cfpdf does not flatten livecycle forms. Based on what you have described, that is most likely what you are using. Unfortunately, if you want to flatten livecycle forms you must use livecycle. ie You cannot use ColdFusion for this.

-Leigh

Participating Frequently
August 30, 2011

"BUT ... cfpdf does not flatten livecycle forms."

I'd like to mention that this is not entirely correct.

I'm able to populate pdf forms created in LiveCycle Designer (if by 'livecycle' you mean the designer program)

However, it's unclear why, dynamicly inserted images do show up once the pdf form is populated with cfpdfform action="populate" but disapear once flattened (in the 2nd step) with cfpdf action="write" flatten="yes"

Any ideas anyone?  Or is this blocked on purpopse by Adobe?

Inspiring
August 30, 2011

"BUT ... cfpdf does not flatten livecycle forms."

 

I'd like to mention that this is not entirely correct.

I'm able to populate pdf forms created in LiveCycle

Designer (if by 'livecycle' you mean the designer program)

Populating is not the same thing as flattening. AFAIK the restrictions are only on flattening liveCycle forms.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_02.html

"You cannot use the cfpdf tag to flatten forms created in Adobe LiveCycle Designer ES.

"