1 Reply Latest reply on Oct 12, 2016 12:40 AM by haxtbh

    CFHTMLTOPDF - page breaking with page-break-after does not work

    yui8979 Level 1

      We've recently upgraded our production servers from CF9 to CF11 and are looking into the CFHTMLTOPDF tag to replace the existing CFDOCUMENT.

       

      However, upon testing, CFHTMLTOPDF does not show page-break's correctly with the page-break-after:always CSS rule. See code below :

       

      <cfsavecontent variable="x">

      <html>

         <head>

            <style type="text/css">

               p {page-break-after: always;}

            </style>

         </head>

         <body>

            <p>blah</p>

            <p>blah blah</p>

         </body>

      </html>

      </cfsavecontent>

       

      <cfhtmltopdf name=y pagetype="A4"><cfoutput>#x#</cfoutput></cfhtmltopdf>

      <cfcontent reset="yes" type="application/pdf" variable="#ToBinary(ToBase64(y))#">


      The page breaks show correctly when generating PDF using CFDOCUMENT.

      <cfdocument name=y format="PDF" pagetype="A4"><cfoutput>#x#</cfoutput></cfdocument>

       

      What is the point of CFHTMLTOPDF if it is being advertised as a feature that generates "high quality" content but it cannot even generate content formatting properly? 

       

      Will this bug be fixed in the CFHTMLTOPDF tag?

       

      Tested on : CF11 Update 7 / Windows