logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
Paul Rayman Posted: Saturday, September 14, 2019 8:10:32 PM(UTC)
 
Originally Posted by: ESchunk Go to Quoted Post
Thanks Paul. Can you point me something to learn more about the textObject.Matrix properties. (Not sure what a,b,c...f mean).


https://forum.patagames....Matrix-and-How-to-Use-It

Originally Posted by: ESchunk Go to Quoted Post
My approach is to create a new PdfTextObject using an existing font and text object.


You may use original font size and matrix.
Or just call PdfTextObject.Clone();
ESchunk Posted: Thursday, September 12, 2019 10:08:46 AM(UTC)
 
Thanks Paul. Can you point me something to learn more about the textObject.Matrix properties. (Not sure what a,b,c...f mean).

I'm trying to get the height of a character given a particular font and font size. My approach is to create a new PdfTextObject using an existing font and text object. For example,

PdfTextObject.Create("A", 1, 1, textObject.Font, textObject.FontSize);

The problem is the font size of the existing object. Should I be using the "D" property of the matrix to get the font size?

Thanks,

Ted
Paul Rayman Posted: Thursday, September 12, 2019 6:03:54 AM(UTC)
 
In fact, in the provided document, the font size is indeed set to 1.
And the size of the text that you see when rendering, appears as a result of applying the transformation matrix.. Examine the textObject.Matrix property. You will find there a scaling factor equal to exactly 7.56.
ESchunk Posted: Wednesday, September 11, 2019 11:36:07 AM(UTC)
 
I have a pdf file with a custom font. The font size when I look in Acrobat is 7.56. The font size returned by PdfTextObject (or Pdfium.FPDFTextObj_GetFontSize) is 1. Is there a way to get the size of a font when the text was created with a custom font?

Attached is a sample PDF with the issue.

Thanks,

Ted test of font.pdf (14kb) downloaded 27 time(s).