Copy link to clipboard
Copied
ColdFusion v. 2023,0,0,330468
The following code works fine unless I try adding bold formatting to the footer. Then it will show "Page 2 of 1" instead of "Page 1 of 1". Does anyone know if this is a bug or if there are limitations on the formatting in the footer? Is there a workaround to get it bold? I've tried using both a CSS class and inline CSS within a <span> tag, as well as using the <b></b> tag, to turn the footer bold, but each option throws the page numbering off in the resultant PDF file.
<cfhtmltopdfitem type="footer" align="center" showonprint="yes" evalAtPrint="true" numberformat="numeric">
<b>Page <cfoutput>#cfhtmltopdf.currentPageNumber# of #cfhtmltopdf.totalPageCount#</cfoutput></b>
</cfhtmltopdfitem>
Copy link to clipboard
Copied
Yes, you might indeed have discovered a bug. I have reproduced it using:
<!---
The footer is "Page 2 of 1" when arbitaryHTMLTagName is, for example, b, span, strong, i, and so on.
Expected is "Page 1 of 1".
Strangely, when the HTML tag is b or i, the footer text is, respectively, in bold or italics, as expected.
--->
<cfhtmltopdf>
<cfoutput>#now()#</cfoutput>
<cfhtmltopdfitem type="footer" evalatprint="true">
<arbitaryHTMLTagName>Page <cfoutput>#cfhtmltopdf.currentPageNumber# of #cfhtmltopdf.totalPageCount#</cfoutput></arbitaryHTMLTagName>
</cfhtmltopdfitem>
</cfhtmltopdf>
I have duly reported a bug: https://tracker.adobe.com/#/view/CF-4223253
Let's see what Adobe's ColdFusion team makes of it.