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

How to Get Font Properties of the text present in the PDF Page

Community Beginner ,
May 28, 2018 May 28, 2018

Copy link to clipboard

Copied

Hi,

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..

Thanks..

TOPICS
Acrobat SDK and JavaScript

Views

935

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
Adobe Employee ,
May 28, 2018 May 28, 2018

Copy link to clipboard

Copied

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.

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 Beginner ,
May 28, 2018 May 28, 2018

Copy link to clipboard

Copied

Thank you for your reply..

I need to extract text Font properties like, Font type, Font size from the PDF Page.

Thanks..

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 ,
May 29, 2018 May 29, 2018

Copy link to clipboard

Copied

What do you mean by “font type” exactly? Do you have Acrobat Pro?

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 Beginner ,
May 29, 2018 May 29, 2018

Copy link to clipboard

Copied

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

Font Size----8,9,10,etc....

Thanks...

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 Beginner ,
May 29, 2018 May 29, 2018

Copy link to clipboard

Copied

I am using PDEFontGetAttrs API to get Font Type and Font Name.

but Font size was not present.

PDEFont pdont = PDETextGetFont(textObject, kPDETextRun, iIndexSubElement);

PDEFontAttrs fontAttrRec;

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..

Thanks...

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 ,
May 29, 2018 May 29, 2018

Copy link to clipboard

Copied

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.

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 Beginner ,
May 29, 2018 May 29, 2018

Copy link to clipboard

Copied

LATEST

Thanks for the Useful Information...

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