Skip navigation
Currently Being Moderated

Font's for CFDocument PDF not consistent

Aug 22, 2013 1:38 PM

I have identical CFM file's on 2 different servers which generate a PDF.

 

I use a style tag like this:

<style type="text/css">

td    {

    font-family : Arial;

    color : Black;

    font-style : normal;

    font-weight : normal;

    font-size : 10pt;

    text-decoration : none;

    text-align: center;

    }

th    {

    font-family : Arial;

    color : Black;

    font-style : normal;

    font-weight : normal;

    font-size : 10pt;

    text-decoration : none;

    text-align: center;

    }

td.left    {

    font-family : Arial;

    color : Black;

    font-style : normal;

    font-weight : normal;

    font-size : 10pt;

    text-decoration : none;

    text-align: left;

    }

th.right    {

    font-family : Arial;

    color : Black;

    font-style : normal;

    font-weight : normal;

    font-size : 10pt;

    text-decoration : none;

    text-align: left;

    }

</style>

 

But this displays differently on separate servers.  Why would the font's look different?

 

<table  width="100%" cellpadding="0" cellspacing="0">

    <tr>

        <th class="right">RESERVATION : </th>

        <td class="left"> </td>

    </tr>

</table>

 

Thanks,

Steve

 
Replies
  • Currently Being Moderated
    Dec 13, 2013 8:23 AM   in reply to stevef2023

    I have the same problem.  CF 10.  Does anybody have an answer fo this yet?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2013 8:45 AM   in reply to FBod

    Have you checked the datestamps/file sizes on the Arial font files on both servers to see if they match?  Could one of the fonts be corrupted?

    -Carl V.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2013 9:54 AM   in reply to stevef2023

    The only difference that I note is that in the case where the font is working properly, we are running CF10 Update 10 and the problem server runs CF10 Update 12.  We may downgrade this to Update 10 to see if this makes a difference.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 17, 2013 3:39 PM   in reply to stevef2023

    Since you are running the same version of CF on both servers, I was kind of doubtful about the downgrading option.  In any case, we did and of course, no change.  So, back to the drawing board.  Never actually left it.

    Franz

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 23, 2014 1:44 PM   in reply to stevef2023

    Ok, I have come up with a work-around.  Instead of using pt for the font-size, either use em, px or percent.  This will require a bit (tons) of work for us, but it works the same way on both servers and results in consistent font sizes across the servers.  Therefore, we don't have to maintain two different sets of code.

     

    To facilitate: When I want to use em, I divide the existing pt by 12 and that gives me the corresponding em.  For px, I multiply the existing pt by 1.33.

     

    Hope that helps.  Franz

    Also, take a look at this: http://kyleschaeffer.com/development/css-font-size-em-vs-px-vs-pt-vs/

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points