pdflib.h
来自「把doc文档转成pdf后刻录成CD,用VC++开发,用了Nero的SDK和CXI」· C头文件 代码 · 共 1,279 行 · 第 1/4 页
H
1,279 行
/* Deprecated, use PDF_create_annotation(). */
PDFLIB_API void PDFLIB_CALL
PDF_set_border_color(PDF *p, double red, double green, double blue);
/* Deprecated, use PDF_create_annotation(). */
PDFLIB_API void PDFLIB_CALL
PDF_set_border_dash(PDF *p, double b, double w);
/* Deprecated, use PDF_create_annotation(). */
PDFLIB_API void PDFLIB_CALL
PDF_set_border_style(PDF *p, const char *style, double width);
/* Activate a gstate object. */
PDFLIB_API void PDFLIB_CALL
PDF_set_gstate(PDF *p, int gstate);
/* Fill document information field key with value. */
PDFLIB_API void PDFLIB_CALL
PDF_set_info(PDF *p, const char *key, const char *value);
/* Like PDF_set_info(), but with explicit string length. */
PDFLIB_API void PDFLIB_CALL
PDF_set_info2(PDF *p, const char *key, const char *value, int len);
/* Define hierarchical and group relationships among layers (requires
PDF 1.5). */
PDFLIB_API void PDFLIB_CALL
PDF_set_layer_dependency(PDF *p, const char *type, const char *optlist);
/* Set some PDFlib parameter with string type. */
PDFLIB_API void PDFLIB_CALL
PDF_set_parameter(PDF *p, const char *key, const char *value);
/* Set the position for text output on the page. */
PDFLIB_API void PDFLIB_CALL
PDF_set_text_pos(PDF *p, double x, double y);
/* Set the value of some PDFlib parameter with numerical type. */
PDFLIB_API void PDFLIB_CALL
PDF_set_value(PDF *p, const char *key, double value);
/* Set the current color space and color. */
PDFLIB_API void PDFLIB_CALL
PDF_setcolor(PDF *p, const char *fstype, const char *colorspace,
double c1, double c2, double c3, double c4);
/* Set the current dash pattern. */
PDFLIB_API void PDFLIB_CALL
PDF_setdash(PDF *p, double b, double w);
/* Set a dash pattern defined by an option list. */
PDFLIB_API void PDFLIB_CALL
PDF_setdashpattern(PDF *p, const char *optlist);
/* Set the flatness parameter. */
PDFLIB_API void PDFLIB_CALL
PDF_setflat(PDF *p, double flatness);
/* Set the current font in the specified size. */
PDFLIB_API void PDFLIB_CALL
PDF_setfont(PDF *p, int font, double fontsize);
/* Deprecated, use PDF_setcolor(). */
PDFLIB_API void PDFLIB_CALL
PDF_setgray(PDF *p, double gray);
/* Deprecated, use PDF_setcolor(). */
PDFLIB_API void PDFLIB_CALL
PDF_setgray_fill(PDF *p, double gray);
/* Deprecated, use PDF_setcolor(). */
PDFLIB_API void PDFLIB_CALL
PDF_setgray_stroke(PDF *p, double gray);
/* Set the linecap parameter. */
PDFLIB_API void PDFLIB_CALL
PDF_setlinecap(PDF *p, int linecap);
/* Set the linejoin parameter. */
PDFLIB_API void PDFLIB_CALL
PDF_setlinejoin(PDF *p, int linejoin);
/* Set the current linewidth. */
PDFLIB_API void PDFLIB_CALL
PDF_setlinewidth(PDF *p, double width);
/* Explicitly set the current transformation matrix. */
PDFLIB_API void PDFLIB_CALL
PDF_setmatrix(PDF *p, double a, double b, double c, double d,
double e, double f);
/* Set the miter limit. */
PDFLIB_API void PDFLIB_CALL
PDF_setmiterlimit(PDF *p, double miter);
/* Deprecated, use PDF_setdashpattern(). */
PDFLIB_API void PDFLIB_CALL
PDF_setpolydash(PDF *p, float *dasharray, int length);
/* Deprecated, use PDF_setcolor(). */
PDFLIB_API void PDFLIB_CALL
PDF_setrgbcolor(PDF *p, double red, double green, double blue);
/* Deprecated, use PDF_setcolor(). */
PDFLIB_API void PDFLIB_CALL
PDF_setrgbcolor_fill(PDF *p, double red, double green, double blue);
/* Deprecated, use PDF_setcolor(). */
PDFLIB_API void PDFLIB_CALL
PDF_setrgbcolor_stroke(PDF *p, double red, double green, double blue);
/* Define a blend from the current fill color to another color (requires
PDF 1.4 or above). */
PDFLIB_API 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);
/* Define a shading pattern using a shading object (requires PDF 1.4 or
above). */
PDFLIB_API int PDFLIB_CALL
PDF_shading_pattern(PDF *p, int shading, const char *optlist);
/* Fill an area with a shading, based on a shading object (requires PDF 1.4
or above). */
PDFLIB_API void PDFLIB_CALL
PDF_shfill(PDF *p, int shading);
/* Print text in the current font and size at the current position. */
PDFLIB_API void PDFLIB_CALL
PDF_show(PDF *p, const char *text);
/* Same as PDF_show() but with explicit string length. */
PDFLIB_API void PDFLIB_CALL
PDF_show2(PDF *p, const char *text, int len);
/* Deprecated, use PDF_fit_textline() or PDF_fit_textflow(). */
PDFLIB_API 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);
/* Deprecated, use PDF_fit_textline() or PDF_fit_textflow(). */
PDFLIB_API 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);
/* Print text in the current font. */
PDFLIB_API void PDFLIB_CALL
PDF_show_xy(PDF *p, const char *text, double x, double y);
/* Same as PDF_show_xy() but with explicit string length. */
PDFLIB_API void PDFLIB_CALL
PDF_show_xy2(PDF *p, const char *text, int len, double x, double y);
/* Shut down PDFlib (recommended although currently not required). */
PDFLIB_API void PDFLIB_CALL
PDF_shutdown(void);
/* Skew the coordinate system. */
PDFLIB_API void PDFLIB_CALL
PDF_skew(PDF *p, double alpha, double beta);
/* Return the width of text in an arbitrary font. */
PDFLIB_API double PDFLIB_CALL
PDF_stringwidth(PDF *p, const char *text, int font, double fontsize);
/* Same as PDF_stringwidth() but with explicit string length. */
PDFLIB_API double PDFLIB_CALL
PDF_stringwidth2(PDF *p, const char *text, int len, int font, double fontsize);
/* Stroke the path with the current color and line width, and clear it. */
PDFLIB_API void PDFLIB_CALL
PDF_stroke(PDF *p);
/* Suspend the current page so that it can later be resumed. */
PDFLIB_API void PDFLIB_CALL
PDF_suspend_page(PDF *p, const char *optlist);
/* Translate the origin of the coordinate system. */
PDFLIB_API void PDFLIB_CALL
PDF_translate(PDF *p, double tx, double ty);
/* Convert a string from UTF-16 format to UTF-8. */
PDFLIB_API const char * PDFLIB_CALL
PDF_utf16_to_utf8(PDF *p, const char *utf16string, int len, int *size);
/* Convert a string from UTF-8 format to UTF-16. */
PDFLIB_API const char * PDFLIB_CALL
PDF_utf8_to_utf16(PDF *p, const char *utf8string, const char *format,
int *size);
/* Print text in the current font and size, using individual horizontal
positions (unsupported). */
PDFLIB_API void PDFLIB_CALL
PDF_xshow(PDF *p, const char *text, int len, const double *xadvancelist);
/*
* ----------------------------------------------------------------------
* PDFlib API structure with function pointers to all API functions
* ----------------------------------------------------------------------
*/
/* Auxiliary structure for try/catch */
typedef struct
{
jmp_buf jbuf;
} pdf_jmpbuf;
/* The API structure with pointers to all PDFlib API functions */
struct PDFlib_api_s {
/* version numbers for checking the DLL against client code */
size_t sizeof_PDFlib_api; /* size of this structure */
int major; /* PDFlib major version number */
int minor; /* PDFlib minor version number */
int revision; /* PDFlib revision number */
int reserved; /* reserved */
void (PDFLIB_CALL * PDF_activate_item)(PDF *p, int id);
int (PDFLIB_CALL * PDF_add_bookmark)(PDF *p, const char *text,
int parent, int open);
int (PDFLIB_CALL * PDF_add_bookmark2) (PDF *p, const char *text, int len,
int parent, int open);
void (PDFLIB_CALL * PDF_add_launchlink)(PDF *p,
double llx, double lly, double urx,
double ury, const char *filename);
void (PDFLIB_CALL * PDF_add_locallink)(PDF *p,
double llx, double lly, double urx,
double ury, int page, const char *optlist);
void (PDFLIB_CALL * PDF_add_nameddest) (PDF *p, const char *name,
int len, const char *optlist);
void (PDFLIB_CALL * PDF_add_note)(PDF *p, double llx, double lly,
double urx, double ury, const char *contents, const char *title,
const char *icon, int open);
void (PDFLIB_CALL * PDF_add_note2) (PDF *p, double llx, double lly,
double urx, double ury, const char *contents, int len_cont,
const char *title, int len_title, const char *icon, int open);
void (PDFLIB_CALL * PDF_add_pdflink)(PDF *p,
double llx, double lly, double urx, double ury,
const char *filename, int page, const char *optlist);
void (PDFLIB_CALL * PDF_add_thumbnail)(PDF *p, int image);
void (PDFLIB_CALL * PDF_add_weblink)(PDF *p, double llx,
double lly, double urx, double ury, const char *url);
void (PDFLIB_CALL * PDF_arc)(PDF *p, double x, double y,
double r, double alpha, double beta);
void (PDFLIB_CALL * PDF_arcn)(PDF *p, double x, double y,
double r, double alpha, double beta);
void (PDFLIB_CALL * PDF_attach_file)(PDF *p, double llx, double lly,
double urx, double ury, const char *filename,
const char *description,
const char *author, const char *mimetype, const char *icon);
void (PDFLIB_CALL * PDF_attach_file2) (PDF *p, double llx, double lly,
double urx, double ury, const char *filename, int len_filename,
const char *description, int len_descr, const char *author,
int len_auth, const char *mimetype, const char *icon);
int (PDFLIB_CALL * PDF_begin_document)(PDF *p, const char *filename,
int len, const char *optlist);
void (PDFLIB_CALL * PDF_begin_document_callback)(PDF *p,
writeproc_t writeproc, const char *optlist);
void (PDFLIB_CALL * PDF_begin_font)(PDF *p, const char *fontname,
int len, double a, double b, double c, double d, double e, double f,
const char *optlist);
void (PDFLIB_CALL * PDF_begin_glyph)(PDF *p, const char *glyphname,
double wx, double llx, double lly, double urx, double ury);
int (PDFLIB_CALL * PDF_begin_item)(PDF *p, const char *tag,
const char *optlist);
void (PDFLIB_CALL * PDF_begin_layer)(PDF *p, int layer);
void (PDFLIB_CALL * PDF_begin_mc)(PDF *p,
const char *tag, const char *optlist);
void (PDFLIB_CALL * PDF_begin_page)(PDF *p, double width,
double height);
void (PDFLIB_CALL * PDF_begin_page_ext)(PDF *p, double width,
double height, const char *optlist);
int (PDFLIB_CALL * PDF_begin_pattern)(PDF *p,
double width, double height,
double xstep, double ystep, int painttype);
int (PDFLIB_CALL * PDF_begin_template)(PDF *p,
double width, double height);
void (PDFLIB_CALL * PDF_boot)(void);
void (PDFLIB_CALL * PDF_circle)(PDF *p, double x, double y, double r);
void (PDFLIB_CALL * PDF_clip)(PDF *p);
void (PDFLIB_CALL * PDF_close)(PDF *p);
void (PDFLIB_CALL * PDF_close_image)(PDF *p, int image);
void (PDFLIB_CALL * PDF_close_pdi)(PDF *p, int doc);
void (PDFLIB_CALL * PDF_close_pdi_page)(PDF *p, int page);
void (PDFLIB_CALL * PDF_closepath)(PDF *p);
void (PDFLIB_CALL * PDF_closepath_fill_stroke)(PDF *p);
void (PDFLIB_CALL * PDF_closepath_stroke)(PDF *p);
void (PDFLIB_CALL * PDF_concat)(PDF *p, double a, double b,
double c, double d, double e, double f);
void (PDFLIB_CALL * PDF_continue_text)(PDF *p, const char *text);
void (PDFLIB_CALL * PDF_continue_text2)(PDF *p, const char *text,
int len);
int (PDFLIB_CALL * PDF_create_action)(PDF *p, const char *type,
const char *optlist);
void (PDFLIB_CALL * PDF_create_annotation)(PDF *p,
double llx, double lly, double urx, double ury,
const char *type, const char *optlist);
int (PDFLIB_CALL * PDF_create_bookmark)(PDF *p, const char *text, int len,
const char *optlist);
void (PDFLIB_CALL * PDF_create_field) (PDF *p, double llx, double lly,
double urx, double ury, const char *name, int len,
const char *type, const char *optlist);
void (PDFLIB_CALL * PDF_create_fieldgroup) (PDF *p, const char *name,
int len, const char *optlist);
int (PDFLIB_CALL * PDF_create_gstate) (PDF *p, const char *optlist);
void (PDFLIB_CALL * PDF_create_pvf)(PDF *p, const char *filename,
int len, const void *data, size_t size,
const char *optlist);
int (PDFLIB_CALL * PDF_create_textflow)(PDF *p, const char *text, int len,
const char *optlist);
void (PDFLIB_CALL * PDF_curveto)(PDF *p, double x_1, double y_1,
double x_2, double y_2, double x_3, double y_3);
int (PDFLIB_CALL * PDF_define_layer)(PDF *p, const char *name, int len,
const char *optlist);
void (PDFLIB_CALL * PDF_delete)(PDF *);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?