Skip to main content
August 28, 2009
Question

CFDOCUMENT - Inconsistent Font Style Output

  • August 28, 2009
  • 4 replies
  • 2065 views

I have two examples to show.

When using the font: TIMES, bold tags wrapped around text inside the paragraph show correctly. Using any other font other than TIMES puts unnecessary spacing before and after the text that is wrapped with <B></B> tags or any other tags for that matter.

I have tried using SPAN and DIV tags with STYLE assignments as well. Same issue, works with TIMES, any other font it fails.

You output the same into a browser, outputs perfectly no matter what the font is.

Any fix for this?

http://www.kirbydata.com/arialpdf.cfm (bad spacing)

http://www.kirbydata.com/timespdf.cfm (same code as above but spaces correctly)

This topic has been closed for replies.

4 replies

August 31, 2009

I was just being facetious! Anything I can do to better this program, Im in.

As far as having trouble posting the bug, the bug center would not log me in using my username/password. Dont know whats going on there.

Thanks for everyones help, and hopefully we will have a HOTFIX for this by this evening?!?!? Probally not...

Chuck

Inspiring
September 1, 2009

One needs to use one's Adobe site login for the bug tracker, not the forums login.

I strongly doubt this will get treated as a hotfix.  However CF9 is under development @ present, so it might get looked at for that.  There have been a few fundamental issues with <cfdocument> which have been around for years without attention, unfortunately, so I would definitely not hold your breath here.

--

Adam

August 31, 2009

Too bad there isnt a prize for finding a bug!!

I have been unsuccessful trying to post this bug on the link provided.

Would someone that has posted bugs before, be able to do this so we might be able to get it fixed.

Thanks.

Chuck

Inspiring
August 31, 2009

What do you mean you've been unsuccessful posting the bug?  IE: are you getting errors or something?

I suppose the prize one gets when finding & raising a bug is the satisfaction that you've done something to improve the language, and help other people out.

But yeah... I'd prefer a beer voucher or something ;-)

--

Adam

Inspiring
August 31, 2009

Oh, and I've raised it for you as http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=79644.

--

Adam

Inspiring
August 29, 2009

I can confirm this - using a variation of BKBK's code - in both CF8 and CF9.

I can't see any pre-existing issue raised to deal with this, perhaps you'd like to raise one (given you're the person who found it, I mean).

http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#

--

Adam

BKBK
Community Expert
Community Expert
August 29, 2009

You might have stumbled on a bug. However, the text you supply needs some pruning.

1) the font tag has been deprecated in the current version of HTML. To set the font, use, for example, the div tag and style attribute.
2) the tag <strong> is preferable to <b>;
3) the tags <html>, <body> are unnecessary;
4) no variables are evaluated, so <cfoutput> is unnecessary.

I would therefore put it all together as follows:


<cfdocument
format="PDF"
backgroundvisible="yes"
fontembed="yes"
orientation="portrait"
pagetype="letter"
pageheight="11"
pagewidth="8.5"
marginbottom=".25"
marginleft=".25"
marginright=".25"
margintop=".25"
unit="in"
scale="100">

<div style="font-family:Arial, Helvetica, sans-serif; font-size:12px">
Lorem ipsum dolor sit amet, <strong>consectetur adipisicing elit</strong>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <strong>Excepteur sint occaecat</strong> cupidatat non proident, sunt in culpa qui officia <strong>deserunt</strong> mollit anim id est laborum.
</div>
</cfdocument>

<cfdocument
format="PDF"
backgroundvisible="yes"
fontembed="yes"
orientation="portrait"
pagetype="letter"
pageheight="11"
pagewidth="8.5"
marginbottom=".25"
marginleft=".25"
marginright=".25"
margintop=".25"
unit="in"
scale="100">

<div style="font-family: 'Times New Roman', Times, serif; font-size: 12px;">
Lorem ipsum dolor sit amet, <strong>consectetur adipisicing elit</strong>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <strong>Excepteur sint occaecat</strong> cupidatat non proident, sunt in culpa qui officia <strong>deserunt</strong> mollit anim id est laborum.

</div>
</cfdocument>

Having said that, I too could see that there is something wrong with the way cfdocument handles the san-serif fonts.