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

cfdocument with cfpdfform - odd behavior

Explorer ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

I'm trying to create a pdf that display some content from HTML and then includes a pdf form file, and I am experiencing two odd things:

1. The content in the cfdocumentsection above the cfpdfform tag does not show up in the pdf. All I see is the pdf form.

2. If I try to save the cfdocument using the filename attribute, it doesn't work. The file is not created and the pdf form displays in the browser. If I remove the cfpdfform tag, then the file is created and I see the content from the cfdocumentsection in the result.

Anyone have any ideas what is going wrong? The code looks like this:

<cfdocument format="pdf">
    <cfdocumentsection>
    <H2>PDF Form</H2>
    </cfdocumentsection>
    <cfpdfform action="populate" source="#request.path.file_directory##attributes.fileid#.pdf" xmldata="#setInputXMLRet.result#" overwritedata="true">
    </cfpdfform>
</cfdocument>

Thanks.

TOPICS
Advanced techniques

Views

1.1K

Translate

Translate

Report

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
Community Beginner ,
Nov 16, 2011 Nov 16, 2011

Copy link to clipboard

Copied

Did you ever resolve this?

Sorry for ressurecting an old thread, but I'm having *exactly* the same issue.

Votes

Translate

Translate

Report

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
Explorer ,
Nov 16, 2011 Nov 16, 2011

Copy link to clipboard

Copied

Nope I never did.

Votes

Translate

Translate

Report

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 ,
Nov 16, 2011 Nov 16, 2011

Copy link to clipboard

Copied

It works for me with CF9.0.1.

Which version are you using? Does the cfpdfform action work independently? Did you check the log files for errors?

 

-Leigh

Votes

Translate

Translate

Report

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
Community Beginner ,
Nov 16, 2011 Nov 16, 2011

Copy link to clipboard

Copied

There's nothing in the logs.

I'm using CF9.0.1 on RHEL.

Is your pdf form created using LiveCycle Designer? I'm begging to think that might have something to do with it...

EDIT: My main issue is that the form "takes over" the PDF. All I get is the form. For example, the following code:

<cfdocument format="PDF">

    <cfdocumentsection>

          <h1>Test</h1>

    </cfdocumentsection>

    <cfpdfform

        action = "populate"

        source = "form.pdf"

        >

    </cfpdfform>

    <cfdocumentsection>

        <h1>Test</h1>

    </cfdocumentsection>

</cfdocument>


All I get is the form, no header, no footer - just one page which is the PDF form.

Votes

Translate

Translate

Report

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
Community Beginner ,
Nov 16, 2011 Nov 16, 2011

Copy link to clipboard

Copied

http://tom-miller.co.uk/tmp/form.pdf

There's the PDF I'm using, created using LiveCycle designer.

Votes

Translate

Translate

Report

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 ,
Nov 16, 2011 Nov 16, 2011

Copy link to clipboard

Copied

Is your pdf form created using LiveCycle Designer?

Nope.

EDIT: My main issue is that the form "takes over" the PDF. All I get is the form. For example, the following code:

Ah, okay. (I misread the original issue) I do not know the reason, but I can at least confirm the same result on windows. So it does seem related to the form type. If you use a static acroform it works.

-Leigh

Votes

Translate

Translate

Report

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
Advocate ,
Nov 16, 2011 Nov 16, 2011

Copy link to clipboard

Copied

LATEST

Have you tried opening up your PDF form in acrobat and saving it with backwards compatability with a previous version?  Sometimes that can make a difference.  Alternatively, you could test accomplishing the same thing using iText.

Votes

Translate

Translate

Report

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
Documentation