PDFPAGE_BeginText
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method begins a text-related operations block and switches the PDF page to text mode.

Syntax

HRESULT PDFPAGE_BeginText ()
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

This method starts a logical text block and should be called before any text output operators. It is not actually necessary to use this method, since the page will call it automatically when needed.

Example

Switching to Text Mode and Back

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_BeginText;
PDF.PDFPAGE_SetActiveFont('Helvetica', false, false, false, false, 14.0, 0);
PDF.PDFPAGE_TextOut(20, 20, 0.0, 'Text line.');
PDF.PDFPAGE_EndText;
PDF.PDFPAGE_Ellipse(50, 50, 160, 140);
PDF.PDFPAGE_Stroke;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_BeginText();
PDF->PDFPAGE_SetActiveFont("Helvetica", FALSE, FALSE, FALSE, FALSE, 14.0, 0);
PDF->PDFPAGE_TextOut(20, 20, 0.0, "Text line.");
PDF->PDFPAGE_EndText();
PDF->PDFPAGE_Ellipse(50, 50, 160, 140);
PDF->PDFPAGE_Stroke();
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_BeginText();
PDF.PDFPAGE_SetActiveFont("Helvetica", false, false, false, false, 14.0, 0);
PDF.PDFPAGE_TextOut(20, 20, 0.0, "Text line.");
PDF.PDFPAGE_EndText();
PDF.PDFPAGE_Ellipse(50, 50, 160, 140);
PDF.PDFPAGE_Stroke();
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_BeginText
PDF.PDFPAGE_SetActiveFont "Helvetica", False, False, False, False, 14.0, 0
PDF.PDFPAGE_TextOut 20, 20, 0.0, "Text line."
PDF.PDFPAGE_EndText
PDF.PDFPAGE_Ellipse 50, 50, 160, 140
PDF.PDFPAGE_Stroke
PDF.EndDoc

See Also

Reference