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

CFDOCUMENT - Inconsistent Font Style Output

Guest
Aug 28, 2009 Aug 28, 2009

Copy link to clipboard

Copied

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)

TOPICS
Advanced techniques

Views

1.8K

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 29, 2009 Aug 29, 2009

Copy link to clipboard

Copied

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.

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
LEGEND ,
Aug 29, 2009 Aug 29, 2009

Copy link to clipboard

Copied

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

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
Guest
Aug 30, 2009 Aug 30, 2009

Copy link to clipboard

Copied

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

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
LEGEND ,
Aug 30, 2009 Aug 30, 2009

Copy link to clipboard

Copied

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

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
LEGEND ,
Aug 31, 2009 Aug 31, 2009

Copy link to clipboard

Copied

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

--

Adam

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
Community Expert ,
Aug 31, 2009 Aug 31, 2009

Copy link to clipboard

Copied

a prize for finding a bug!!

The best motivator you can think of for software quality control.

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
Guest
Aug 31, 2009 Aug 31, 2009

Copy link to clipboard

Copied

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

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
LEGEND ,
Aug 31, 2009 Aug 31, 2009

Copy link to clipboard

Copied

LATEST

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

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