MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.Pdf Class Reference

Classes

class  ImageParams
 
class  PaletteRowStats
 

Public Member Functions

bool __bool__ (self)
 
None __init__ (self, os.PathLike|str|bytes documentPath, PdfParameters params='MR::PdfParameters()')
 
str __repr__ (self)
 
None addImageFromFile (self, os.PathLike|str|bytes imagePath, Pdf.ImageParams params)
 
None addPaletteStatsTable (self, std_vector_Pdf_PaletteRowStats paletteStats)
 
None addTable (self, std_vector_std_pair_std_string_float table)
 
None addText (self, str text, bool isTitle=False)
 
None close (self)
 
float getCursorPosX (self)
 
float getCursorPosY (self)
 
Vector2f getPageSize (self)
 
Box2f getPageWorkArea (self)
 
None newPage (self)
 
None setCursorPosX (self, float posX)
 
None setCursorPosY (self, float posY)
 

Detailed Description

Generated from:  MR::Pdf


 Class for simple creation pdf.

Constructor & Destructor Documentation

◆ __init__()

None mrmeshpy.Pdf.__init__ ( self,
os.PathLike | str | bytes documentPath,
PdfParameters params = 'MR::PdfParameters()' )
Ctor

Member Function Documentation

◆ __bool__()

bool mrmeshpy.Pdf.__bool__ ( self)
Checking the ability to work with a document

◆ __repr__()

str mrmeshpy.Pdf.__repr__ ( self)

◆ addImageFromFile()

None mrmeshpy.Pdf.addImageFromFile ( self,
os.PathLike | str | bytes imagePath,
Pdf.ImageParams params )
 @brief Add image from file in current cursor position.
 If image bigger than page size, autoscale image to page size.
 Move cursor.

◆ addPaletteStatsTable()

None mrmeshpy.Pdf.addPaletteStatsTable ( self,
std_vector_Pdf_PaletteRowStats paletteStats )

◆ addTable()

None mrmeshpy.Pdf.addTable ( self,
std_vector_std_pair_std_string_float table )
 Add set of pair string - value in current cursor position.
 Move cursor.
 Box horizontal size is page width without offset.
 Box vertical size is automatically for text.

◆ addText()

None mrmeshpy.Pdf.addText ( self,
str text,
bool isTitle = False )
 Add text block in current cursor position.
 Move cursor.
 Box horizontal size is page width without offset.
 Box vertical size is automatically for text.
 horAlignment = left
 if isTitle - horAlignment = center, use titleFontSize

◆ close()

None mrmeshpy.Pdf.close ( self)
Save and close document. After this impossible add anything in document

◆ getCursorPosX()

float mrmeshpy.Pdf.getCursorPosX ( self)

◆ getCursorPosY()

float mrmeshpy.Pdf.getCursorPosY ( self)

◆ getPageSize()

Vector2f mrmeshpy.Pdf.getPageSize ( self)

◆ getPageWorkArea()

Box2f mrmeshpy.Pdf.getPageWorkArea ( self)

◆ newPage()

None mrmeshpy.Pdf.newPage ( self)
Add new pageand move cursor on it

◆ setCursorPosX()

None mrmeshpy.Pdf.setCursorPosX ( self,
float posX )

◆ setCursorPosY()

None mrmeshpy.Pdf.setCursorPosY ( self,
float posY )

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