4#ifndef MRIOEXTRAS_NO_PDF
61 MRIOEXTRAS_API
void addText(
const std::string& text,
bool isTitle =
false );
69 MRIOEXTRAS_API
void addTable(
const std::vector<std::pair<std::string, float>>& table );
114 MRIOEXTRAS_API
operator bool()
const;
119 void addText_(
const std::string& text,
const TextParams& params );
122 std::unique_ptr<State> state_;
124 std::filesystem::path filename_;
131 bool checkDocument()
const;
132 void moveCursorToNewLine();
float getCursorPosY() const
Definition MRPdf.h:108
MRIOEXTRAS_API Pdf & operator=(Pdf other) noexcept
float getCursorPosX() const
Definition MRPdf.h:107
MRIOEXTRAS_API void addText(const std::string &text, bool isTitle=false)
void setCursorPosX(float posX)
Definition MRPdf.h:105
MRIOEXTRAS_API void addImageFromFile(const std::filesystem::path &imagePath, const ImageParams ¶ms)
Add image from file in current cursor position. If image bigger than page size, autoscale image to pa...
MRIOEXTRAS_API void newPage()
Add new pageand move cursor on it.
MRIOEXTRAS_API void addPaletteStatsTable(const std::vector< PaletteRowStats > &paletteStats)
MRIOEXTRAS_API Box2f getPageWorkArea() const
MRIOEXTRAS_API Pdf(const std::filesystem::path &documentPath, const PdfParameters ¶ms=PdfParameters())
Ctor.
MRIOEXTRAS_API void addTable(const std::vector< std::pair< std::string, float > > &table)
void setCursorPosY(float posY)
Definition MRPdf.h:106
MRIOEXTRAS_API void close()
Save and close document. After this impossible add anything in document.
MRIOEXTRAS_API Vector2f getPageSize() const
MRIOEXTRAS_API ~Pdf()
Dtor. Automatically do close.
MRIOEXTRAS_API Pdf(Pdf &&other) noexcept
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh/MRColor.h:9
Parameters of document style.
Definition MRPdf.h:21
std::string tableFontName
Definition MRPdf.h:37
float titleSize
Definition MRPdf.h:22
float textSize
Definition MRPdf.h:23
std::string defaultFontName
Font name list of available fonts: Courier (-Bold, -Oblique, -BoldOblique) Helvetica (-Bold,...
Definition MRPdf.h:33
Parameters to adding image from file.
Definition MRPdf.h:82
std::string caption
caption if not empty - add caption under marks (if exist) or image.
Definition MRPdf.h:88
Vector2f size
Definition MRPdf.h:86
bool uniformScaleFromWidth
set height to keep same scale as width scale
Definition MRPdf.h:90
std::string rangeMin
Definition MRPdf.h:74
std::string rangeMax
Definition MRPdf.h:75
Color color
Definition MRPdf.h:73
std::string percent
Definition MRPdf.h:76