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) |
Generated from: MR::Pdf Class for simple creation pdf.
None meshlib.mrmeshpy.Pdf.__init__ | ( | self, | |
os.PathLike | documentPath, | ||
PdfParameters | params = 'MR::PdfParameters()' ) |
Ctor
bool meshlib.mrmeshpy.Pdf.__bool__ | ( | self | ) |
Checking the ability to work with a document
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.
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
None meshlib.mrmeshpy.Pdf.close | ( | self | ) |
Save and close document. After this impossible add anything in document
float meshlib.mrmeshpy.Pdf.getCursorPosX | ( | self | ) |
float meshlib.mrmeshpy.Pdf.getCursorPosY | ( | self | ) |
None meshlib.mrmeshpy.Pdf.newPage | ( | self | ) |
Add new pageand move cursor on it
None meshlib.mrmeshpy.Pdf.setCursorPosX | ( | self, | |
float | posX ) |
None meshlib.mrmeshpy.Pdf.setCursorPosY | ( | self, | |
float | posY ) |