Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Retrieves the most important properties of a font.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 5.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
Index | The font index from zero to DynaPDF.GetFontCount. | 0 | |
Selector | Which value to return. Can be Ascent, AvgWidth, BaseEncoding, BaseFont, CapHeight, CharSet, CharSetSize, CIDOrdering, CIDRegistry, CIDSet, CIDSetSize, CIDSupplement, CIDToGIDMap, CMapBuf, CMapBufSize, CMapName, Encoding, FirstChar, FontBBox, Flags, FontBufSize, FontBuffer, FontFamily, FontFilePath, FontFileType, FontName, FontStretch, FontType, FontWeight, FullName, HaveEncoding, HorzWidths, HorzWidthsCount, Imported, ItalicAngle, Lang, LastChar, Leading, Length1, Length2, Length3, MaxWidth, Metadata, MetadataSize, MisWidth, Panose, PostScriptName, SpaceWidth, StemH, StemV, ToUnicode, ToUnicodeSize, VertDefPos, VertWidths, VertWidthsCount, WMode or XHeight. | "FamilyName" | |
FileName | Optional file name for values returned as container values. For CMapBuf and FontBuffer. | "test.dat" | Optional |
Returns value or error.
Get Family Name for first font:
MBS( "DynaPDF.FontInfo"; $pdf; 0; "FamilyName" )
Create records with family name for each font in PDF file:
#Load PDF from container
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromContainer"; $pdf; System Font Info::PDF)]
#import a page
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFFile"; $pdf; 1)]
#List fonts in PDF
Set Variable [$FontCount; Value:MBS("DynaPDF.GetFontCount"; $pdf)]
If [$FontCount > 0]
Set Variable [$index; Value:0]
Loop
#Get values
New Record/Request
Set Field [System Font Info::FontFamily; MBS("DynaPDF.FontInfo"; $pdf; $Index; "FontFamily")]
Commit Records/Requests [Skip data entry validation; No dialog]
#Next
Set Variable [$Index; Value:1 + $Index]
Exit Loop If [$Index >= $FontCount]
End Loop
End If
Query font buffer size:
MBS( "DynaPDF.FontInfo"; $PDF; $Index; "FontBufSize" )
Created 21st March 2015, last changed 23th March 2021
DynaPDF.FlushPagesEx - DynaPDF.FreeTextAnnot
Feedback: Report problem or ask question.