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

Possible Bug: ColdFusion 2023 cfhtmltopdfitem Footer Page Number Problem with Formatting

New Here ,
Aug 14, 2024 Aug 14, 2024

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>

Views

94

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 15, 2024 Aug 15, 2024

Copy link to clipboard

Copied

LATEST

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.

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