3#if !defined( __EMSCRIPTEN__) && !defined( MRMESH_NO_PDF )
66 const std::vector<std::pair<double, std::string>>& valuesMarks = {} );
80 operator bool()
const {
return state_.document != 0; };
85 HPDF_Doc document =
nullptr;
86 HPDF_Page activePage =
nullptr;
87 HPDF_Font activeFont =
nullptr;
91 std::filesystem::path filename_;
93 PdfParameters params_;
95 HPDF_REAL cursorX_ = 0;
96 HPDF_REAL cursorY_ = 0;
98 bool checkDocument()
const {
return state_.document && state_.activePage; };
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Pdf(const Pdf &rhs)=delete
MRMESH_API ~Pdf()
Dtor. Automatically do close.
float getCursorPosY() const
Definition MRPdf.h:77
MRMESH_API Pdf & operator=(Pdf other) noexcept
float getCursorPosX() const
Definition MRPdf.h:76
MRMESH_API void addImageFromFile(const std::filesystem::path &imagePath, const std::string &caption={}, const std::vector< std::pair< double, std::string > > &valuesMarks={})
Add image from file in current cursor position. If image bigger than page size, autoscale image to pa...
void setCursorPosY(HPDF_REAL posY)
Definition MRPdf.h:75
MRMESH_API Pdf(const std::filesystem::path &documentPath, const PdfParameters ¶ms=PdfParameters())
Ctor.
void setCursorPosX(HPDF_REAL posX)
Definition MRPdf.h:74
MRMESH_API Pdf(Pdf &&other) noexcept
MRMESH_API void newPage()
Add new pageand move cursor on it.
MRMESH_API void addText(const std::string &text, bool isTitle=false)
MRMESH_API void close()
Save and close document. After this impossible add anything in document.
Definition MRCameraOrientationPlugin.h:7
Parameters of document style.
Definition MRPdf.h:15
HPDF_REAL textSize
Definition MRPdf.h:17
std::string fontName
Font name list of available fonts: Courier (-Bold, -Oblique, -BoldOblique) Helvetica (-Bold,...
Definition MRPdf.h:27
HPDF_REAL titleSize
Definition MRPdf.h:16