Myo Scol plugin
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
SPdfDoc Class Reference

#include <sPdf.h>

Public Types

enum  ElementAlign {
  EM_LEFT = 0 , EM_RIGHT = 1 , EM_CENTER = 2 , EM_TOP = 4 ,
  EM_BOTTOM = 8 , EM_MIDDLE = 16
}
 

Public Member Functions

 SPdfDoc (std::string title, std::string creator, std::string author, unsigned int dpiResolution=72)
 
 ~SPdfDoc ()
 
void SetCharset (std::string charset)
 
void SetPageMode (HPDF_PageMode mode)
 
HPDF_PageMode GetPageMode ()
 
void SetPageLayout (HPDF_PageLayout layout)
 
HPDF_PageLayout GetPageLayout ()
 
HPDF_Page AddPage (HPDF_PageSizes sizes, HPDF_PageDirection direction)
 
HPDF_Page GetPageByIndex (HPDF_UINT index)
 
float GetPageWidth (HPDF_Page page)
 
float GetPageHeight (HPDF_Page page)
 
std::string LoadFontTTF (std::string fontpath)
 
void AddPageLabel (HPDF_UINT pagenum, HPDF_PageNumStyle style, HPDF_UINT firstpage, std::string prefix)
 
void AddPageText (HPDF_Page page, std::string text, float posx, float posy, int color, std::string fontname, float fontsize, int align, bool relative=false)
 
void AddPageBitmap (HPDF_Page page, PtrObjBitmap bitmap, float posx, float posy, float width, float height, int align)
 
void AddPageImage (HPDF_Page page, std::string path, float posx, float posy, float width, float height, int align)
 
void AddPageRectangle (HPDF_Page page, float posx, float posy, float width, float height, float lineWith, int lineColor, int fillColor, bool filled, int align)
 
void AddPageEllipse (HPDF_Page page, float posx, float posy, float xradius, float yradius, float lineWith, int lineColor, int fillColor, bool filled, int align)
 
void AddPageLine (HPDF_Page page, float posx, float posy, float dstx, float dsty, float lineWith, int lineColor)
 
float GetTextWidth (HPDF_Page page, std::string text, std::string fontname, float fontsize)
 
void SaveToFile (std::string path)
 

Static Public Member Functions

static void ErrorHandler (HPDF_STATUS error_no, HPDF_STATUS detail_no, void *user_data)
 

Detailed Description

sPdfDoc class

Definition at line 35 of file sPdf.h.

Member Enumeration Documentation

◆ ElementAlign

enum SPdfDoc::ElementAlign

Definition at line 38 of file sPdf.h.

Constructor & Destructor Documentation

◆ SPdfDoc()

SPdfDoc::SPdfDoc ( std::string  title,
std::string  creator,
std::string  author,
unsigned int  dpiResolution = 72 
)

Ctor.

Definition at line 37 of file sPdf.cpp.

◆ ~SPdfDoc()

SPdfDoc::~SPdfDoc ( )

Dtor

Definition at line 49 of file sPdf.cpp.

Member Function Documentation

◆ AddPage()

HPDF_Page SPdfDoc::AddPage ( HPDF_PageSizes  sizes,
HPDF_PageDirection  direction 
)

Definition at line 104 of file sPdf.cpp.

◆ AddPageBitmap()

void SPdfDoc::AddPageBitmap ( HPDF_Page  page,
PtrObjBitmap  bitmap,
float  posx,
float  posy,
float  width,
float  height,
int  align 
)

Definition at line 210 of file sPdf.cpp.

◆ AddPageEllipse()

void SPdfDoc::AddPageEllipse ( HPDF_Page  page,
float  posx,
float  posy,
float  xradius,
float  yradius,
float  lineWith,
int  lineColor,
int  fillColor,
bool  filled,
int  align 
)

Definition at line 265 of file sPdf.cpp.

◆ AddPageImage()

void SPdfDoc::AddPageImage ( HPDF_Page  page,
std::string  path,
float  posx,
float  posy,
float  width,
float  height,
int  align 
)

Definition at line 218 of file sPdf.cpp.

◆ AddPageLabel()

void SPdfDoc::AddPageLabel ( HPDF_UINT  pagenum,
HPDF_PageNumStyle  style,
HPDF_UINT  firstpage,
std::string  prefix 
)

Definition at line 152 of file sPdf.cpp.

◆ AddPageLine()

void SPdfDoc::AddPageLine ( HPDF_Page  page,
float  posx,
float  posy,
float  dstx,
float  dsty,
float  lineWith,
int  lineColor 
)

Definition at line 286 of file sPdf.cpp.

◆ AddPageRectangle()

void SPdfDoc::AddPageRectangle ( HPDF_Page  page,
float  posx,
float  posy,
float  width,
float  height,
float  lineWith,
int  lineColor,
int  fillColor,
bool  filled,
int  align 
)

Definition at line 244 of file sPdf.cpp.

◆ AddPageText()

void SPdfDoc::AddPageText ( HPDF_Page  page,
std::string  text,
float  posx,
float  posy,
int  color,
std::string  fontname,
float  fontsize,
int  align,
bool  relative = false 
)

Definition at line 171 of file sPdf.cpp.

◆ ErrorHandler()

void SPdfDoc::ErrorHandler ( HPDF_STATUS  error_no,
HPDF_STATUS  detail_no,
void *  user_data 
)
static

Definition at line 27 of file sPdf.cpp.

◆ GetPageByIndex()

HPDF_Page SPdfDoc::GetPageByIndex ( HPDF_UINT  index)

Definition at line 112 of file sPdf.cpp.

◆ GetPageHeight()

float SPdfDoc::GetPageHeight ( HPDF_Page  page)

Definition at line 122 of file sPdf.cpp.

◆ GetPageLayout()

HPDF_PageLayout SPdfDoc::GetPageLayout ( )

Definition at line 147 of file sPdf.cpp.

◆ GetPageMode()

HPDF_PageMode SPdfDoc::GetPageMode ( )

Definition at line 137 of file sPdf.cpp.

◆ GetPageWidth()

float SPdfDoc::GetPageWidth ( HPDF_Page  page)

Definition at line 117 of file sPdf.cpp.

◆ GetTextWidth()

float SPdfDoc::GetTextWidth ( HPDF_Page  page,
std::string  text,
std::string  fontname,
float  fontsize 
)

Definition at line 85 of file sPdf.cpp.

◆ LoadFontTTF()

std::string SPdfDoc::LoadFontTTF ( std::string  fontpath)

Definition at line 157 of file sPdf.cpp.

◆ SaveToFile()

void SPdfDoc::SaveToFile ( std::string  path)

Definition at line 298 of file sPdf.cpp.

◆ SetCharset()

void SPdfDoc::SetCharset ( std::string  charset)

Definition at line 127 of file sPdf.cpp.

◆ SetPageLayout()

void SPdfDoc::SetPageLayout ( HPDF_PageLayout  layout)

Definition at line 142 of file sPdf.cpp.

◆ SetPageMode()

void SPdfDoc::SetPageMode ( HPDF_PageMode  mode)

Definition at line 132 of file sPdf.cpp.


The documentation for this class was generated from the following files: