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

Public Member Functions

bool __bool__ (self)
 
None __init__ (self, os.PathLike documentPath, PdfParameters params='MR::PdfParameters()')
 
None addImageFromFile (self, os.PathLike imagePath, str caption='', std_vector_std_pair_double_std_string valuesMarks='std::vector< std::pair< double, std::string > >{}')
 
None addText (self, str text, bool isTitle=False)
 
None close (self)
 
float getCursorPosX (self)
 
float getCursorPosY (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 meshlib.mrmeshpy.Pdf.__init__ ( self,
os.PathLike documentPath,
PdfParameters params = 'MR::PdfParameters()' )
Ctor

Member Function Documentation

◆ __bool__()

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

◆ addImageFromFile()

None meshlib.mrmeshpy.Pdf.addImageFromFile ( self,
os.PathLike imagePath,
str caption = '',
std_vector_std_pair_double_std_string valuesMarks = 'std::vector<std::pair<double, std::string>>{}' )
 @brief Add image from file in current cursor position.
 If image bigger than page size, autoscale image to page size.
 Move cursor.
 @param valuesMarks if not empty - add marks under image.
 valuesMarks contains pairs<relative_position, marks_text>.
     relative_position is in range [0., 1.], where 0. - left border of image, 1. - right border
 @param caption if not empty - add caption under marks (if exist) or image.

◆ addText()

None meshlib.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 meshlib.mrmeshpy.Pdf.close ( self)
Save and close document. After this impossible add anything in document

◆ getCursorPosX()

float meshlib.mrmeshpy.Pdf.getCursorPosX ( self)

◆ getCursorPosY()

float meshlib.mrmeshpy.Pdf.getCursorPosY ( self)

◆ newPage()

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

◆ setCursorPosX()

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

◆ setCursorPosY()

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

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