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

When does a page break occur - cfdocument?

New Here ,
Aug 11, 2016 Aug 11, 2016

Copy link to clipboard

Copied

I am looking to see if there is a solution out there using Coldfusion 11:

If a pdf document is created with cfdocument tag, is there a way to tell if/when a page break occurs while the pdf is being created? ...  Keeping in mind the content of the document varies...??  I am not aware of a way to accomplish this so any info would be greatly appreciated...

Thanks

Views

625

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 Expert ,
Aug 11, 2016 Aug 11, 2016

Copy link to clipboard

Copied

LATEST

You could do something like this. Place the cfdocumentitem tag at the top.

<cfset pagecount = 0>

<cfdocument format="PDF">

<cfdocumentitem type= "header">

<cfif cfdocument.currentpagenumber GT pagecount>

     Start of new page: <cfoutput>#cfdocument.currentpagenumber#</cfoutput>

     <cfset pagecount = pagecount+1>

</cfif>

  </cfdocumentitem>

</cfdocument>

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