pdflib.h
来自「把doc文档转成pdf后刻录成CD,用VC++开发,用了Nero的SDK和CXI」· C头文件 代码 · 共 1,279 行 · 第 1/4 页
H
1,279 行
int (PDFLIB_CALL * PDF_delete_pvf)(PDF *p, const char *filename, int len);
void (PDFLIB_CALL * PDF_delete_textflow)(PDF *p, int textflow);
void (PDFLIB_CALL * PDF_encoding_set_char) (PDF *p, const char *encoding,
int slot, const char *glyphname, int uv);
void (PDFLIB_CALL * PDF_end_document)(PDF *p, const char *optlist);
void (PDFLIB_CALL * PDF_end_font)(PDF *p);
void (PDFLIB_CALL * PDF_end_glyph)(PDF *p);
void (PDFLIB_CALL * PDF_end_item)(PDF *p, int id);
void (PDFLIB_CALL * PDF_end_layer)(PDF *p);
void (PDFLIB_CALL * PDF_end_mc)(PDF *p);
void (PDFLIB_CALL * PDF_end_page)(PDF *p);
void (PDFLIB_CALL * PDF_end_page_ext)(PDF *p, const char *optlist);
void (PDFLIB_CALL * PDF_end_pattern)(PDF *p);
void (PDFLIB_CALL * PDF_end_template)(PDF *p);
void (PDFLIB_CALL * PDF_endpath)(PDF *p);
void (PDFLIB_CALL * PDF_fill)(PDF *p);
int (PDFLIB_CALL * PDF_fill_imageblock) (PDF *p, int page,
const char *blockname, int image, const char *optlist);
int (PDFLIB_CALL * PDF_fill_pdfblock) (PDF *p, int page,
const char *blockname, int contents, const char *optlist);
void (PDFLIB_CALL * PDF_fill_stroke)(PDF *p);
int (PDFLIB_CALL * PDF_fill_textblock) (PDF *p, int page,
const char *blockname, const char *text, int len,
const char *optlist);
int (PDFLIB_CALL * PDF_findfont)(PDF *p, const char *fontname,
const char *encoding, int embed);
void (PDFLIB_CALL * PDF_fit_image) (PDF *p, int image, double x, double y,
const char *optlist);
void (PDFLIB_CALL * PDF_fit_pdi_page) (PDF *p, int page, double x,
double y, const char *optlist);
const char * (PDFLIB_CALL * PDF_fit_textflow)(PDF *p, int textflow,
double llx, double lly, double urx, double ury,
const char *optlist);
void (PDFLIB_CALL * PDF_fit_textline)(PDF *p, const char *text,
int len, double x, double y, const char *optlist);
const PDFlib_api * (PDFLIB_CALL * PDF_get_api)(void);
const char * (PDFLIB_CALL * PDF_get_apiname) (PDF *p);
const char * (PDFLIB_CALL * PDF_get_buffer)(PDF *p, long *size);
const char * (PDFLIB_CALL * PDF_get_errmsg) (PDF *p);
int (PDFLIB_CALL * PDF_get_errnum) (PDF *p);
int (PDFLIB_CALL * PDF_get_minorversion)(void);
int (PDFLIB_CALL * PDF_get_majorversion)(void);
void * (PDFLIB_CALL * PDF_get_opaque)(PDF *p);
const char * (PDFLIB_CALL * PDF_get_parameter)(PDF *p,
const char *key, double modifier);
const char * (PDFLIB_CALL * PDF_get_pdi_parameter)(PDF *p,
const char *key, int doc, int page, int reserved, int *len);
double (PDFLIB_CALL * PDF_get_pdi_value)(PDF *p, const char *key,
int doc, int page, int reserved);
double (PDFLIB_CALL * PDF_get_value)(PDF *p, const char *key,
double modifier);
double (PDFLIB_CALL * PDF_info_textflow)(PDF *p, int textflow,
const char *keyword);
void (PDFLIB_CALL * PDF_initgraphics)(PDF *p);
void (PDFLIB_CALL * PDF_lineto)(PDF *p, double x, double y);
int (PDFLIB_CALL * PDF_load_font)(PDF *p, const char *fontname,
int len, const char *encoding, const char *optlist);
int (PDFLIB_CALL * PDF_load_iccprofile)(PDF *p, const char *profilename,
int len, const char *optlist);
int (PDFLIB_CALL * PDF_load_image) (PDF *p, const char *imagetype,
const char *filename, int len, const char *optlist);
int (PDFLIB_CALL * PDF_makespotcolor)(PDF *p, const char *spotname,
int len);
void (PDFLIB_CALL * PDF_mc_point)(PDF *p,
const char *tag, const char *optlist);
void (PDFLIB_CALL * PDF_moveto)(PDF *p, double x, double y);
PDF* (PDFLIB_CALL * PDF_new)(void);
PDF* (PDFLIB_CALL * PDF_new2)(errorproc_t errorhandler,
allocproc_t allocproc,
reallocproc_t reallocproc,
freeproc_t freeproc, void *opaque);
int (PDFLIB_CALL * PDF_open_CCITT)(PDF *p, const char *filename,
int width, int height,
int BitReverse, int K, int BlackIs1);
int (PDFLIB_CALL * PDF_open_file)(PDF *p, const char *filename);
int (PDFLIB_CALL * PDF_open_image)(PDF *p, const char *imagetype,
const char *source, const char *data, long length, int width,
int height, int components, int bpc, const char *params);
int (PDFLIB_CALL * PDF_open_image_file)(PDF *p, const char *imagetype,
const char *filename, const char *stringparam, int intparam);
void (PDFLIB_CALL * PDF_open_mem)(PDF *p, writeproc_t writeproc);
int (PDFLIB_CALL * PDF_open_pdi)(PDF *p, const char *filename,
const char *optlist, int len);
int (PDFLIB_CALL * PDF_open_pdi_callback) (PDF *p, void *opaque,
size_t filesize, size_t (*readproc)(void *opaque, void *buffer,
size_t size), int (*seekproc)(void *opaque, long offset),
const char *optlist);
int (PDFLIB_CALL * PDF_open_pdi_page)(PDF *p,
int doc, int pagenumber, const char *optlist);
void (PDFLIB_CALL * PDF_place_image)(PDF *p, int image,
double x, double y, double scale);
void (PDFLIB_CALL * PDF_place_pdi_page)(PDF *p, int page,
double x, double y, double sx, double sy);
int (PDFLIB_CALL * PDF_process_pdi)(PDF *p,
int doc, int page, const char *optlist);
void (PDFLIB_CALL * PDF_rect)(PDF *p, double x, double y,
double width, double height);
void (PDFLIB_CALL * PDF_restore)(PDF *p);
void (PDFLIB_CALL * PDF_resume_page)(PDF *p, const char *optlist);
void (PDFLIB_CALL * PDF_rotate)(PDF *p, double phi);
void (PDFLIB_CALL * PDF_save)(PDF *p);
void (PDFLIB_CALL * PDF_scale)(PDF *p, double sx, double sy);
void (PDFLIB_CALL * PDF_set_border_color)(PDF *p,
double red, double green, double blue);
void (PDFLIB_CALL * PDF_set_border_dash)(PDF *p, double b, double w);
void (PDFLIB_CALL * PDF_set_border_style)(PDF *p,
const char *style, double width);
void (PDFLIB_CALL * PDF_set_gstate) (PDF *p, int gstate);
void (PDFLIB_CALL * PDF_set_info)(PDF *p, const char *key,
const char *value);
void (PDFLIB_CALL * PDF_set_info2) (PDF *p, const char *key,
const char *value, int len);
void (PDFLIB_CALL * PDF_set_layer_dependency)(PDF *p, const char *type,
const char *optlist);
void (PDFLIB_CALL * PDF_set_parameter)(PDF *p,
const char *key, const char *value);
void (PDFLIB_CALL * PDF_set_text_pos)(PDF *p, double x, double y);
void (PDFLIB_CALL * PDF_set_value)(PDF *p, const char *key,
double value);
void (PDFLIB_CALL * PDF_setcolor)(PDF *p,
const char *fstype, const char *colorspace,
double c1, double c2, double c3, double c4);
void (PDFLIB_CALL * PDF_setdash)(PDF *p, double b, double w);
void (PDFLIB_CALL * PDF_setdashpattern) (PDF *p, const char *optlist);
void (PDFLIB_CALL * PDF_setflat)(PDF *p, double flatness);
void (PDFLIB_CALL * PDF_setfont)(PDF *p, int font, double fontsize);
void (PDFLIB_CALL * PDF_setgray)(PDF *p, double gray);
void (PDFLIB_CALL * PDF_setgray_stroke)(PDF *p, double gray);
void (PDFLIB_CALL * PDF_setgray_fill)(PDF *p, double gray);
void (PDFLIB_CALL * PDF_setlinecap)(PDF *p, int linecap);
void (PDFLIB_CALL * PDF_setlinejoin)(PDF *p, int linejoin);
void (PDFLIB_CALL * PDF_setlinewidth)(PDF *p, double width);
void (PDFLIB_CALL * PDF_setmatrix)(PDF *p, double a, double b,
double c, double d, double e, double f);
void (PDFLIB_CALL * PDF_setmiterlimit)(PDF *p, double miter);
void (PDFLIB_CALL * PDF_setpolydash)(PDF *p, float *dasharray,
int length);
void (PDFLIB_CALL * PDF_setrgbcolor)(PDF *p, double red, double green,
double blue);
void (PDFLIB_CALL * PDF_setrgbcolor_fill)(PDF *p,
double red, double green, double blue);
void (PDFLIB_CALL * PDF_setrgbcolor_stroke)(PDF *p,
double red, double green, double blue);
int (PDFLIB_CALL * PDF_shading) (PDF *p, const char *shtype, double x_0,
double y_0, double x_1, double y_1, double c_1, double c_2,
double c_3, double c_4, const char *optlist);
int (PDFLIB_CALL * PDF_shading_pattern) (PDF *p, int shading,
const char *optlist);
void (PDFLIB_CALL * PDF_shfill) (PDF *p, int shading);
void (PDFLIB_CALL * PDF_show)(PDF *p, const char *text);
void (PDFLIB_CALL * PDF_show2)(PDF *p, const char *text, int len);
int (PDFLIB_CALL * PDF_show_boxed)(PDF *p, const char *text,
double left, double top, double width, double height,
const char *hmode, const char *feature);
int (PDFLIB_CALL * PDF_show_boxed2)(PDF *p, const char *text, int len,
double left, double top, double width, double height,
const char *hmode, const char *feature);
void (PDFLIB_CALL * PDF_show_xy)(PDF *p, const char *text, double x,
double y);
void (PDFLIB_CALL * PDF_show_xy2)(PDF *p, const char *text,
int len, double x, double y);
void (PDFLIB_CALL * PDF_shutdown)(void);
void (PDFLIB_CALL * PDF_skew)(PDF *p, double alpha, double beta);
double (PDFLIB_CALL * PDF_stringwidth)(PDF *p,
const char *text, int font, double fontsize);
double (PDFLIB_CALL * PDF_stringwidth2)(PDF *p, const char *text,
int len, int font, double fontsize);
void (PDFLIB_CALL * PDF_stroke)(PDF *p);
void (PDFLIB_CALL * PDF_suspend_page)(PDF *p, const char *optlist);
void (PDFLIB_CALL * PDF_translate)(PDF *p, double tx, double ty);
const char * (PDFLIB_CALL * PDF_utf16_to_utf8) (PDF *p,
const char *utf16string, int len, int *size);
const char * (PDFLIB_CALL * PDF_utf8_to_utf16) (PDF *p,
const char *utf8string, const char *format, int *size);
void (PDFLIB_CALL * PDF_xshow)(PDF *p, const char *text, int len,
const double *xadvancelist);
int (PDFLIB_CALL * pdf_catch)(PDF *p);
void (PDFLIB_CALL * pdf_exit_try)(PDF *p);
pdf_jmpbuf * (PDFLIB_CALL * pdf_jbuf)(PDF *p);
void (PDFLIB_CALL * pdf_rethrow)(PDF *p);
};
/*
* ----------------------------------------------------------------------
* exception handling with try/catch implementation
* ----------------------------------------------------------------------
*/
/* Set up an exception handling frame; must always be paired with PDF_CATCH().*/
#define PDF_TRY(p) if (p) { if (setjmp(pdf_jbuf(p)->jbuf) == 0)
/* Inform the exception machinery that a PDF_TRY() will be left without
entering the corresponding PDF_CATCH( ) clause. */
#define PDF_EXIT_TRY(p) pdf_exit_try(p)
/* Catch an exception; must always be paired with PDF_TRY(). */
#define PDF_CATCH(p) } if (pdf_catch(p))
/* Re-throw an exception to another handler. */
#define PDF_RETHROW(p) pdf_rethrow(p)
/*
* ----------------------------------------------------------------------
* End of supported public declarations
* ----------------------------------------------------------------------
*/
/*
* ------------------------------------------------------------------------
* Deprecated: macros for page size formats
* ------------------------------------------------------------------------
*/
/*
* The page sizes are only available to the C and C++ bindings.
* These are deprecated; corresponding options are supported in
* PDF_begin_page_ext().
*/
#define a0_width 2380.0
#define a0_height 3368.0
#define a1_width 1684.0
#define a1_height 2380.0
#define a2_width 1190.0
#define a2_height 1684.0
#define a3_width 842.0
#define a3_height 1190.0
#define a4_width 595.0
#define a4_height 842.0
#define a5_width 421.0
#define a5_height 595.0
#define a6_width 297.0
#define a6_height 421.0
#define b5_width 501.0
#define b5_height 709.0
#define letter_width 612.0
#define letter_height 792.0
#define legal_width 612.0
#define legal_height 1008.0
#define ledger_width 1224.0
#define ledger_height 792.0
#define p11x17_width 792.0
#define p11x17_height 1224.0
/*
* ----------------------------------------------------------------------
* Deprecated: Error classes
* ----------------------------------------------------------------------
*/
/*
* Error classes are deprecated; use PDF_TRY/PDF_CATCH instead.
* Note that old-style error handlers are still supported, but
* they will always receive type PDF_NonfatalError (for warnings)
* or PDF_UnknownError (for other exceptions).
*/
#define PDF_MemoryError 1
#define PDF_IOError 2
#define PDF_RuntimeError 3
#define PDF_IndexError 4
#define PDF_TypeError 5
#define PDF_DivisionByZero 6
#define PDF_OverflowError 7
#define PDF_SyntaxError 8
#define PDF_ValueError 9
#define PDF_SystemError 10
#define PDF_NonfatalError 11
#define PDF_UnknownError 12
/*
* ----------------------------------------------------------------------
* Private stuff, do not use explicitly but only via the macros above!
* ----------------------------------------------------------------------
*/
PDFLIB_API pdf_jmpbuf * PDFLIB_CALL
pdf_jbuf(PDF *p);
PDFLIB_API void PDFLIB_CALL
pdf_exit_try(PDF *p);
PDFLIB_API int PDFLIB_CALL
pdf_catch(PDF *p);
PDFLIB_API void PDFLIB_CALL
pdf_rethrow(PDF *p);
PDFLIB_API void PDFLIB_CALL
pdf_throw(PDF *p, const char *binding, const char *apiname, const char *errmsg);
/*
* ----------------------------------------------------------------------
* End of useful stuff
* ----------------------------------------------------------------------
*/
#if defined(__MWERKS__) && defined(PDFLIB_EXPORTS)
#pragma export off
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* PDFLIB_H */
/*
* vim600: sw=4 fdm=marker
*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?