I am using FontGetdata() function, but this function doesn't give any data.
Which function I need use to get font data.
Please Help me..
I don’t know what “FontGetData” is, it’s not part of the Acrobat API set…
What sort of “properties” do you need? IN general, you can use PDDocEnumResources() to get the list of fonts, then use the PDFont APIs to get info about each one.
Thank you for your reply..
I need to extract text Font properties like, Font type, Font size from the PDF Page.
What do you mean by “font type” exactly? Do you have Acrobat Pro?
Thanks for the Reply
I need the Following Font Attributes of the text from the PDF Page.
Font Type-----TrueType or Type1 or Type2 or etc...
Font name----Times New Roman or any other Font
I am using PDEFontGetAttrs API to get Font Type and Font Name.
but Font size was not present.
PDEFont pdont = PDETextGetFont(textObject, kPDETextRun, iIndexSubElement);
PDEFontGetAttrs(pdont, &fontAttrRec, sizeof(fontAttrRec));
strcpy_s(fontName, 100, ASAtomGetString(fontAttrRec.name));
CString csfontName = (CString)fontName;
What i need to do to get Font size of the text..
Ah, PDEFontGetAttrs not FontGetAttrs. So you are already working in a plug-in.
1. PDEFont has no size. It is just the font, and may be used at any size by PDEText elements.
2. PDEText elements do not have a size either but they have a matrix. You must analyse the matrix and decompose it into scaling, rotation and skewing.
Thanks for the Useful Information...