PoDoFo 0.9.20
Public Member Functions | List of all members
PoDoFo::PdfPainterTextObject Class Referencefinal

#include <PdfPainterTextObject.h>

Public Member Functions

void Begin ()
 
void AddText (const std::string_view &str)
 
void MoveTo (double x, double y)
 
void End ()
 

Detailed Description

This class describes a manually handled PDF text object (content stream operators surrounded by BT .. ET) being written to a PdfPainter

Member Function Documentation

◆ AddText()

void PdfPainterTextObject::AddText ( const std::string_view &  str)

Draw a string on a page. You have to call BeginText before the first call of this function and EndText after the last call.

If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.

Parameters
strthe text string which should be printed
See also
SetFont()
MoveTo()
End()

◆ Begin()

void PdfPainterTextObject::Begin ( )

Begin drawing multiple text strings on a page using a given font object. You have to call SetFont before calling this function.

If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.

See also
AddText()
MoveTo()
EndText()

◆ End()

void PdfPainterTextObject::End ( )

End drawing multiple text strings on a page

If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.

See also
Begin()
AddText()
MoveTo()

◆ MoveTo()

void PdfPainterTextObject::MoveTo ( double  x,
double  y 
)

Move position for text drawing on a page. You have to call BeginText before calling this function

If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.

Parameters
xthe x offset relative to pos of BeginText or last MoveTextPos
ythe y offset relative to pos of BeginText or last MoveTextPos
See also
Begin()
AddText()
End()