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

probleme with pagebreak in cfdocument

New Here ,
Jan 28, 2018 Jan 28, 2018

Copy link to clipboard

Copied

I'm trying to generate a multi page pdf. One per record. I'm using div for precise positioning. The result is good for a single record. But if I loop over multiple records (see below) the page break has an odd behaviour.It chops at the beginning of the each page and prints everything on the last one . If I don't use the page break, everything is printed on the first page. What am I missing ?

<cfdocument

        format="pdf"

        pagetype="legal"

        orientation="portrait"

        fontEmbed="true"

        unit="cm"

        localUrl="true"

        saveAsName="recus_impot"

        marginLeft="0"

        margintop="0"

        marginright="0"

        marginbottom="0">

         <style>

        div.verySmall {

          font: 7pt Arial;

          line-height: 12pt;

        }

        div.small {

          font: 8pt Arial;

          line-height: 10pt;

        }

        div.text {

          font: 10pt Arial;

          line-height: 14pt;

        }

        div.title {

          font: 11pt Arial;

          line-height: 14pt;

        }

        div.number {

          font: 18pt Arial;

        }

    </style>

     <cfoutput query="donors">

          <div style="position:relative; top:0mm; left:0mm; width:216mm;">

               <div  class="title" style="position:absolute; top:5mm; left:5mm;">

                RE&Ccedil;U OFFICIEL AUX FINS DE L'IMP&Ocirc;T SUR LE REVENU (Donateur)<br>

               </div>

               <div  class="text" style="position:absolute; top:10mm; left:5mm;">

                     <strong>#organisme.organisme#</strong><br>

                      #organisme.adresse#, #organisme.ville# (#organisme.province#) #organisme.code_postal#<br>

                       #organisme.telephone#

                 </div>

                   ...

          </div>

          <cfdocumentItem type="pagebreak" />

     </cfoutput>

</cfdocument>

Views

174

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
no replies

Have something to add?

Join the conversation
Resources
Documentation