tracker issue : CF-4196700

select a category, or use search below
(searches all categories and all time range)
Title:

CFHTMLTOPDF page-break-after:always not working

| View in Tracker

Status/Resolution/Reason: Needs Review//ThirdParty

Reporter/Name(from Bugbase): Lisa Y. / Lisa Y. (Y. Lisa)

Created: 10/19/2016

Components: Document Management

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7 SP1 64-bit

Vote Count: 8

Problem Description:
The CSS rule page-break-after:always does not work with CFHTMLTOPDF. This CSS rule is used to create page-breaks in HTML pages. We have over 4 billion static HTML documents which clients can easily view in PDF format using CFDOCUMENT, but we cannot yet switch to CFHTMLTOPDF to improve server performance due to this bug. 

Steps to Reproduce:
<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))#">

Actual Result:
PDF file does not have a page break.

Expected Result:
Expected PDF file to have 2 pages, "blah" on first page, and "blah blah" on the second page. 

Any Workarounds:
None.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4196700

External Customer Info:
External Company:  
External Customer Name: Y. Lisa
External Customer Email:  
External Test Config: My Hardware and Environment details:

CF11 Update 7, JRE 1.8.0_101

Windows 7 SP1

Attachments:

Comments:

CFHTMLTOPDF is advertised as a new feature that "generates 'high quality' content" but if it cannot even generate content formatting properly, even something as simple as a page breaking method, what then is the point?
Comment by External U.
1617 | October 19, 2016 02:25:30 AM GMT
Just a small fix to the function CFHTMLTOPDF.
Vote by External U.
1620 | October 20, 2016 09:40:09 AM GMT
We are using a third party library for the htmltopdf service and it has a limitation for a few css attributes. We will pass this information to the third party team, but cannot guarantee an immediate fix.
Comment by Kailash B.
1618 | October 21, 2016 12:20:26 AM GMT
i do not expect a Next-Day-Fix, but an idea of when this will be fix would be greatly appreciated.
Comment by External U.
1619 | November 08, 2016 10:26:36 AM GMT