PoDoFo  1.0.0-dev
Public Member Functions | Friends | List of all members
PoDoFo::PdfPainterTextObject Class Referencefinal

This class describes a manually handled PDF text object (content stream operators surrounded by BT . More...

#include <PdfPainterTextObject.h>

Public Member Functions

void Begin ()
 Begin drawing multiple text strings on a page using a given font object. More...
 
void AddText (const std::string_view &str)
 Draw a string on a page. More...
 
void MoveTo (double x, double y)
 Move position for text drawing on a page. More...
 
void End ()
 End drawing multiple text strings on a page. More...
 

Friends

class PdfPainter
 

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()

The documentation for this class was generated from the following files: