58 SPdfDoc(std::string title, std::string creator, std::string author,
unsigned int dpiResolution = 72);
65 static void ErrorHandler(HPDF_STATUS error_no, HPDF_STATUS detail_no,
void *user_data);
66 void SetCharset(std::string charset);
67 void SetPageMode(HPDF_PageMode mode);
68 HPDF_PageMode GetPageMode();
69 void SetPageLayout(HPDF_PageLayout layout);
70 HPDF_PageLayout GetPageLayout();
72 HPDF_Page AddPage(HPDF_PageSizes sizes, HPDF_PageDirection direction);
73 HPDF_Page GetPageByIndex(HPDF_UINT index);
75 float GetPageWidth(HPDF_Page page);
76 float GetPageHeight(HPDF_Page page);
78 std::string LoadFontTTF(std::string fontpath);
79 void AddPageLabel(HPDF_UINT pagenum, HPDF_PageNumStyle style, HPDF_UINT firstpage, std::string prefix);
80 void AddPageText(HPDF_Page page, std::string text,
float posx,
float posy,
int color, std::string fontname,
float fontsize,
int align,
bool relative =
false);
81 void AddPageBitmap(HPDF_Page page, PtrObjBitmap bitmap,
float posx,
float posy,
float width,
float height,
int align);
82 void AddPageImage(HPDF_Page page, std::string path,
float posx,
float posy,
float width,
float height,
int align);
83 void AddPageRectangle(HPDF_Page page,
float posx,
float posy,
float width,
float height,
float lineWith,
int lineColor,
int fillColor,
bool filled,
int align);
84 void AddPageEllipse(HPDF_Page page,
float posx,
float posy,
float xradius,
float yradius,
float lineWith,
int lineColor,
int fillColor,
bool filled,
int align);
85 void AddPageLine(HPDF_Page page,
float posx,
float posy,
float dstx,
float dsty,
float lineWith,
int lineColor);
87 float GetTextWidth(HPDF_Page page, std::string text, std::string fontname,
float fontsize);
88 void SaveToFile(std::string path);
92 float MmtoDpi(
float value);
93 float DpiToMm(
float value);
94 float DpiScale(
float value);
95 HPDF_Image ConvertBitmap(PtrObjBitmap scolBitmap);
96 HPDF_RGBColor ConvertColor(
int color);
97 void AlignCoords(
int flags,
float pageWidth,
float pageHeight,
float eltWidth,
float eltHeight,
float &x,
float &y);