Text Module
Types
Fields
Functions
Detailed Description
- group a3d_pdf_text_module
Adds text lines in the page.
This module describes the functions and structures that allow you to add Text lines in the page. Text lines can only be added on a page, and cannot be retrieved from an existing page.
Type Documentation
-
enum A3DPDFEFontName
Different predefined fonts.
The PDF format includes a set of 14 standard fonts that can be used without prior definition. HOOPS Publish can set text using the base 14 fonts, even if the fonts do not exist on the local system. These fonts are automatically supported by default by Adobe Reader. Nothing specific is required to display these fonts. The font will be referenced (not embedded), which is an appropriate method for a Base14 font references. Any viewer should be able to display the resulting text, either in the referenced font or in a suitable substitute.
To have the set of characters supported by these fonts, please refer to the PDF norm annex D.2 for latin fonts and D.6 for symbol fonts. Symbol and Zapfindgbats fonts have built-in encodings. Other latin fonts (Times, Courier, Helvetica) are encoded with WinAnsiEncoding.
- Version
4.1
Values:
-
enumerator kA3DPDFFontTimesRoman
Adobe standard Times font, with a normal face.
-
enumerator kA3DPDFFontTimesItalic
Adobe standard Times font, with a italic face.
-
enumerator kA3DPDFFontTimesBold
Adobe standard Times font, with a bold face.
-
enumerator kA3DPDFFontTimesBoldItalic
Adobe standard Times font, with a bold-italic face.
-
enumerator kA3DPDFFontHelvetica
Adobe standard Helvetica font, with a normal face.
-
enumerator kA3DPDFFontHelveticaOblique
Adobe standard Helvetica font, with a italic face.
-
enumerator kA3DPDFFontHelveticaBold
Adobe standard Helvetica font, with a bold face.
-
enumerator kA3DPDFFontHelveticaBoldOblique
Adobe standard Helvetica font, with a bold-italic face.
-
enumerator kA3DPDFFontCourier
Adobe standard Courier font, with a normal face.
-
enumerator kA3DPDFFontCourierOblique
Adobe standard Courier font, with a italic face.
-
enumerator kA3DPDFFontCourierBold
Adobe standard Courier font, with a bold face.
-
enumerator kA3DPDFFontCourierBoldOblique
Adobe standard Courier font, with a bold-italic face.
-
enumerator kA3DPDFFontSymbol
Adobe standard Symbol font.
-
enumerator kA3DPDFFontZapfDingbats
Adobe standard ZapfDingbats font.
-
enum A3DPDFELanguage
Languages supported for text strings.
- Version
5.0
Values:
-
enumerator kA3DPDFASCII
ASCII.
-
enumerator kA3DPDFEastEuropeanRoman
East European Roman.
-
enumerator kA3DPDFCyrillic
Cyrillic.
-
enumerator kA3DPDFGreek
Greek.
-
enumerator kA3DPDFTurkish
Turkish.
-
enumerator kA3DPDFHebrew
Hebrew.
-
enumerator kA3DPDFArabic
Arabic.
-
enumerator kA3DPDFBaltic
Baltic.
-
enumerator kA3DPDFChineseTraditional
Traditional Chinese.
-
enumerator kA3DPDFChineseSimplified
Simplified Chinese.
-
enumerator kA3DPDFJapanese
Japanese.
-
enumerator kA3DPDFKorean
Korean.
-
enumerator kA3DPDFSymbol
Symbols.
-
enumerator kA3DPDFLangAutoDetect
Automatic language detection depending on font used.
-
enum A3DPDFETableTextHorizontalAlign
Horizontal alignements supported for text strings in a table.
- Version
23.0
Values:
-
enumerator kA3DPDFTableAlignHInherit
The alignement is inherited from upper level style.
-
enumerator kA3DPDFTableAlignHLeft
The text is left justified.
-
enumerator kA3DPDFTableAlignHCentered
The text is centered.
-
enumerator kA3DPDFTableAlignHRight
The text is right justified.
-
enum A3DPDFETableTextVerticalAlign
Vertical alignements supported for text strings in a table.
- Version
23.0
Values:
-
enumerator kA3DPDFTableAlignVInherit
The alignement is inherited from upper level style.
-
enumerator kA3DPDFTableAlignVTop
The text is vertically aligned to the top.
-
enumerator kA3DPDFTableAlignVMiddle
The text is vertically centered.
-
enumerator kA3DPDFTableAlignVBottom
The text is vertically aligned to the bottom.
Function Documentation
-
A3DStatus A3DPDFTextCreate(A3DPDFDocument *pDoc, const A3DPDFTextData *pTextData, A3DPDFText **ppText)
Function to create a text object.
The text object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertText.
- Version
4.1
- Parameters:
pDoc – [inout] The Document object to work with.
pTextData – [in] The text parameters.
ppText – [out] The Text object created.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTextCreateEx(A3DPDFDocument *pDoc, const A3DPDFTextDataEx *pTextDataEx, A3DPDFText **ppText)
Function to create a text object with extended fonts and languages.
The text object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertText. If the font can’t be found in the directory C:\Windows\Fonts, then the function returns an A3DPDF_CANNOT_FIND_FONT (-1000016) error.
- Version
5.0
Warning
The initialization function A3DPDFInitializePDFLibAndResourceDirectory must be called before using this function.
- Parameters:
pDoc – [in] The Document object to work with.
pTextDataEx – [in] The text parameters.
ppText – [out] The Text object created.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTextGetWidth(A3DPDFText *pText, A3DDouble *pdSizeH, A3DDouble *pdSizeV)
Function to determine the width of a text string.
The width is returned in same units as the page. It may be horizontal or vertical, depending on the writing style. Thus the returned width has both a horizontal and vertical component. Please note that vertical size is not the height of the text, but the size for a vertical writing type. For most of fonts, the pdSizeV is zero.
- Version
12.0
- Parameters:
pText – [in] The Text object to calculate the size of.
pdSizeH – [out] The horizontal size of the text. Is used if writing style is horizontal.
pdSizeV – [out] The vertical size of the text. Is used if writing style is vertical.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertText(A3DPDFPage *pPage, A3DPDFText *pText, const A3DInt32 iPosLeft, const A3DInt32 iPosBottom)
Function to insert a text in a page.
- Version
4.1
- Parameters:
pPage – [inout] The Page object to work with.
pText – [in] The Text object to insert on the page.
iPosLeft – [in] The x coordinate of the insertion point of the text. The insertion point is the bottom left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
iPosBottom – [in] The y coordinate of the insertion point of the text. The insertion point is the bottom left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
- Return values:
A3D_SUCCESS –
A3DPDF_CANNOT_EMBED_FONT – if the font is protected and cannot be embedded.
- Returns:
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertTextInTable(A3DPDFPage *pPage, A3DPDFTable *pTable, A3DPDFText *pText, A3DInt32 iRowIndex, A3DInt32 iColumnIndex)
Function to insert a text in a table.
See also
- Version
7.2
- Parameters:
pPage – [inout] The Page object to work with.
pTable – [in] The Table object to insert in the table.
pText – [in] The Text object to insert in the table.
iRowIndex – [in] The index of the row of the table’s cell to insert the button (start from 1)
iColumnIndex – [in] The index of the column of the table’s cell to insert the button (start from 1)
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code