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, str caption='', std_vector_std_pair_double_std_string valuesMarks='{}') |
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) |
Static Protected Member Functions | |
_pybind11_conduit_v1_ (*args, **kwargs) | |
Generated from: MR::Pdf Class for simple creation pdf.
None mrmeshpy.Pdf.__init__ | ( | self, | |
os.PathLike | str | bytes | documentPath, | ||
PdfParameters | params = 'MR::PdfParameters()' ) |
Ctor
bool mrmeshpy.Pdf.__bool__ | ( | self | ) |
Checking the ability to work with a document
str mrmeshpy.Pdf.__repr__ | ( | self | ) |
|
staticprotected |
None mrmeshpy.Pdf.addImageFromFile | ( | self, | |
os.PathLike | str | bytes | imagePath, | ||
str | caption = '', | ||
std_vector_std_pair_double_std_string | valuesMarks = '{}' ) |
@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 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 mrmeshpy.Pdf.close | ( | self | ) |
Save and close document. After this impossible add anything in document
float mrmeshpy.Pdf.getCursorPosX | ( | self | ) |
float mrmeshpy.Pdf.getCursorPosY | ( | self | ) |
None mrmeshpy.Pdf.newPage | ( | self | ) |
Add new pageand move cursor on it
None mrmeshpy.Pdf.setCursorPosX | ( | self, | |
float | posX ) |
None mrmeshpy.Pdf.setCursorPosY | ( | self, | |
float | posY ) |