Welcome Guest Search | Active Topics | Sign In | Register

Exact font sizes i pdf document required Options
MicroTech
Posted: Thursday, September 19, 2013 4:00:39 AM
Rank: Newbie
Groups: Member

Joined: 9/16/2010
Posts: 9
Hi

If I take the following html:
<p style="font-family:Arial; font-size: 7pt">7 pt arial</p>
<p style="font-family:Arial; font-size: 10pt">10 pt arial</p>
and convert it to pdf, and check the font sizes i the generated pdf-document, I get the following font sizes:
6,75
9,75

I have also tried your free HTML to PDF tool, with the same result.

How do I get the specified font sizes in the pdf-document

Best regards

Ole
eo_support
Posted: Thursday, September 19, 2013 12:29:24 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

There is no way to get precise font size through HTML to PDF converter. The reason is HTML to PDF converter generates the same output as it would appear on the screen --- which is a pixel based device at a different resolution. The reason that you get 6.75 is as follow:

1. One point stands for 1/72 inch. So 7 point is converted into inches as 7/72 = 0.0972 inch;
2. On a typical Windows screen, which has a resolution of 96 pixels/inch, this means 0.0972 * 96 = 9.33 pixels;

In order to display the text clearly on the screen, this 9.33 pixels must be rounded to 9 pixels. If you convert 9 pixels back to point, you will get 6.75 point.

I believe the PDF Creator interface (ACM interface) does allow you to precisely specify font size because it outputs to PDF directly. However the HTML to PDF converter can't because it has to produce the same output for both screen and PDF (so that the PDF will look exactly the same as what they see on screen, which is the primary goal of the HTML to PDF converter).

Hope this helps.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.