?? pdflib.cpp
字號:
const char *retval = NULL;
PDFCPP_TRY
{
retval = m_PDFlib_api->PDF_get_apiname(p);
}
PDFCPP_CATCH;
if (retval)
return retval;
else
return "";
}
const char *
PDFlib::get_buffer(long *size) throw(PDFlib::Exception)
{
const char * retval = NULL;
PDFCPP_TRY retval = m_PDFlib_api->PDF_get_buffer(p, size);
PDFCPP_CATCH;
return retval;
}
string
PDFlib::get_errmsg() throw(PDFlib::Exception)
{
const char *retval = NULL;
PDFCPP_TRY
{
retval = m_PDFlib_api->PDF_get_errmsg(p);
}
PDFCPP_CATCH;
if (retval)
return retval;
else
return "";
}
int
PDFlib::get_errnum() throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY retval = m_PDFlib_api->PDF_get_errnum(p);
PDFCPP_CATCH;
return retval;
}
void *
PDFlib::get_opaque() throw(PDFlib::Exception)
{
void * retval = NULL;
PDFCPP_TRY retval = m_PDFlib_api->PDF_get_opaque(p);
PDFCPP_CATCH;
return retval;
}
string
PDFlib::get_parameter(string key, double modifier) throw(PDFlib::Exception)
{
const char *retval = NULL;
PDFCPP_TRY
{
retval = m_PDFlib_api->PDF_get_parameter(p, CHAR(key), modifier);
}
PDFCPP_CATCH;
if (retval)
return retval;
else
return "";
}
double
PDFlib::get_pdi_value(string key, int doc, int page, int reserved)
throw(PDFlib::Exception)
{
double retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_get_pdi_value(p, CHAR(key), doc, page,reserved);
PDFCPP_CATCH;
return retval;
}
string
PDFlib::get_pdi_parameter(string key, int doc, int page, int reserved, int *len)
throw(PDFlib::Exception)
{
const char *retval = NULL;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_get_pdi_parameter(p, CHAR(key),
doc, page, reserved, len);
PDFCPP_CATCH;
if (retval)
return retval;
else
return "";
}
double
PDFlib::get_value(string key, double modifier) throw(PDFlib::Exception)
{
double retval = 0;
PDFCPP_TRY retval = m_PDFlib_api->PDF_get_value(p, CHAR(key), modifier);
PDFCPP_CATCH;
return retval;
}
double
PDFlib::info_textflow(int textflow, string keyword)
throw(PDFlib::Exception)
{
double retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_info_textflow(p, textflow, CHAR(keyword));
PDFCPP_CATCH;
return retval;
}
void
PDFlib::initgraphics() throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_initgraphics(p);
PDFCPP_CATCH;
}
void
PDFlib::lineto(double x, double y) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_lineto(p, x, y);
PDFCPP_CATCH;
}
int
PDFlib::load_font(string fontname, string encoding, string optlist)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_load_font(p, CHAR(fontname), 0, CHAR(encoding),
CHAR(optlist));
PDFCPP_CATCH;
return retval;
}
int
PDFlib::load_iccprofile(string profilename, string optlist)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_load_iccprofile(p, CHAR(profilename), 0,
CHAR(optlist));
PDFCPP_CATCH;
return retval;
}
/* p_image.c */
int
PDFlib::load_image (string imagetype, string filename, string optlist)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_load_image(p, CHAR(imagetype),
CHAR(filename), 0, CHAR(optlist));
PDFCPP_CATCH;
return retval;
}
int
PDFlib::makespotcolor(string spotname) throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY retval = m_PDFlib_api->PDF_makespotcolor(p, CHAR(spotname), 0);
PDFCPP_CATCH;
return retval;
}
void
PDFlib::moveto(double x, double y) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_moveto(p, x, y);
PDFCPP_CATCH;
}
int
PDFlib::open_CCITT(string filename, int width, int height, int BitReverse,
int K, int BlackIs1) throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
{
retval = m_PDFlib_api->PDF_open_CCITT(p, CHAR(filename), width, height,
BitReverse, K, BlackIs1);
}
PDFCPP_CATCH;
return retval;
}
int
PDFlib::open_file(string filename) throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY retval = m_PDFlib_api->PDF_open_file(p, CHAR(filename));
PDFCPP_CATCH;
return retval;
}
int
PDFlib::open_image(string imagetype, string source, const char *data, long len,
int width, int height, int components, int bpc, string params)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
{
retval = m_PDFlib_api->PDF_open_image(p, CHAR(imagetype), CHAR(source),
data, len, width, height, components, bpc, CHAR(params));
}
PDFCPP_CATCH;
return retval;
}
int
PDFlib::open_image_file(string imagetype, string filename,
string stringparam, int intparam) throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
{
retval = m_PDFlib_api->PDF_open_image_file(p, CHAR(imagetype),
CHAR(filename), CHAR(stringparam), intparam);
}
PDFCPP_CATCH;
return retval;
}
void
PDFlib::open_mem(writeproc_t writeproc) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_open_mem(p, writeproc);
PDFCPP_CATCH;
}
int
PDFlib::open_pdi(string filename, string optlist, int reserved)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_open_pdi(p, CHAR(filename),
CHAR(optlist), reserved);
PDFCPP_CATCH;
return retval;
}
int
PDFlib::open_pdi_page(int doc, int pagenumber, string optlist)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_open_pdi_page(p, doc, pagenumber,
CHAR(optlist));
PDFCPP_CATCH;
return retval;
}
void
PDFlib::place_image(int image, double x, double y, double p_scale)
throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_place_image(p, image, x, y, p_scale);
PDFCPP_CATCH;
}
void
PDFlib::place_pdi_page(int page, double x, double y, double sx, double sy)
throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_place_pdi_page(p, page, x, y, sx, sy);
PDFCPP_CATCH;
}
int
PDFlib::process_pdi(int doc, int page, string optlist)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_process_pdi(p, doc, page, CHAR(optlist));
PDFCPP_CATCH;
return retval;
}
void
PDFlib::rect(double x, double y, double width, double height)
throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_rect(p, x, y, width, height);
PDFCPP_CATCH;
}
void
PDFlib::restore() throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_restore(p);
PDFCPP_CATCH;
}
void
PDFlib::resume_page(string optlist)
throw(PDFlib::Exception)
{
PDFCPP_TRY
m_PDFlib_api->PDF_resume_page(p, CHAR(optlist));
PDFCPP_CATCH;
}
void
PDFlib::rotate(double phi) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_rotate(p, phi);
PDFCPP_CATCH;
}
void
PDFlib::save() throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_save(p);
PDFCPP_CATCH;
}
void
PDFlib::scale(double sx, double sy) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_scale(p, sx, sy);
PDFCPP_CATCH;
}
void
PDFlib::set_border_color(double red, double green, double blue)
throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_set_border_color(p, red, green, blue);
PDFCPP_CATCH;
}
void
PDFlib::set_border_dash(double b, double w) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_set_border_dash(p, b, w);
PDFCPP_CATCH;
}
void
PDFlib::set_border_style(string style, double width) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_set_border_style(p, CHAR(style), width);
PDFCPP_CATCH;
}
void
PDFlib::setfont(int font, double fontsize) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setfont(p, font, fontsize);
PDFCPP_CATCH;
}
void
PDFlib::set_gstate(int gstate)
throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_set_gstate(p, gstate);
PDFCPP_CATCH;
}
void
PDFlib::set_info(string key, string value) throw(PDFlib::Exception)
{
PDFCPP_TRY
m_PDFlib_api->PDF_set_info2(p, CHAR(key), CHAR(value),
(int) LEN(value));
PDFCPP_CATCH;
}
void
PDFlib::set_layer_dependency(string type, string optlist)
throw(PDFlib::Exception)
{
PDFCPP_TRY
m_PDFlib_api->PDF_set_layer_dependency(p, CHAR(type), CHAR(optlist));
PDFCPP_CATCH;
}
void
PDFlib::set_parameter(string key, string value) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_set_parameter(p, CHAR(key), CHAR(value));
PDFCPP_CATCH;
}
void
PDFlib::set_text_pos(double x, double y) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_set_text_pos(p, x, y);
PDFCPP_CATCH;
}
void
PDFlib::set_value(string key, double value) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_set_value(p, CHAR(key), value);
PDFCPP_CATCH;
}
void
PDFlib::setcolor(string fstype, string colorspace,
double c1, double c2, double c3, double c4) throw(PDFlib::Exception)
{
PDFCPP_TRY
m_PDFlib_api->PDF_setcolor(p, CHAR(fstype), CHAR(colorspace), c1, c2, c3, c4);
PDFCPP_CATCH;
}
void
PDFlib::setdash(double b, double w) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setdash(p, b, w);
PDFCPP_CATCH;
}
void
PDFlib::setdashpattern(string optlist) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setdashpattern(p, CHAR(optlist));
PDFCPP_CATCH;
}
void
PDFlib::setflat(double flatness) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setflat(p, flatness);
PDFCPP_CATCH;
}
void
PDFlib::setlinecap(int linecap) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setlinecap(p, linecap);
PDFCPP_CATCH;
}
void
PDFlib::setlinejoin(int linejoin) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setlinejoin(p, linejoin);
PDFCPP_CATCH;
}
void
PDFlib::setlinewidth(double width) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setlinewidth(p, width);
PDFCPP_CATCH;
}
void
PDFlib::setmatrix( double a, double b, double c, double d, double e, double f)
throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setmatrix(p, a, b, c, d, e, f);
PDFCPP_CATCH;
}
void
PDFlib::setmiterlimit(double miter) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setmiterlimit(p, miter);
PDFCPP_CATCH;
}
void
PDFlib::setpolydash(float *darray, int length) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_setpolydash(p, darray, length);
PDFCPP_CATCH;
}
int
PDFlib::shading (string shtype, double x0, double y0, double x1, double y1,
double c1, double c2, double c3, double c4, string optlist)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_shading(p, CHAR(shtype), x0, y0, x1, y1,
c1, c2, c3, c4, CHAR(optlist));
PDFCPP_CATCH;
return retval;
}
int
PDFlib::shading_pattern (int shade, string optlist) throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_shading_pattern(p, shade, CHAR(optlist));
PDFCPP_CATCH;
return retval;
}
void
PDFlib::shfill (int shade) throw(PDFlib::Exception)
{
PDFCPP_TRY
m_PDFlib_api->PDF_shfill(p, shade);
PDFCPP_CATCH;
}
void
PDFlib::show(string text) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_show2(p, CHAR(text), (int) LEN(text));
PDFCPP_CATCH;
}
int
PDFlib::show_boxed(string text, double left, double top,
double width, double height, string hmode, string feature)
throw(PDFlib::Exception)
{
int retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_show_boxed(p, CHAR(text), left, top, width,
height, CHAR(hmode), CHAR(feature));
PDFCPP_CATCH;
return retval;
}
void
PDFlib::show_xy(string text, double x, double y) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_show_xy2(p, CHAR(text), (int) LEN(text), x, y);
PDFCPP_CATCH;
}
void
PDFlib::skew(double alpha, double beta) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_skew(p, alpha, beta);
PDFCPP_CATCH;
}
double
PDFlib::stringwidth(string text, int font, double fontsize)
throw(PDFlib::Exception)
{
double retval = 0;
PDFCPP_TRY
retval = m_PDFlib_api->PDF_stringwidth2(p, CHAR(text),
(int) LEN(text), font, fontsize);
PDFCPP_CATCH;
return retval;
}
void
PDFlib::stroke() throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_stroke(p);
PDFCPP_CATCH;
}
void
PDFlib::suspend_page(string optlist)
throw(PDFlib::Exception)
{
PDFCPP_TRY
m_PDFlib_api->PDF_suspend_page(p, CHAR(optlist));
PDFCPP_CATCH;
}
void
PDFlib::translate(double tx, double ty) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_translate(p, tx, ty);
PDFCPP_CATCH;
}
string
PDFlib::utf16_to_utf8(string utf16string) throw(PDFlib::Exception)
{
const char *retval = NULL;
PDFCPP_TRY
{
retval = m_PDFlib_api->PDF_utf16_to_utf8(p, CHAR(utf16string),
(int) LEN(utf16string), NULL);
}
PDFCPP_CATCH;
if (retval)
return retval;
else
return "";
}
string
PDFlib::utf8_to_utf16(string utf8string, string format) throw(PDFlib::Exception)
{
const char *retval = NULL;
PDFCPP_TRY
{
retval = m_PDFlib_api->PDF_utf8_to_utf16(p, CHAR(utf8string),
CHAR(format), NULL);
}
PDFCPP_CATCH;
if (retval)
return retval;
else
return "";
}
void
PDFlib::xshow(string text, const double *xadvancelist) throw(PDFlib::Exception)
{
PDFCPP_TRY m_PDFlib_api->PDF_xshow(p, CHAR(text), (int) LEN(text),
xadvancelist);
PDFCPP_CATCH;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -