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

CFDocument question

Community Beginner ,
Jan 14, 2010 Jan 14, 2010

I have an application in which users enter information into a form, and then have the ability to output the resulting document to PDF.  I have this all working perfectly using cfdocument, with one exception: there's supposed to be an approval signoff section at the bottom of the first page.

The problem is the resulting document can be 10 to 15 pages long, and there's no way to accurately determine where the first page is going to end (there are several text boxes that allow users to type in an unlimited amount of text).  My first thought was to put the signoff section into the footer, and use the evalAtPrint attribute to only print it on the first page. However, the signoff section is too big to squeeze into the footer without increasing the bottom margin, and the only way I know of to have different margins on different pages is to use cfDocumentSection tags.  The problem with that is a page break is inserted at the end of the section, and because of the unlimited text boxes, there's no way to tell what should be in that first document section.

Any ideas on how I can make this work???

518
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
Community Expert ,
Jan 14, 2010 Jan 14, 2010

Why don't you use <cfdocumentitem type="pagebreak"> to force page-breaks where you want them to be?

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
Community Beginner ,
Jan 14, 2010 Jan 14, 2010

This is a running document with several unlimited text areas and data tables, and it's not supposed to have page breaks in specific places.  Because users can enter as much text and data as they want, there's no way to accurately tell where the first page is going to end, so <cfdocumentitem type="pagebreak"> doesn't really help me.

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
Advisor ,
Jan 14, 2010 Jan 14, 2010
LATEST

You might investigation the option of pushing your data to a PDF form rather than using CFDOCUMENT to create the file.

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-798c.html

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