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

cfpdf font size

Guest
Nov 07, 2011 Nov 07, 2011

All,

I using the "addheader" part of cfpdf (which works fine) and am trying to increase the font size of the header text.  I have successfully been able to change the font family to Arial and make the text bold, but cannot increase the size.  I was able to use <cfsavecontent> like so:

<cfsavecontent variable="headerText">

   <body style="font-family:Arial">

     <b>Hello World</b>

   </body>

</cfsavecontent>

<cfpdf

   action="addheader"

   source="mergedDoc"

   name="myPDF"

   showonprint="yes"

   overwrite="yes"

   text="#headerText#"

   opacity="10"

   topmargin="0.25"

   rightmargin="5">

<cfcontent type="application/pdf" reset="yes" variable="#toBinary(myPDF)#">

I've tried various methods, but it will not increase the size.  Ideas?

1.3K
Translate
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

correct answers 1 Correct answer

Valorous Hero , Nov 07, 2011 Nov 07, 2011

Maybe there is a problem with your css, because adding a font-size should do it:

<cfsavecontent variable="headerText">

    <span style="font-size: 25pt; font-family: Arial;color: #0080ff;font-weight: bold;">

       LARGER TEXT

    </span>

</cfsavecontent>

Translate
Valorous Hero ,
Nov 07, 2011 Nov 07, 2011

Maybe there is a problem with your css, because adding a font-size should do it:

<cfsavecontent variable="headerText">

    <span style="font-size: 25pt; font-family: Arial;color: #0080ff;font-weight: bold;">

       LARGER TEXT

    </span>

</cfsavecontent>

Translate
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
Guest
Nov 07, 2011 Nov 07, 2011

Thanks cfSearching.  I've actually used that code before (minus using font-weight: bold), however, my font-size attribute defaults to px instead of pt (using Dreamweaver CS5.5).  For whatever reason, it would error out each time I tried it; therefore, I assumed it didn't like the font-size attribute itself. 

Looks like cfsavecontent only accepts pt and not px.  You think this is a bug?  I'm gonna do more testing tomorrow before I push to production, but this seems to work. 

Translate
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
Valorous Hero ,
Nov 07, 2011 Nov 07, 2011
LATEST

Just a guess but cfpdf might be using ddx to create the header. IIRC, ddx only supports a subset of elements and css. So maybe it just does not support the unit "px", only ones like "pt".

-Leigh

Translate
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