Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sat Aug 05, 2017 1:25 pm

I am trying to find out the size of the font in a PDF so that when it is printed I know it is a readable size. However, when I access the PdfUsedFont.Size property all font sizes are 1 even though the PDF contains multiple different sizes of text. Can you explain to me how I should go about accessing the correct font sizes with this method, or any other way of comparing the size of the text to the size of the page. Below is my console print out for text properties:

Code: Select all
Times New Roman, 1, TrueType, Bold
Times New Roman, 1, TrueType, Regular
Arial, 1, TrueType, Regular
Times New Roman, 1, TrueType, Bold
Times New Roman, 1, TrueType, Regular
Arial, 1, TrueType, Regular
Times New Roman, 1, TrueType, Bold
Times New Roman, 1, TrueType, Regular
Times New Roman, 1, TrueType, Bold
Times New Roman, 1, TrueType, Regular
Arial, 1, TrueType, Regular
Verdana, 1, TrueType, Regular
Times New Roman, 1, TrueType, Bold
Times New Roman, 1, TrueType, Regular

milltownham
 
Posts: 29
Joined: Wed Aug 02, 2017 2:52 pm

Mon Aug 07, 2017 3:36 am

Hello,

Thanks for your inquiry.
To help us with a better investigation, could you please send your sample pdf to us(support@e-iceblue.com)?

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Tue Aug 08, 2017 7:22 am

Hello Thomas,
 
Thank you for sharing your files via email.
After a further investigation, our dev got the root of the issue.
In pdf document, there are two ways for font setting. One is the “TF” command, and the other is to adopt the default font-size 1, and magnify it through matrices.
Interiorly, we got the font information according to the “TF” command. Since all the three documents you provided has no “TF ”command for the font size setting, you will absolutely get the result “1”.
Hope I make it clear.
 
Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.PDF