Adds text lines in the page. More...

Data Structures

struct  A3DPDFTextData
 A3DPDFTextData structure. More...
 
struct  A3DPDFTextDataEx
 A3DPDFTextDataEx structure. More...
 

Enumerations

enum  A3DPDFEFontName {
  kA3DPDFFontTimesRoman = 0,
  kA3DPDFFontTimesItalic,
  kA3DPDFFontTimesBold,
  kA3DPDFFontTimesBoldItalic,
  kA3DPDFFontHelvetica,
  kA3DPDFFontHelveticaOblique,
  kA3DPDFFontHelveticaBold,
  kA3DPDFFontHelveticaBoldOblique,
  kA3DPDFFontCourier,
  kA3DPDFFontCourierOblique,
  kA3DPDFFontCourierBold,
  kA3DPDFFontCourierBoldOblique,
  kA3DPDFFontSymbol,
  kA3DPDFFontZapfDingbats
}
 Different predefined fonts. More...
 
enum  A3DPDFELanguage {
  kA3DPDFASCII,
  kA3DPDFEastEuropeanRoman,
  kA3DPDFCyrillic,
  kA3DPDFGreek,
  kA3DPDFTurkish,
  kA3DPDFHebrew,
  kA3DPDFArabic,
  kA3DPDFBaltic,
  kA3DPDFChineseTraditional,
  kA3DPDFChineseSimplified,
  kA3DPDFJapanese,
  kA3DPDFKorean,
  kA3DPDFSymbol,
  kA3DPDFLangAutoDetect
}
 Languages supported for text strings. More...
 
enum  A3DPDFETableTextHorizontalAlign {
  kA3DPDFTableAlignHInherit,
  kA3DPDFTableAlignHLeft,
  kA3DPDFTableAlignHCentered,
  kA3DPDFTableAlignHRight
}
 Horizontal alignements supported for text strings in a table. More...
 
enum  A3DPDFETableTextVerticalAlign {
  kA3DPDFTableAlignVInherit,
  kA3DPDFTableAlignVTop,
  kA3DPDFTableAlignVMiddle,
  kA3DPDFTableAlignVBottom
}
 Vertical alignements supported for text strings in a table. More...
 

Functions

A3DStatus A3DPDFPageInsertText (A3DPDFPage *pPage, A3DPDFText *pText, const A3DInt32 iPosLeft, const A3DInt32 iPosBottom)
 Function to insert a text in a page. More...
 
A3DStatus A3DPDFPageInsertTextInTable (A3DPDFPage *pPage, A3DPDFTable *pTable, A3DPDFText *pText, A3DInt32 iRowIndex, A3DInt32 iColumnIndex)
 Function to insert a text in a table. More...
 
A3DStatus A3DPDFTextCreate (A3DPDFDocument *pDoc, const A3DPDFTextData *pTextData, A3DPDFText **ppText)
 Function to create a text object. More...
 
A3DStatus A3DPDFTextCreateEx (A3DPDFDocument *pDoc, const A3DPDFTextDataEx *pTextDataEx, A3DPDFText **ppText)
 Function to create a text object with extended fonts and languages. More...
 
A3DStatus A3DPDFTextGetWidth (A3DPDFText *pText, A3DDouble *pdSizeH, A3DDouble *pdSizeV)
 Function to determine the width of a text string. More...
 

Detailed Description

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.

Enumeration Type Documentation

◆ 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
Enumerator
kA3DPDFFontTimesRoman 

Adobe standard Times font, with a normal face.

kA3DPDFFontTimesItalic 

Adobe standard Times font, with a italic face.

kA3DPDFFontTimesBold 

Adobe standard Times font, with a bold face.

kA3DPDFFontTimesBoldItalic 

Adobe standard Times font, with a bold-italic face.

kA3DPDFFontHelvetica 

Adobe standard Helvetica font, with a normal face.

kA3DPDFFontHelveticaOblique 

Adobe standard Helvetica font, with a italic face.

kA3DPDFFontHelveticaBold 

Adobe standard Helvetica font, with a bold face.

kA3DPDFFontHelveticaBoldOblique 

Adobe standard Helvetica font, with a bold-italic face.

kA3DPDFFontCourier 

Adobe standard Courier font, with a normal face.

kA3DPDFFontCourierOblique 

Adobe standard Courier font, with a italic face.

kA3DPDFFontCourierBold 

Adobe standard Courier font, with a bold face.

kA3DPDFFontCourierBoldOblique 

Adobe standard Courier font, with a bold-italic face.

kA3DPDFFontSymbol 

Adobe standard Symbol font.

kA3DPDFFontZapfDingbats 

Adobe standard ZapfDingbats font.

◆ A3DPDFELanguage

Languages supported for text strings.

Version
5.0
Enumerator
kA3DPDFASCII 

ASCII.

kA3DPDFEastEuropeanRoman 

East European Roman.

kA3DPDFCyrillic 

Cyrillic.

kA3DPDFGreek 

Greek.

kA3DPDFTurkish 

Turkish.

kA3DPDFHebrew 

Hebrew.

kA3DPDFArabic 

Arabic.

kA3DPDFBaltic 

Baltic.

kA3DPDFChineseTraditional 

Traditional Chinese.

kA3DPDFChineseSimplified 

Simplified Chinese.

kA3DPDFJapanese 

Japanese.

kA3DPDFKorean 

Korean.

kA3DPDFSymbol 

Symbols.

kA3DPDFLangAutoDetect 

Automatic language detection depending on font used.

◆ A3DPDFETableTextHorizontalAlign

Horizontal alignements supported for text strings in a table.

Version
23.0
Enumerator
kA3DPDFTableAlignHInherit 

The alignement is inherited from upper level style.

kA3DPDFTableAlignHLeft 

The text is left justified.

kA3DPDFTableAlignHCentered 

The text is centered.

kA3DPDFTableAlignHRight 

The text is right justified.

◆ A3DPDFETableTextVerticalAlign

Vertical alignements supported for text strings in a table.

Version
23.0
Enumerator
kA3DPDFTableAlignVInherit 

The alignement is inherited from upper level style.

kA3DPDFTableAlignVTop 

The text is vertically aligned to the top.

kA3DPDFTableAlignVMiddle 

The text is vertically centered.

kA3DPDFTableAlignVBottom 

The text is vertically aligned to the bottom.

Function Documentation

◆ A3DPDFTextCreate()

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.

Parameters
[in,out]pDocThe Document object to work with.
[in]pTextDataThe text parameters.
[out]ppTextThe Text object created.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
4.1

◆ A3DPDFTextCreateEx()

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. WARNING: the initialization function A3DPDFInitializePDFLibAndResourceDirectory must be called before using this function.

Parameters
[in]pDocThe Document object to work with.
[in]pTextDataExThe text parameters.
[out]ppTextThe Text object created.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
5.0

◆ A3DPDFTextGetWidth()

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 heigth of the text, but the size for a vertical writing type. For most of fonts, the pdSizeV is zero.

Parameters
[in]pTextThe Text object to calculate the size of.
[out]pdSizeHThe horizontal size of the text. Is used if writing style is horizontal.
[out]pdSizeVThe vertical size of the text. Is used if writing style is vertical.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
12.0

◆ A3DPDFPageInsertText()

A3DStatus A3DPDFPageInsertText ( A3DPDFPage pPage,
A3DPDFText pText,
const A3DInt32  iPosLeft,
const A3DInt32  iPosBottom 
)

Function to insert a text in a page.

Parameters
[in,out]pPageThe Page object to work with.
[in]pTextThe Text object to insert on the page.
[in]iPosLeftThe 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.
[in]iPosBottomThe 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.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
A3DPDF_CANNOT_EMBED_FONTif the font is protected and cannot be embedded.
Version
4.1

◆ A3DPDFPageInsertTextInTable()

A3DStatus A3DPDFPageInsertTextInTable ( A3DPDFPage pPage,
A3DPDFTable pTable,
A3DPDFText pText,
A3DInt32  iRowIndex,
A3DInt32  iColumnIndex 
)

Function to insert a text in a table.

Parameters
[in,out]pPageThe Page object to work with.
[in]pTableThe Table object to insert in the table.
See also
Table Module.
Parameters
[in]pTextThe Text object to insert in the table.
[in]iRowIndexThe index of the row of the table's cell to insert the button (start from 1)
[in]iColumnIndexThe index of the column of the table's cell to insert the button (start from 1)
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
7.2