diff --git a/.gitignore b/.gitignore index 1358a28..6991540 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ Network Trash Folder Temporary Items .apdisk +.idea/ diff --git a/pdflib10/_obj/_cgo_.o b/pdflib10/_obj/_cgo_.o new file mode 100644 index 0000000..aff2013 Binary files /dev/null and b/pdflib10/_obj/_cgo_.o differ diff --git a/pdflib10/_obj/_cgo_export.c b/pdflib10/_obj/_cgo_export.c new file mode 100644 index 0000000..a03f432 --- /dev/null +++ b/pdflib10/_obj/_cgo_export.c @@ -0,0 +1,36 @@ +/* Code generated by cmd/cgo; DO NOT EDIT. */ + +#include +#include "_cgo_export.h" + +#pragma GCC diagnostic ignored "-Wunknown-pragmas" +#pragma GCC diagnostic ignored "-Wpragmas" +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" +extern void crosscall2(void (*fn)(void *), void *, int, size_t); +extern size_t _cgo_wait_runtime_init_done(void); +extern void _cgo_release_context(size_t); + +extern char* _cgo_topofstack(void); +#define CGO_NO_SANITIZE_THREAD +#define _cgo_tsan_acquire() +#define _cgo_tsan_release() + + +#define _cgo_msan_write(addr, sz) + + +CGO_NO_SANITIZE_THREAD +void _cgo_0d5f714d6325_Cfunc__Cmalloc(void *v) { + struct { + unsigned long long p0; + void *r1; + } __attribute__((__packed__, __gcc_struct__)) *a = v; + void *ret; + _cgo_tsan_acquire(); + ret = malloc(a->p0); + if (ret == 0 && a->p0 == 0) { + ret = malloc(1); + } + a->r1 = ret; + _cgo_tsan_release(); +} diff --git a/pdflib10/_obj/_cgo_export.h b/pdflib10/_obj/_cgo_export.h new file mode 100644 index 0000000..65fa6fe --- /dev/null +++ b/pdflib10/_obj/_cgo_export.h @@ -0,0 +1,79 @@ +/* Code generated by cmd/cgo; DO NOT EDIT. */ + +/* package pdflib */ + + +#line 1 "cgo-builtin-export-prolog" + +#include + +#ifndef GO_CGO_EXPORT_PROLOGUE_H +#define GO_CGO_EXPORT_PROLOGUE_H + +#ifndef GO_CGO_GOSTRING_TYPEDEF +typedef struct { const char *p; ptrdiff_t n; } _GoString_; +#endif + +#endif + +/* Start of preamble from import "C" comments. */ + + + +/* End of preamble from import "C" comments. */ + + +/* Start of boilerplate cgo prologue. */ +#line 1 "cgo-gcc-export-header-prolog" + +#ifndef GO_CGO_PROLOGUE_H +#define GO_CGO_PROLOGUE_H + +typedef signed char GoInt8; +typedef unsigned char GoUint8; +typedef short GoInt16; +typedef unsigned short GoUint16; +typedef int GoInt32; +typedef unsigned int GoUint32; +typedef long long GoInt64; +typedef unsigned long long GoUint64; +typedef GoInt64 GoInt; +typedef GoUint64 GoUint; +typedef size_t GoUintptr; +typedef float GoFloat32; +typedef double GoFloat64; +#ifdef _MSC_VER +#include +typedef _Fcomplex GoComplex64; +typedef _Dcomplex GoComplex128; +#else +typedef float _Complex GoComplex64; +typedef double _Complex GoComplex128; +#endif + +/* + static assertion to make sure the file is being used on architecture + at least with matching size of GoInt. +*/ +typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1]; + +#ifndef GO_CGO_GOSTRING_TYPEDEF +typedef _GoString_ GoString; +#endif +typedef void *GoMap; +typedef void *GoChan; +typedef struct { void *t; void *v; } GoInterface; +typedef struct { void *data; GoInt len; GoInt cap; } GoSlice; + +#endif + +/* End of boilerplate cgo prologue. */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef __cplusplus +} +#endif diff --git a/pdflib10/_obj/_cgo_flags b/pdflib10/_obj/_cgo_flags new file mode 100644 index 0000000..e69de29 diff --git a/pdflib10/_obj/_cgo_gotypes.go b/pdflib10/_obj/_cgo_gotypes.go new file mode 100644 index 0000000..4ff9194 --- /dev/null +++ b/pdflib10/_obj/_cgo_gotypes.go @@ -0,0 +1,2210 @@ +// Code generated by cmd/cgo; DO NOT EDIT. + +package pdflib + +import "unsafe" + +import "syscall" + +import _cgopackage "runtime/cgo" + +type _ _cgopackage.Incomplete +var _ syscall.Errno +func _Cgo_ptr(ptr unsafe.Pointer) unsafe.Pointer { return ptr } + +//go:linkname _Cgo_always_false runtime.cgoAlwaysFalse +var _Cgo_always_false bool +//go:linkname _Cgo_use runtime.cgoUse +func _Cgo_use(interface{}) +type _Ctype_PDF = _Ctype_struct_PDF_s + +type _Ctype__GoString_ string + +type _Ctype_char int8 + +type _Ctype_double float64 + +type _Ctype_int int32 + +type _Ctype_intgo = _Ctype_ptrdiff_t + +type _Ctype_long int64 + +type _Ctype_ptrdiff_t = _Ctype_long + +type _Ctype_size_t = _Ctype_ulong + +type _Ctype_struct_PDF_s _cgopackage.Incomplete + +type _Ctype_ulong uint64 + +type _Ctype_void [0]byte + +//go:linkname _cgo_runtime_cgocall runtime.cgocall +func _cgo_runtime_cgocall(unsafe.Pointer, uintptr) int32 + +//go:linkname _cgoCheckPointer runtime.cgoCheckPointer +func _cgoCheckPointer(interface{}, interface{}) + +//go:linkname _cgoCheckResult runtime.cgoCheckResult +func _cgoCheckResult(interface{}) + + +// CString converts the Go string s to a C string. +// +// The C string is allocated in the C heap using malloc. +// It is the caller's responsibility to arrange for it to be +// freed, such as by calling C.free (be sure to include stdlib.h +// if C.free is needed). +func _Cfunc_CString(s string) *_Ctype_char { + if len(s)+1 <= 0 { + panic("string too large") + } + p := _cgo_cmalloc(uint64(len(s)+1)) + sliceHeader := struct { + p unsafe.Pointer + len int + cap int + }{p, len(s)+1, len(s)+1} + b := *(*[]byte)(unsafe.Pointer(&sliceHeader)) + copy(b, s) + b[len(s)] = 0 + return (*_Ctype_char)(p) +} + +//go:linkname _cgo_runtime_gostring runtime.gostring +func _cgo_runtime_gostring(*_Ctype_char) string + +// GoString converts the C string p into a Go string. +func _Cfunc_GoString(p *_Ctype_char) string { + return _cgo_runtime_gostring(p) +} + +//go:linkname _cgo_runtime_gostringn runtime.gostringn +func _cgo_runtime_gostringn(*_Ctype_char, int) string + +// GoStringN converts the C data p with explicit length l to a Go string. +func _Cfunc_GoStringN(p *_Ctype_char, l _Ctype_int) string { + return _cgo_runtime_gostringn(p, int(l)) +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc_PDF_get_buffer +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc_PDF_get_buffer _cgo_0d5f714d6325_Cfunc_PDF_get_buffer +var __cgofn__cgo_0d5f714d6325_Cfunc_PDF_get_buffer byte +var _cgo_0d5f714d6325_Cfunc_PDF_get_buffer = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc_PDF_get_buffer) + +//go:cgo_unsafe_args +func _Cfunc_PDF_get_buffer(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_long) (r1 *_Ctype_char) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc_PDF_get_buffer, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc_PDF_new +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc_PDF_new _cgo_0d5f714d6325_Cfunc_PDF_new +var __cgofn__cgo_0d5f714d6325_Cfunc_PDF_new byte +var _cgo_0d5f714d6325_Cfunc_PDF_new = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc_PDF_new) + +//go:cgo_unsafe_args +func _Cfunc_PDF_new() (r1 *_Ctype_struct_PDF_s) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc_PDF_new, uintptr(unsafe.Pointer(&r1))) + if _Cgo_always_false { + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_add_nameddest +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_nameddest _cgo_0d5f714d6325_Cfunc__PDF_add_nameddest +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_nameddest byte +var _cgo_0d5f714d6325_Cfunc__PDF_add_nameddest = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_nameddest) + +//go:cgo_unsafe_args +func _Cfunc__PDF_add_nameddest(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_add_nameddest, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_add_path_point +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_path_point _cgo_0d5f714d6325_Cfunc__PDF_add_path_point +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_path_point byte +var _cgo_0d5f714d6325_Cfunc__PDF_add_path_point = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_path_point) + +//go:cgo_unsafe_args +func _Cfunc__PDF_add_path_point(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_double, p3 _Ctype_double, p4 *_Ctype_char, p5 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_add_path_point, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_add_table_cell +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_table_cell _cgo_0d5f714d6325_Cfunc__PDF_add_table_cell +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_table_cell byte +var _cgo_0d5f714d6325_Cfunc__PDF_add_table_cell = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_table_cell) + +//go:cgo_unsafe_args +func _Cfunc__PDF_add_table_cell(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_int, p3 _Ctype_int, p4 *_Ctype_char, p5 _Ctype_int, p6 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_add_table_cell, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_add_textflow +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_textflow _cgo_0d5f714d6325_Cfunc__PDF_add_textflow +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_textflow byte +var _cgo_0d5f714d6325_Cfunc__PDF_add_textflow = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_add_textflow) + +//go:cgo_unsafe_args +func _Cfunc__PDF_add_textflow(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 _Ctype_int, p4 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_add_textflow, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_align +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_align _cgo_0d5f714d6325_Cfunc__PDF_align +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_align byte +var _cgo_0d5f714d6325_Cfunc__PDF_align = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_align) + +//go:cgo_unsafe_args +func _Cfunc__PDF_align(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_align, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_arc +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_arc _cgo_0d5f714d6325_Cfunc__PDF_arc +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_arc byte +var _cgo_0d5f714d6325_Cfunc__PDF_arc = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_arc) + +//go:cgo_unsafe_args +func _Cfunc__PDF_arc(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_arc, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_arcn +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_arcn _cgo_0d5f714d6325_Cfunc__PDF_arcn +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_arcn byte +var _cgo_0d5f714d6325_Cfunc__PDF_arcn = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_arcn) + +//go:cgo_unsafe_args +func _Cfunc__PDF_arcn(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_arcn, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_begin_document +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_document _cgo_0d5f714d6325_Cfunc__PDF_begin_document +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_document byte +var _cgo_0d5f714d6325_Cfunc__PDF_begin_document = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_document) + +//go:cgo_unsafe_args +func _Cfunc__PDF_begin_document(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_begin_document, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_begin_font +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_font _cgo_0d5f714d6325_Cfunc__PDF_begin_font +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_font byte +var _cgo_0d5f714d6325_Cfunc__PDF_begin_font = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_font) + +//go:cgo_unsafe_args +func _Cfunc__PDF_begin_font(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 _Ctype_double, p7 _Ctype_double, p8 _Ctype_double, p9 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_begin_font, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + _Cgo_use(p7) + _Cgo_use(p8) + _Cgo_use(p9) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_begin_glyph +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_glyph _cgo_0d5f714d6325_Cfunc__PDF_begin_glyph +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_glyph byte +var _cgo_0d5f714d6325_Cfunc__PDF_begin_glyph = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_glyph) + +//go:cgo_unsafe_args +func _Cfunc__PDF_begin_glyph(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_begin_glyph, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_begin_item +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_item _cgo_0d5f714d6325_Cfunc__PDF_begin_item +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_item byte +var _cgo_0d5f714d6325_Cfunc__PDF_begin_item = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_item) + +//go:cgo_unsafe_args +func _Cfunc__PDF_begin_item(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_begin_item, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_begin_layer +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_layer _cgo_0d5f714d6325_Cfunc__PDF_begin_layer +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_layer byte +var _cgo_0d5f714d6325_Cfunc__PDF_begin_layer = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_layer) + +//go:cgo_unsafe_args +func _Cfunc__PDF_begin_layer(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_begin_layer, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_begin_page_ext +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_page_ext _cgo_0d5f714d6325_Cfunc__PDF_begin_page_ext +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_page_ext byte +var _cgo_0d5f714d6325_Cfunc__PDF_begin_page_ext = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_page_ext) + +//go:cgo_unsafe_args +func _Cfunc__PDF_begin_page_ext(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_begin_page_ext, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_begin_pattern +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_pattern _cgo_0d5f714d6325_Cfunc__PDF_begin_pattern +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_pattern byte +var _cgo_0d5f714d6325_Cfunc__PDF_begin_pattern = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_pattern) + +//go:cgo_unsafe_args +func _Cfunc__PDF_begin_pattern(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_int) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_begin_pattern, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_begin_template_ext +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_template_ext _cgo_0d5f714d6325_Cfunc__PDF_begin_template_ext +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_template_ext byte +var _cgo_0d5f714d6325_Cfunc__PDF_begin_template_ext = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_begin_template_ext) + +//go:cgo_unsafe_args +func _Cfunc__PDF_begin_template_ext(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_begin_template_ext, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_circle +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_circle _cgo_0d5f714d6325_Cfunc__PDF_circle +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_circle byte +var _cgo_0d5f714d6325_Cfunc__PDF_circle = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_circle) + +//go:cgo_unsafe_args +func _Cfunc__PDF_circle(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_circle, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_circular_arc +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_circular_arc _cgo_0d5f714d6325_Cfunc__PDF_circular_arc +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_circular_arc byte +var _cgo_0d5f714d6325_Cfunc__PDF_circular_arc = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_circular_arc) + +//go:cgo_unsafe_args +func _Cfunc__PDF_circular_arc(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_circular_arc, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_clip +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_clip _cgo_0d5f714d6325_Cfunc__PDF_clip +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_clip byte +var _cgo_0d5f714d6325_Cfunc__PDF_clip = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_clip) + +//go:cgo_unsafe_args +func _Cfunc__PDF_clip(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_clip, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_close_font +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_font _cgo_0d5f714d6325_Cfunc__PDF_close_font +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_font byte +var _cgo_0d5f714d6325_Cfunc__PDF_close_font = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_font) + +//go:cgo_unsafe_args +func _Cfunc__PDF_close_font(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_close_font, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_close_graphics +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_graphics _cgo_0d5f714d6325_Cfunc__PDF_close_graphics +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_graphics byte +var _cgo_0d5f714d6325_Cfunc__PDF_close_graphics = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_graphics) + +//go:cgo_unsafe_args +func _Cfunc__PDF_close_graphics(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_close_graphics, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_close_image +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_image _cgo_0d5f714d6325_Cfunc__PDF_close_image +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_image byte +var _cgo_0d5f714d6325_Cfunc__PDF_close_image = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_image) + +//go:cgo_unsafe_args +func _Cfunc__PDF_close_image(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_close_image, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_close_pdi_document +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_pdi_document _cgo_0d5f714d6325_Cfunc__PDF_close_pdi_document +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_pdi_document byte +var _cgo_0d5f714d6325_Cfunc__PDF_close_pdi_document = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_pdi_document) + +//go:cgo_unsafe_args +func _Cfunc__PDF_close_pdi_document(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_close_pdi_document, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_close_pdi_page +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_pdi_page _cgo_0d5f714d6325_Cfunc__PDF_close_pdi_page +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_pdi_page byte +var _cgo_0d5f714d6325_Cfunc__PDF_close_pdi_page = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_close_pdi_page) + +//go:cgo_unsafe_args +func _Cfunc__PDF_close_pdi_page(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_close_pdi_page, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_closepath +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath _cgo_0d5f714d6325_Cfunc__PDF_closepath +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath byte +var _cgo_0d5f714d6325_Cfunc__PDF_closepath = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath) + +//go:cgo_unsafe_args +func _Cfunc__PDF_closepath(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_closepath, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_closepath_fill_stroke +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath_fill_stroke _cgo_0d5f714d6325_Cfunc__PDF_closepath_fill_stroke +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath_fill_stroke byte +var _cgo_0d5f714d6325_Cfunc__PDF_closepath_fill_stroke = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath_fill_stroke) + +//go:cgo_unsafe_args +func _Cfunc__PDF_closepath_fill_stroke(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_closepath_fill_stroke, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_closepath_stroke +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath_stroke _cgo_0d5f714d6325_Cfunc__PDF_closepath_stroke +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath_stroke byte +var _cgo_0d5f714d6325_Cfunc__PDF_closepath_stroke = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_closepath_stroke) + +//go:cgo_unsafe_args +func _Cfunc__PDF_closepath_stroke(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_closepath_stroke, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_concat +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_concat _cgo_0d5f714d6325_Cfunc__PDF_concat +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_concat byte +var _cgo_0d5f714d6325_Cfunc__PDF_concat = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_concat) + +//go:cgo_unsafe_args +func _Cfunc__PDF_concat(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_concat, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_continue_text +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_continue_text _cgo_0d5f714d6325_Cfunc__PDF_continue_text +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_continue_text byte +var _cgo_0d5f714d6325_Cfunc__PDF_continue_text = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_continue_text) + +//go:cgo_unsafe_args +func _Cfunc__PDF_continue_text(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_continue_text, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_3dview +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_3dview _cgo_0d5f714d6325_Cfunc__PDF_create_3dview +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_3dview byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_3dview = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_3dview) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_3dview(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_3dview, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_action +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_action _cgo_0d5f714d6325_Cfunc__PDF_create_action +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_action byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_action = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_action) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_action(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_action, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_annotation +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_annotation _cgo_0d5f714d6325_Cfunc__PDF_create_annotation +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_annotation byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_annotation = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_annotation) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_annotation(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 *_Ctype_char, p6 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_annotation, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_bookmark +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_bookmark _cgo_0d5f714d6325_Cfunc__PDF_create_bookmark +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_bookmark byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_bookmark = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_bookmark) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_bookmark(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_bookmark, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_field +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_field _cgo_0d5f714d6325_Cfunc__PDF_create_field +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_field byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_field = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_field) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_field(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 *_Ctype_char, p6 _Ctype_int, p7 *_Ctype_char, p8 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_field, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + _Cgo_use(p7) + _Cgo_use(p8) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_fieldgroup +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_fieldgroup _cgo_0d5f714d6325_Cfunc__PDF_create_fieldgroup +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_fieldgroup byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_fieldgroup = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_fieldgroup) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_fieldgroup(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_fieldgroup, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_gstate +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_gstate _cgo_0d5f714d6325_Cfunc__PDF_create_gstate +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_gstate byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_gstate = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_gstate) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_gstate(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_gstate, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_pvf +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_pvf _cgo_0d5f714d6325_Cfunc__PDF_create_pvf +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_pvf byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_pvf = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_pvf) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_pvf(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 unsafe.Pointer, p4 _Ctype_size_t, p5 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_pvf, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_create_textflow +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_textflow _cgo_0d5f714d6325_Cfunc__PDF_create_textflow +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_textflow byte +var _cgo_0d5f714d6325_Cfunc__PDF_create_textflow = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_create_textflow) + +//go:cgo_unsafe_args +func _Cfunc__PDF_create_textflow(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_create_textflow, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_curveto +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_curveto _cgo_0d5f714d6325_Cfunc__PDF_curveto +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_curveto byte +var _cgo_0d5f714d6325_Cfunc__PDF_curveto = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_curveto) + +//go:cgo_unsafe_args +func _Cfunc__PDF_curveto(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_curveto, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_define_layer +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_define_layer _cgo_0d5f714d6325_Cfunc__PDF_define_layer +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_define_layer byte +var _cgo_0d5f714d6325_Cfunc__PDF_define_layer = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_define_layer) + +//go:cgo_unsafe_args +func _Cfunc__PDF_define_layer(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_define_layer, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_delete +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete _cgo_0d5f714d6325_Cfunc__PDF_delete +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete byte +var _cgo_0d5f714d6325_Cfunc__PDF_delete = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete) + +//go:cgo_unsafe_args +func _Cfunc__PDF_delete(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_delete, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_delete_path +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_path _cgo_0d5f714d6325_Cfunc__PDF_delete_path +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_path byte +var _cgo_0d5f714d6325_Cfunc__PDF_delete_path = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_path) + +//go:cgo_unsafe_args +func _Cfunc__PDF_delete_path(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_delete_path, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_delete_pvf +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_pvf _cgo_0d5f714d6325_Cfunc__PDF_delete_pvf +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_pvf byte +var _cgo_0d5f714d6325_Cfunc__PDF_delete_pvf = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_pvf) + +//go:cgo_unsafe_args +func _Cfunc__PDF_delete_pvf(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_delete_pvf, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_delete_table +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_table _cgo_0d5f714d6325_Cfunc__PDF_delete_table +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_table byte +var _cgo_0d5f714d6325_Cfunc__PDF_delete_table = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_table) + +//go:cgo_unsafe_args +func _Cfunc__PDF_delete_table(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_delete_table, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_delete_textflow +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_textflow _cgo_0d5f714d6325_Cfunc__PDF_delete_textflow +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_textflow byte +var _cgo_0d5f714d6325_Cfunc__PDF_delete_textflow = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_delete_textflow) + +//go:cgo_unsafe_args +func _Cfunc__PDF_delete_textflow(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_delete_textflow, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_draw_path +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_draw_path _cgo_0d5f714d6325_Cfunc__PDF_draw_path +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_draw_path byte +var _cgo_0d5f714d6325_Cfunc__PDF_draw_path = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_draw_path) + +//go:cgo_unsafe_args +func _Cfunc__PDF_draw_path(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_double, p3 _Ctype_double, p4 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_draw_path, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_ellipse +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_ellipse _cgo_0d5f714d6325_Cfunc__PDF_ellipse +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_ellipse byte +var _cgo_0d5f714d6325_Cfunc__PDF_ellipse = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_ellipse) + +//go:cgo_unsafe_args +func _Cfunc__PDF_ellipse(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_ellipse, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_document +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_document _cgo_0d5f714d6325_Cfunc__PDF_end_document +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_document byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_document = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_document) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_document(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_document, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_font +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_font _cgo_0d5f714d6325_Cfunc__PDF_end_font +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_font byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_font = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_font) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_font(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_font, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_glyph +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_glyph _cgo_0d5f714d6325_Cfunc__PDF_end_glyph +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_glyph byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_glyph = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_glyph) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_glyph(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_glyph, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_item +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_item _cgo_0d5f714d6325_Cfunc__PDF_end_item +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_item byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_item = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_item) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_item(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_item, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_layer +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_layer _cgo_0d5f714d6325_Cfunc__PDF_end_layer +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_layer byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_layer = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_layer) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_layer(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_layer, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_mc +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_mc _cgo_0d5f714d6325_Cfunc__PDF_end_mc +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_mc byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_mc = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_mc) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_mc(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_mc, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_page_ext +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_page_ext _cgo_0d5f714d6325_Cfunc__PDF_end_page_ext +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_page_ext byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_page_ext = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_page_ext) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_page_ext(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_page_ext, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_pattern +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_pattern _cgo_0d5f714d6325_Cfunc__PDF_end_pattern +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_pattern byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_pattern = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_pattern) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_pattern(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_pattern, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_end_template_ext +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_template_ext _cgo_0d5f714d6325_Cfunc__PDF_end_template_ext +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_template_ext byte +var _cgo_0d5f714d6325_Cfunc__PDF_end_template_ext = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_end_template_ext) + +//go:cgo_unsafe_args +func _Cfunc__PDF_end_template_ext(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_end_template_ext, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_endpath +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_endpath _cgo_0d5f714d6325_Cfunc__PDF_endpath +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_endpath byte +var _cgo_0d5f714d6325_Cfunc__PDF_endpath = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_endpath) + +//go:cgo_unsafe_args +func _Cfunc__PDF_endpath(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_endpath, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fill +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill _cgo_0d5f714d6325_Cfunc__PDF_fill +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill byte +var _cgo_0d5f714d6325_Cfunc__PDF_fill = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fill(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fill, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fill_imageblock +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_imageblock _cgo_0d5f714d6325_Cfunc__PDF_fill_imageblock +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_imageblock byte +var _cgo_0d5f714d6325_Cfunc__PDF_fill_imageblock = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_imageblock) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fill_imageblock(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 _Ctype_int, p4 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fill_imageblock, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fill_pdfblock +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_pdfblock _cgo_0d5f714d6325_Cfunc__PDF_fill_pdfblock +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_pdfblock byte +var _cgo_0d5f714d6325_Cfunc__PDF_fill_pdfblock = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_pdfblock) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fill_pdfblock(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 _Ctype_int, p4 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fill_pdfblock, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fill_stroke +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_stroke _cgo_0d5f714d6325_Cfunc__PDF_fill_stroke +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_stroke byte +var _cgo_0d5f714d6325_Cfunc__PDF_fill_stroke = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_stroke) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fill_stroke(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fill_stroke, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fill_textblock +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_textblock _cgo_0d5f714d6325_Cfunc__PDF_fill_textblock +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_textblock byte +var _cgo_0d5f714d6325_Cfunc__PDF_fill_textblock = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fill_textblock) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fill_textblock(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 *_Ctype_char, p4 _Ctype_int, p5 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fill_textblock, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fit_graphics +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_graphics _cgo_0d5f714d6325_Cfunc__PDF_fit_graphics +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_graphics byte +var _cgo_0d5f714d6325_Cfunc__PDF_fit_graphics = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_graphics) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fit_graphics(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_double, p3 _Ctype_double, p4 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fit_graphics, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fit_image +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_image _cgo_0d5f714d6325_Cfunc__PDF_fit_image +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_image byte +var _cgo_0d5f714d6325_Cfunc__PDF_fit_image = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_image) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fit_image(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_double, p3 _Ctype_double, p4 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fit_image, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fit_pdi_page +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_pdi_page _cgo_0d5f714d6325_Cfunc__PDF_fit_pdi_page +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_pdi_page byte +var _cgo_0d5f714d6325_Cfunc__PDF_fit_pdi_page = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_pdi_page) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fit_pdi_page(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_double, p3 _Ctype_double, p4 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fit_pdi_page, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fit_table +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_table _cgo_0d5f714d6325_Cfunc__PDF_fit_table +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_table byte +var _cgo_0d5f714d6325_Cfunc__PDF_fit_table = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_table) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fit_table(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 *_Ctype_char) (r1 *_Ctype_char) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fit_table, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fit_textflow +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_textflow _cgo_0d5f714d6325_Cfunc__PDF_fit_textflow +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_textflow byte +var _cgo_0d5f714d6325_Cfunc__PDF_fit_textflow = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_textflow) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fit_textflow(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 *_Ctype_char) (r1 *_Ctype_char) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fit_textflow, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_fit_textline +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_textline _cgo_0d5f714d6325_Cfunc__PDF_fit_textline +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_textline byte +var _cgo_0d5f714d6325_Cfunc__PDF_fit_textline = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_fit_textline) + +//go:cgo_unsafe_args +func _Cfunc__PDF_fit_textline(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 _Ctype_double, p4 _Ctype_double, p5 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_fit_textline, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_get_errmsg +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_errmsg _cgo_0d5f714d6325_Cfunc__PDF_get_errmsg +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_errmsg byte +var _cgo_0d5f714d6325_Cfunc__PDF_get_errmsg = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_errmsg) + +//go:cgo_unsafe_args +func _Cfunc__PDF_get_errmsg(p0 *_Ctype_struct_PDF_s) (r1 *_Ctype_char) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_get_errmsg, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_get_errnum +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_errnum _cgo_0d5f714d6325_Cfunc__PDF_get_errnum +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_errnum byte +var _cgo_0d5f714d6325_Cfunc__PDF_get_errnum = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_errnum) + +//go:cgo_unsafe_args +func _Cfunc__PDF_get_errnum(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_get_errnum, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_get_parameter +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_parameter _cgo_0d5f714d6325_Cfunc__PDF_get_parameter +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_parameter byte +var _cgo_0d5f714d6325_Cfunc__PDF_get_parameter = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_parameter) + +//go:cgo_unsafe_args +func _Cfunc__PDF_get_parameter(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_double) (r1 *_Ctype_char) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_get_parameter, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_get_value +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_value _cgo_0d5f714d6325_Cfunc__PDF_get_value +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_value byte +var _cgo_0d5f714d6325_Cfunc__PDF_get_value = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_get_value) + +//go:cgo_unsafe_args +func _Cfunc__PDF_get_value(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_double) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_get_value, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_font +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_font _cgo_0d5f714d6325_Cfunc__PDF_info_font +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_font byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_font = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_font) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_font(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_font, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_graphics +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_graphics _cgo_0d5f714d6325_Cfunc__PDF_info_graphics +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_graphics byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_graphics = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_graphics) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_graphics(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_graphics, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_image +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_image _cgo_0d5f714d6325_Cfunc__PDF_info_image +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_image byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_image = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_image) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_image(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_image, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_matchbox +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_matchbox _cgo_0d5f714d6325_Cfunc__PDF_info_matchbox +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_matchbox byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_matchbox = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_matchbox) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_matchbox(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 _Ctype_int, p4 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_matchbox, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_path +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_path _cgo_0d5f714d6325_Cfunc__PDF_info_path +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_path byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_path = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_path) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_path(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_path, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_pdi_page +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_pdi_page _cgo_0d5f714d6325_Cfunc__PDF_info_pdi_page +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_pdi_page byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_pdi_page = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_pdi_page) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_pdi_page(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char, p3 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_pdi_page, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_table +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_table _cgo_0d5f714d6325_Cfunc__PDF_info_table +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_table byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_table = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_table) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_table(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_table, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_textflow +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_textflow _cgo_0d5f714d6325_Cfunc__PDF_info_textflow +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_textflow byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_textflow = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_textflow) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_textflow(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_textflow, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_info_textline +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_textline _cgo_0d5f714d6325_Cfunc__PDF_info_textline +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_textline byte +var _cgo_0d5f714d6325_Cfunc__PDF_info_textline = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_info_textline) + +//go:cgo_unsafe_args +func _Cfunc__PDF_info_textline(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char, p4 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_info_textline, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_initgraphics +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_initgraphics _cgo_0d5f714d6325_Cfunc__PDF_initgraphics +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_initgraphics byte +var _cgo_0d5f714d6325_Cfunc__PDF_initgraphics = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_initgraphics) + +//go:cgo_unsafe_args +func _Cfunc__PDF_initgraphics(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_initgraphics, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_lineto +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_lineto _cgo_0d5f714d6325_Cfunc__PDF_lineto +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_lineto byte +var _cgo_0d5f714d6325_Cfunc__PDF_lineto = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_lineto) + +//go:cgo_unsafe_args +func _Cfunc__PDF_lineto(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_lineto, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_load_3ddata +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_3ddata _cgo_0d5f714d6325_Cfunc__PDF_load_3ddata +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_3ddata byte +var _cgo_0d5f714d6325_Cfunc__PDF_load_3ddata = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_3ddata) + +//go:cgo_unsafe_args +func _Cfunc__PDF_load_3ddata(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_load_3ddata, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_load_font +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_font _cgo_0d5f714d6325_Cfunc__PDF_load_font +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_font byte +var _cgo_0d5f714d6325_Cfunc__PDF_load_font = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_font) + +//go:cgo_unsafe_args +func _Cfunc__PDF_load_font(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char, p4 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_load_font, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_load_graphics +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_graphics _cgo_0d5f714d6325_Cfunc__PDF_load_graphics +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_graphics byte +var _cgo_0d5f714d6325_Cfunc__PDF_load_graphics = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_graphics) + +//go:cgo_unsafe_args +func _Cfunc__PDF_load_graphics(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char, p3 _Ctype_int, p4 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_load_graphics, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_load_iccprofile +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_iccprofile _cgo_0d5f714d6325_Cfunc__PDF_load_iccprofile +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_iccprofile byte +var _cgo_0d5f714d6325_Cfunc__PDF_load_iccprofile = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_iccprofile) + +//go:cgo_unsafe_args +func _Cfunc__PDF_load_iccprofile(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_load_iccprofile, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_load_image +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_image _cgo_0d5f714d6325_Cfunc__PDF_load_image +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_image byte +var _cgo_0d5f714d6325_Cfunc__PDF_load_image = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_load_image) + +//go:cgo_unsafe_args +func _Cfunc__PDF_load_image(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char, p3 _Ctype_int, p4 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_load_image, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_makespotcolor +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_makespotcolor _cgo_0d5f714d6325_Cfunc__PDF_makespotcolor +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_makespotcolor byte +var _cgo_0d5f714d6325_Cfunc__PDF_makespotcolor = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_makespotcolor) + +//go:cgo_unsafe_args +func _Cfunc__PDF_makespotcolor(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_makespotcolor, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_mc_point +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_mc_point _cgo_0d5f714d6325_Cfunc__PDF_mc_point +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_mc_point byte +var _cgo_0d5f714d6325_Cfunc__PDF_mc_point = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_mc_point) + +//go:cgo_unsafe_args +func _Cfunc__PDF_mc_point(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_mc_point, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_moveto +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_moveto _cgo_0d5f714d6325_Cfunc__PDF_moveto +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_moveto byte +var _cgo_0d5f714d6325_Cfunc__PDF_moveto = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_moveto) + +//go:cgo_unsafe_args +func _Cfunc__PDF_moveto(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_moveto, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_open_pdi_document +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_open_pdi_document _cgo_0d5f714d6325_Cfunc__PDF_open_pdi_document +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_open_pdi_document byte +var _cgo_0d5f714d6325_Cfunc__PDF_open_pdi_document = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_open_pdi_document) + +//go:cgo_unsafe_args +func _Cfunc__PDF_open_pdi_document(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_open_pdi_document, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_open_pdi_page +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_open_pdi_page _cgo_0d5f714d6325_Cfunc__PDF_open_pdi_page +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_open_pdi_page byte +var _cgo_0d5f714d6325_Cfunc__PDF_open_pdi_page = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_open_pdi_page) + +//go:cgo_unsafe_args +func _Cfunc__PDF_open_pdi_page(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_open_pdi_page, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_pcos_get_number +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_pcos_get_number _cgo_0d5f714d6325_Cfunc__PDF_pcos_get_number +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_pcos_get_number byte +var _cgo_0d5f714d6325_Cfunc__PDF_pcos_get_number = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_pcos_get_number) + +//go:cgo_unsafe_args +func _Cfunc__PDF_pcos_get_number(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_pcos_get_number, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_pcos_get_string +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_pcos_get_string _cgo_0d5f714d6325_Cfunc__PDF_pcos_get_string +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_pcos_get_string byte +var _cgo_0d5f714d6325_Cfunc__PDF_pcos_get_string = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_pcos_get_string) + +//go:cgo_unsafe_args +func _Cfunc__PDF_pcos_get_string(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 *_Ctype_char) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_pcos_get_string, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_poca_delete +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_delete _cgo_0d5f714d6325_Cfunc__PDF_poca_delete +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_delete byte +var _cgo_0d5f714d6325_Cfunc__PDF_poca_delete = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_delete) + +//go:cgo_unsafe_args +func _Cfunc__PDF_poca_delete(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_poca_delete, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_poca_insert +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_insert _cgo_0d5f714d6325_Cfunc__PDF_poca_insert +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_insert byte +var _cgo_0d5f714d6325_Cfunc__PDF_poca_insert = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_insert) + +//go:cgo_unsafe_args +func _Cfunc__PDF_poca_insert(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_poca_insert, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_poca_new +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_new _cgo_0d5f714d6325_Cfunc__PDF_poca_new +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_new byte +var _cgo_0d5f714d6325_Cfunc__PDF_poca_new = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_new) + +//go:cgo_unsafe_args +func _Cfunc__PDF_poca_new(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_poca_new, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_poca_remove +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_remove _cgo_0d5f714d6325_Cfunc__PDF_poca_remove +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_remove byte +var _cgo_0d5f714d6325_Cfunc__PDF_poca_remove = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_poca_remove) + +//go:cgo_unsafe_args +func _Cfunc__PDF_poca_remove(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_poca_remove, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_process_pdi +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_process_pdi _cgo_0d5f714d6325_Cfunc__PDF_process_pdi +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_process_pdi byte +var _cgo_0d5f714d6325_Cfunc__PDF_process_pdi = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_process_pdi) + +//go:cgo_unsafe_args +func _Cfunc__PDF_process_pdi(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_int, p3 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_process_pdi, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_rcurveto +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_rcurveto _cgo_0d5f714d6325_Cfunc__PDF_rcurveto +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_rcurveto byte +var _cgo_0d5f714d6325_Cfunc__PDF_rcurveto = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_rcurveto) + +//go:cgo_unsafe_args +func _Cfunc__PDF_rcurveto(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_rcurveto, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_rect +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_rect _cgo_0d5f714d6325_Cfunc__PDF_rect +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_rect byte +var _cgo_0d5f714d6325_Cfunc__PDF_rect = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_rect) + +//go:cgo_unsafe_args +func _Cfunc__PDF_rect(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_rect, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_restore +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_restore _cgo_0d5f714d6325_Cfunc__PDF_restore +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_restore byte +var _cgo_0d5f714d6325_Cfunc__PDF_restore = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_restore) + +//go:cgo_unsafe_args +func _Cfunc__PDF_restore(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_restore, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_resume_page +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_resume_page _cgo_0d5f714d6325_Cfunc__PDF_resume_page +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_resume_page byte +var _cgo_0d5f714d6325_Cfunc__PDF_resume_page = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_resume_page) + +//go:cgo_unsafe_args +func _Cfunc__PDF_resume_page(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_resume_page, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_rotate +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_rotate _cgo_0d5f714d6325_Cfunc__PDF_rotate +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_rotate byte +var _cgo_0d5f714d6325_Cfunc__PDF_rotate = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_rotate) + +//go:cgo_unsafe_args +func _Cfunc__PDF_rotate(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_rotate, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_save +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_save _cgo_0d5f714d6325_Cfunc__PDF_save +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_save byte +var _cgo_0d5f714d6325_Cfunc__PDF_save = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_save) + +//go:cgo_unsafe_args +func _Cfunc__PDF_save(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_save, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_scale +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_scale _cgo_0d5f714d6325_Cfunc__PDF_scale +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_scale byte +var _cgo_0d5f714d6325_Cfunc__PDF_scale = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_scale) + +//go:cgo_unsafe_args +func _Cfunc__PDF_scale(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_scale, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_set_graphics_option +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_graphics_option _cgo_0d5f714d6325_Cfunc__PDF_set_graphics_option +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_graphics_option byte +var _cgo_0d5f714d6325_Cfunc__PDF_set_graphics_option = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_graphics_option) + +//go:cgo_unsafe_args +func _Cfunc__PDF_set_graphics_option(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_set_graphics_option, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_set_gstate +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_gstate _cgo_0d5f714d6325_Cfunc__PDF_set_gstate +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_gstate byte +var _cgo_0d5f714d6325_Cfunc__PDF_set_gstate = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_gstate) + +//go:cgo_unsafe_args +func _Cfunc__PDF_set_gstate(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_set_gstate, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_set_info +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_info _cgo_0d5f714d6325_Cfunc__PDF_set_info +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_info byte +var _cgo_0d5f714d6325_Cfunc__PDF_set_info = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_info) + +//go:cgo_unsafe_args +func _Cfunc__PDF_set_info(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_set_info, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_set_layer_dependency +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_layer_dependency _cgo_0d5f714d6325_Cfunc__PDF_set_layer_dependency +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_layer_dependency byte +var _cgo_0d5f714d6325_Cfunc__PDF_set_layer_dependency = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_layer_dependency) + +//go:cgo_unsafe_args +func _Cfunc__PDF_set_layer_dependency(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_set_layer_dependency, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_set_option +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_option _cgo_0d5f714d6325_Cfunc__PDF_set_option +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_option byte +var _cgo_0d5f714d6325_Cfunc__PDF_set_option = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_option) + +//go:cgo_unsafe_args +func _Cfunc__PDF_set_option(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_set_option, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_set_parameter +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_parameter _cgo_0d5f714d6325_Cfunc__PDF_set_parameter +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_parameter byte +var _cgo_0d5f714d6325_Cfunc__PDF_set_parameter = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_parameter) + +//go:cgo_unsafe_args +func _Cfunc__PDF_set_parameter(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_set_parameter, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_set_text_pos +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_text_pos _cgo_0d5f714d6325_Cfunc__PDF_set_text_pos +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_text_pos byte +var _cgo_0d5f714d6325_Cfunc__PDF_set_text_pos = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_text_pos) + +//go:cgo_unsafe_args +func _Cfunc__PDF_set_text_pos(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_set_text_pos, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_set_value +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_value _cgo_0d5f714d6325_Cfunc__PDF_set_value +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_value byte +var _cgo_0d5f714d6325_Cfunc__PDF_set_value = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_set_value) + +//go:cgo_unsafe_args +func _Cfunc__PDF_set_value(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_set_value, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setcolor +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setcolor _cgo_0d5f714d6325_Cfunc__PDF_setcolor +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setcolor byte +var _cgo_0d5f714d6325_Cfunc__PDF_setcolor = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setcolor) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setcolor(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 *_Ctype_char, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setcolor, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setdash +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setdash _cgo_0d5f714d6325_Cfunc__PDF_setdash +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setdash byte +var _cgo_0d5f714d6325_Cfunc__PDF_setdash = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setdash) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setdash(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setdash, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setdashpattern +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setdashpattern _cgo_0d5f714d6325_Cfunc__PDF_setdashpattern +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setdashpattern byte +var _cgo_0d5f714d6325_Cfunc__PDF_setdashpattern = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setdashpattern) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setdashpattern(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setdashpattern, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setflat +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setflat _cgo_0d5f714d6325_Cfunc__PDF_setflat +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setflat byte +var _cgo_0d5f714d6325_Cfunc__PDF_setflat = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setflat) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setflat(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setflat, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setfont +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setfont _cgo_0d5f714d6325_Cfunc__PDF_setfont +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setfont byte +var _cgo_0d5f714d6325_Cfunc__PDF_setfont = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setfont) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setfont(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setfont, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setlinecap +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinecap _cgo_0d5f714d6325_Cfunc__PDF_setlinecap +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinecap byte +var _cgo_0d5f714d6325_Cfunc__PDF_setlinecap = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinecap) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setlinecap(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setlinecap, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setlinejoin +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinejoin _cgo_0d5f714d6325_Cfunc__PDF_setlinejoin +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinejoin byte +var _cgo_0d5f714d6325_Cfunc__PDF_setlinejoin = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinejoin) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setlinejoin(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setlinejoin, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setlinewidth +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinewidth _cgo_0d5f714d6325_Cfunc__PDF_setlinewidth +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinewidth byte +var _cgo_0d5f714d6325_Cfunc__PDF_setlinewidth = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setlinewidth) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setlinewidth(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setlinewidth, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setmatrix +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setmatrix _cgo_0d5f714d6325_Cfunc__PDF_setmatrix +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setmatrix byte +var _cgo_0d5f714d6325_Cfunc__PDF_setmatrix = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setmatrix) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setmatrix(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setmatrix, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_setmiterlimit +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setmiterlimit _cgo_0d5f714d6325_Cfunc__PDF_setmiterlimit +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_setmiterlimit byte +var _cgo_0d5f714d6325_Cfunc__PDF_setmiterlimit = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_setmiterlimit) + +//go:cgo_unsafe_args +func _Cfunc__PDF_setmiterlimit(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_setmiterlimit, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_shading +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_shading _cgo_0d5f714d6325_Cfunc__PDF_shading +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_shading byte +var _cgo_0d5f714d6325_Cfunc__PDF_shading = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_shading) + +//go:cgo_unsafe_args +func _Cfunc__PDF_shading(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_double, p3 _Ctype_double, p4 _Ctype_double, p5 _Ctype_double, p6 _Ctype_double, p7 _Ctype_double, p8 _Ctype_double, p9 _Ctype_double, p10 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_shading, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + _Cgo_use(p4) + _Cgo_use(p5) + _Cgo_use(p6) + _Cgo_use(p7) + _Cgo_use(p8) + _Cgo_use(p9) + _Cgo_use(p10) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_shading_pattern +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_shading_pattern _cgo_0d5f714d6325_Cfunc__PDF_shading_pattern +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_shading_pattern byte +var _cgo_0d5f714d6325_Cfunc__PDF_shading_pattern = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_shading_pattern) + +//go:cgo_unsafe_args +func _Cfunc__PDF_shading_pattern(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int, p2 *_Ctype_char) (r1 _Ctype_int) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_shading_pattern, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_shfill +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_shfill _cgo_0d5f714d6325_Cfunc__PDF_shfill +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_shfill byte +var _cgo_0d5f714d6325_Cfunc__PDF_shfill = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_shfill) + +//go:cgo_unsafe_args +func _Cfunc__PDF_shfill(p0 *_Ctype_struct_PDF_s, p1 _Ctype_int) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_shfill, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_show +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_show _cgo_0d5f714d6325_Cfunc__PDF_show +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_show byte +var _cgo_0d5f714d6325_Cfunc__PDF_show = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_show) + +//go:cgo_unsafe_args +func _Cfunc__PDF_show(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_show, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_show_xy +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_show_xy _cgo_0d5f714d6325_Cfunc__PDF_show_xy +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_show_xy byte +var _cgo_0d5f714d6325_Cfunc__PDF_show_xy = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_show_xy) + +//go:cgo_unsafe_args +func _Cfunc__PDF_show_xy(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_double, p3 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_show_xy, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_skew +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_skew _cgo_0d5f714d6325_Cfunc__PDF_skew +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_skew byte +var _cgo_0d5f714d6325_Cfunc__PDF_skew = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_skew) + +//go:cgo_unsafe_args +func _Cfunc__PDF_skew(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_skew, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_stringwidth +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_stringwidth _cgo_0d5f714d6325_Cfunc__PDF_stringwidth +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_stringwidth byte +var _cgo_0d5f714d6325_Cfunc__PDF_stringwidth = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_stringwidth) + +//go:cgo_unsafe_args +func _Cfunc__PDF_stringwidth(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char, p2 _Ctype_int, p3 _Ctype_double) (r1 _Ctype_double) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_stringwidth, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + _Cgo_use(p3) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_stroke +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_stroke _cgo_0d5f714d6325_Cfunc__PDF_stroke +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_stroke byte +var _cgo_0d5f714d6325_Cfunc__PDF_stroke = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_stroke) + +//go:cgo_unsafe_args +func _Cfunc__PDF_stroke(p0 *_Ctype_struct_PDF_s) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_stroke, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_suspend_page +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_suspend_page _cgo_0d5f714d6325_Cfunc__PDF_suspend_page +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_suspend_page byte +var _cgo_0d5f714d6325_Cfunc__PDF_suspend_page = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_suspend_page) + +//go:cgo_unsafe_args +func _Cfunc__PDF_suspend_page(p0 *_Ctype_struct_PDF_s, p1 *_Ctype_char) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_suspend_page, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + } + return +} +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__PDF_translate +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__PDF_translate _cgo_0d5f714d6325_Cfunc__PDF_translate +var __cgofn__cgo_0d5f714d6325_Cfunc__PDF_translate byte +var _cgo_0d5f714d6325_Cfunc__PDF_translate = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__PDF_translate) + +//go:cgo_unsafe_args +func _Cfunc__PDF_translate(p0 *_Ctype_struct_PDF_s, p1 _Ctype_double, p2 _Ctype_double) (r1 _Ctype_void) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__PDF_translate, uintptr(unsafe.Pointer(&p0))) + if _Cgo_always_false { + _Cgo_use(p0) + _Cgo_use(p1) + _Cgo_use(p2) + } + return +} + +//go:cgo_import_static _cgo_0d5f714d6325_Cfunc__Cmalloc +//go:linkname __cgofn__cgo_0d5f714d6325_Cfunc__Cmalloc _cgo_0d5f714d6325_Cfunc__Cmalloc +var __cgofn__cgo_0d5f714d6325_Cfunc__Cmalloc byte +var _cgo_0d5f714d6325_Cfunc__Cmalloc = unsafe.Pointer(&__cgofn__cgo_0d5f714d6325_Cfunc__Cmalloc) + +//go:linkname runtime_throw runtime.throw +func runtime_throw(string) + +//go:cgo_unsafe_args +func _cgo_cmalloc(p0 uint64) (r1 unsafe.Pointer) { + _cgo_runtime_cgocall(_cgo_0d5f714d6325_Cfunc__Cmalloc, uintptr(unsafe.Pointer(&p0))) + if r1 == nil { + runtime_throw("runtime: C malloc failed") + } + return +} diff --git a/pdflib10/_obj/_cgo_main.c b/pdflib10/_obj/_cgo_main.c new file mode 100644 index 0000000..1dcd2ad --- /dev/null +++ b/pdflib10/_obj/_cgo_main.c @@ -0,0 +1,10 @@ +#include +int main() { return 0; } +void crosscall2(void(*fn)(void*) __attribute__((unused)), void *a __attribute__((unused)), int c __attribute__((unused)), size_t ctxt __attribute__((unused))) { } +size_t _cgo_wait_runtime_init_done(void) { return 0; } +void _cgo_release_context(size_t ctxt __attribute__((unused))) { } +char* _cgo_topofstack(void) { return (char*)0; } +void _cgo_allocate(void *a __attribute__((unused)), int c __attribute__((unused))) { } +void _cgo_panic(void *a __attribute__((unused)), int c __attribute__((unused))) { } +void _cgo_reginit(void) { } +#line 1 "cgo-generated-wrappers" diff --git a/pdflib10/generated.go b/pdflib10/generated.go new file mode 100644 index 0000000..7b47918 --- /dev/null +++ b/pdflib10/generated.go @@ -0,0 +1,851 @@ +// Copyright © 2016 Abcum Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this info except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build cgo + +package pdflib +// #cgo LDFLAGS: -L /home/athul/pdflib/pdflib10/lib/ -lpdf -lm -lstdc++ +// #include +// #include +// #include "golang.h" +// #include "pdflib.h" +import "C" +import "errors" +import "unsafe" + + +// PDFlib represents a PDFlib instance. +type PDFlib struct { + val *C.PDF +} + +// New creates a new PDFlb instance. +func New() *PDFlib { + pdflib := &PDFlib{val: C.PDF_new()} + pdflib.SetOption("errorpolicy=exception") + return pdflib +} + +func (p *PDFlib) catch() error { + if num := C._PDF_get_errnum(p.val); num > 0 { + return errors.New(C.GoString(C._PDF_get_errmsg(p.val))) + } + return nil +} + +// AddNamedDest ... +func (p *PDFlib) AddNamedDest(name, options string) error { + C._PDF_add_nameddest(p.val, C.CString(name), 0, C.CString(options)) + return p.catch() +} + +// AddPathPoint ... +func (p *PDFlib) AddPathPoint(path int, x, y float64, kind, options string) (int, error) { + ret := int(C._PDF_add_path_point(p.val, C.int(path), C.double(x), C.double(y), C.CString(kind), C.CString(options))) + return ret, p.catch() +} + +// AddTableCell ... +func (p *PDFlib) AddTableCell(table, col, row int, text, options string) (int, error) { + ret := int(C._PDF_add_table_cell(p.val, C.int(table), C.int(col), C.int(row), C.CString(text), 0, C.CString(options))) + return ret, p.catch() +} + +// AddTextflow ... +func (p *PDFlib) AddTextflow(textflow int, text, options string) (int, error) { + ret := int(C._PDF_add_textflow(p.val, C.int(textflow), C.CString(text), 0, C.CString(options))) + return ret, p.catch() +} + +// Align ... +func (p *PDFlib) Align(x, y float64) error { + C._PDF_align(p.val, C.double(x), C.double(y)) + return p.catch() +} + +// Arc ... +func (p *PDFlib) Arc(x, y, r, alpha, beta float64) error { + C._PDF_arc(p.val, C.double(x), C.double(y), C.double(r), C.double(alpha), C.double(beta)) + return p.catch() +} + +// Arcn ... +func (p *PDFlib) Arcn(x, y, r, alpha, beta float64) error { + C._PDF_arcn(p.val, C.double(x), C.double(y), C.double(r), C.double(alpha), C.double(beta)) + return p.catch() +} + +// BeginDocument ... +func (p *PDFlib) BeginDocument(filename, options string) (int, error) { + ret := int(C._PDF_begin_document(p.val, C.CString(filename), 0, C.CString(options))) + return ret, p.catch() +} + +// BeginFont ... +func (p *PDFlib) BeginFont(fontname string, a, b, c, d, e, f float64, options string) error { + C._PDF_begin_font(p.val, C.CString(fontname), 0, C.double(a), C.double(b), C.double(c), C.double(d), C.double(e), C.double(f), C.CString(options)) + return p.catch() +} + +// BeginGlyphExt ... +func (p *PDFlib) BeginGlyphExt(uv int, options string) error { + C._PDF_begin_glyph_ext(p.val, C.int(uv),C.CString(options)) + return p.catch() +} + +// BeginItem .. +func (p *PDFlib) BeginItem(tag, options string) (int, error) { + ret := int(C._PDF_begin_item(p.val, C.CString(tag), C.CString(options))) + return ret, p.catch() +} + +// BeginLayer .. +func (p *PDFlib) BeginLayer(layer int) error { + C._PDF_begin_layer(p.val, C.int(layer)) + return p.catch() +} + +// BeginPageExt adds a new page to the document, and specify various options. +func (p *PDFlib) BeginPageExt(w, h float64, options string) error { + C._PDF_begin_page_ext(p.val, C.double(w), C.double(h), C.CString(options)) + return p.catch() +} + +// BeginPatternExt .. +func (p *PDFlib) BeginPatternExt(w, h float64, options string) (int, error) { + ret := int(C._PDF_begin_pattern_ext(p.val, C.double(w), C.double(h), C.CString(options))) + return ret, p.catch() +} + +// BeginTemplate ... +func (p *PDFlib) BeginTemplate(w, h float64, options string) (int, error) { + ret := int(C._PDF_begin_template_ext(p.val, C.double(w), C.double(h), C.CString(options))) + return ret, p.catch() +} + +// Circle ... +func (p *PDFlib) Circle(x, y, r float64) error { + C._PDF_circle(p.val, C.double(x), C.double(y), C.double(r)) + return p.catch() +} + +// CircularArc ... +func (p *PDFlib) CircularArc(x1, y1, x2, y2 float64) error { + C._PDF_circular_arc(p.val, C.double(x1), C.double(y1), C.double(x2), C.double(y2)) + return p.catch() +} + +// Clip ... +func (p *PDFlib) Clip() error { + C._PDF_clip(p.val) + return p.catch() +} + +// CloseFont closes an open font handle which has not yet been used in the document. +func (p *PDFlib) CloseFont(font int) error { + C._PDF_close_font(p.val, C.int(font)) + return p.catch() +} + +// CloseGraphics closes vector graphics. +func (p *PDFlib) CloseGraphics(graphics int) error { + C._PDF_close_graphics(p.val, C.int(graphics)) + return p.catch() +} + +// CloseImage closes an image ... +func (p *PDFlib) CloseImage(image int) error { + C._PDF_close_image(p.val, C.int(image)) + return p.catch() +} + +// ClosePdiDocument ... +func (p *PDFlib) ClosePdiDocument(doc int) error { + C._PDF_close_pdi_document(p.val, C.int(doc)) + return p.catch() +} + +// ClosePdiPage ... +func (p *PDFlib) ClosePdiPage(page int) error { + C._PDF_close_pdi_page(p.val, C.int(page)) + return p.catch() +} + +// ClosePath ... +func (p *PDFlib) ClosePath() error { + C._PDF_closepath(p.val) + return p.catch() +} + +// ClosePathFillStroke ... +func (p *PDFlib) ClosePathFillStroke() error { + C._PDF_closepath_fill_stroke(p.val) + return p.catch() +} + +// ClosePathStroke ... +func (p *PDFlib) ClosePathStroke() error { + C._PDF_closepath_stroke(p.val) + return p.catch() +} + +// Concat ... +func (p *PDFlib) Concat(a, b, c, d, e, f float64) error { + C._PDF_concat(p.val, C.double(a), C.double(b), C.double(c), C.double(d), C.double(e), C.double(f)) + return p.catch() +} + +// ContinueText ... +func (p *PDFlib) ContinueText(text string) error { + C._PDF_continue_text(p.val, C.CString(text)) + return p.catch() +} + +// Create3dView ... +func (p *PDFlib) Create3dView(username, options string) error { + C._PDF_create_3dview(p.val, C.CString(username), 0, C.CString(options)) + return p.catch() +} + +// CreateAction ... +func (p *PDFlib) CreateAction(kind, options string) (int, error) { + ret := int(C._PDF_create_action(p.val, C.CString(kind), C.CString(options))) + return ret, p.catch() +} + +// CreateAnnotation ... +func (p *PDFlib) CreateAnnotation(llx, llr, urx, ury float64, kind, options string) error { + C._PDF_create_annotation(p.val, C.double(llx), C.double(llr), C.double(urx), C.double(ury), C.CString(kind), C.CString(options)) + return p.catch() +} + +// CreateBookmark ... +func (p *PDFlib) CreateBookmark(text, options string) (int, error) { + ret := int(C._PDF_create_bookmark(p.val, C.CString(text), 0, C.CString(options))) + return ret, p.catch() +} + +// CreateField ... +func (p *PDFlib) CreateField(llx, lly, urx, ury float64, name, kind, options string) error { + C._PDF_create_field(p.val, C.double(llx), C.double(lly), C.double(urx), C.double(ury), C.CString(name), 0, C.CString(kind), C.CString(options)) + return p.catch() +} + +// CreateFieldgroup ... +func (p *PDFlib) CreateFieldgroup(name, options string) error { + C._PDF_create_fieldgroup(p.val, C.CString(name), 0, C.CString(options)) + return p.catch() +} + +// CreateGstate ... +func (p *PDFlib) CreateGstate(options string) (int, error) { + ret := int(C._PDF_create_gstate(p.val, C.CString(options))) + return ret, p.catch() +} + +// CreatePvf ... +func (p *PDFlib) CreatePvf(filename string, data []byte, options string) error { + C._PDF_create_pvf(p.val, C.CString(filename), 0, unsafe.Pointer(&data[0]), C.size_t(len(data)), C.CString(options)) + return p.catch() +} + +// CreateTextflow ... +func (p *PDFlib) CreateTextflow(text, options string) (int, error) { + ret := int(C._PDF_create_textflow(p.val, C.CString(text), 0, C.CString(options))) + return ret, p.catch() +} + +// CurveTo ... +func (p *PDFlib) CurveTo(x1, y1, x2, y2, x3, y3 float64) error { + C._PDF_curveto(p.val, C.double(x1), C.double(y1), C.double(x2), C.double(y2), C.double(x3), C.double(y3)) + return p.catch() +} + +// DefineLayer ... +func (p *PDFlib) DefineLayer(name, options string) (int, error) { + ret := int(C._PDF_define_layer(p.val, C.CString(name), 0, C.CString(options))) + return ret, p.catch() +} + +// Delete ... +func (p *PDFlib) Delete() { + C._PDF_delete(p.val) +} + +// DeletePath ... +func (p *PDFlib) DeletePath(path int) error { + C._PDF_delete_path(p.val, C.int(path)) + return p.catch() +} + +// DeletePvf ... +func (p *PDFlib) DeletePvf(filename string) error { + C._PDF_delete_pvf(p.val, C.CString(filename), 0) + return p.catch() +} + +// DeleteTable ... +func (p *PDFlib) DeleteTable(table int, options string) error { + C._PDF_delete_table(p.val, C.int(table), C.CString(options)) + return p.catch() +} + +// DeleteTextflow ... +func (p *PDFlib) DeleteTextflow(textflow int) error { + C._PDF_delete_textflow(p.val, C.int(textflow)) + return p.catch() +} + +// DrawPath ... +func (p *PDFlib) DrawPath(path int, x, y float64, options string) error { + C._PDF_draw_path(p.val, C.int(path), C.double(x), C.double(y), C.CString(options)) + return p.catch() +} + +// Ellipse ... +func (p *PDFlib) Ellipse(x, y, rx, ry float64) error { + C._PDF_ellipse(p.val, C.double(x), C.double(y), C.double(rx), C.double(ry)) + return p.catch() +} + +// EndDocument ... +func (p *PDFlib) EndDocument(options string) error { + C._PDF_end_document(p.val, C.CString(options)) + return p.catch() +} + +// EndFont ... +func (p *PDFlib) EndFont() error { + C._PDF_end_font(p.val) + return p.catch() +} + +// EndGlyph ... +func (p *PDFlib) EndGlyph() error { + C._PDF_end_glyph(p.val) + return p.catch() +} + +// EndItem ... +func (p *PDFlib) EndItem(id int) error { + C._PDF_end_item(p.val, C.int(id)) + return p.catch() +} + +// EndLayer ... +func (p *PDFlib) EndLayer() error { + C._PDF_end_layer(p.val) + return p.catch() +} + +// EndMc ... +func (p *PDFlib) EndMc() error { + C._PDF_end_mc(p.val) + return p.catch() +} + +// EndPageExt ... +func (p *PDFlib) EndPageExt(options string) error { + C._PDF_end_page_ext(p.val, C.CString(options)) + return p.catch() +} + +// EndPattern ... +func (p *PDFlib) EndPattern() error { + C._PDF_end_pattern(p.val) + return p.catch() +} + +// EndTemplateExt ... +func (p *PDFlib) EndTemplateExt(w, h float64) error { + C._PDF_end_template_ext(p.val, C.double(w), C.double(h)) + return p.catch() +} + +// EndPath ... +func (p *PDFlib) EndPath() error { + C._PDF_endpath(p.val) + return p.catch() +} + +// Fill ... +func (p *PDFlib) Fill() error { + C._PDF_fill(p.val) + return p.catch() +} + +// FillImageblock ... +func (p *PDFlib) FillImageblock(page int, blockname string, image int, options string) (int, error) { + ret := int(C._PDF_fill_imageblock(p.val, C.int(page), C.CString(blockname), C.int(image), C.CString(options))) + return ret, p.catch() +} + +// FillPdfblock ... +func (p *PDFlib) FillPdfblock(page int, blockname string, content int, options string) (int, error) { + ret := int(C._PDF_fill_pdfblock(p.val, C.int(page), C.CString(blockname), C.int(content), C.CString(options))) + return ret, p.catch() +} + +// FillStroke ... +func (p *PDFlib) FillStroke() error { + C._PDF_fill_stroke(p.val) + return p.catch() +} + +// FillTextblock ... +func (p *PDFlib) FillTextblock(page int, blockname, text, options string) (int, error) { + ret := int(C._PDF_fill_textblock(p.val, C.int(page), C.CString(blockname), C.CString(text), 0, C.CString(options))) + return ret, p.catch() +} + +// FitGraphics places vector graphics on a content stream, subject to various options. +func (p *PDFlib) FitGraphics(graphics int, x, y float64, options string) error { + C._PDF_fit_graphics(p.val, C.int(graphics), C.double(x), C.double(y), C.CString(options)) + return p.catch() +} + +// FitImage ... +func (p *PDFlib) FitImage(image int, x, y float64, options string) error { + C._PDF_fit_image(p.val, C.int(image), C.double(x), C.double(y), C.CString(options)) + return p.catch() +} + +// FitPdiPage ... +func (p *PDFlib) FitPdiPage(page int, x, y float64, options string) error { + C._PDF_fit_pdi_page(p.val, C.int(page), C.double(x), C.double(y), C.CString(options)) + return p.catch() +} + +// FitTable ... +func (p *PDFlib) FitTable(table int, llx, lly, urx, ury float64, options string) (string, error) { + ret := C.GoString(C._PDF_fit_table(p.val, C.int(table), C.double(llx), C.double(lly), C.double(urx), C.double(ury), C.CString(options))) + return ret, p.catch() +} + +// FitTextflow ... +func (p *PDFlib) FitTextflow(textflow int, llx, lly, urx, ury float64, options string) (string, error) { + ret := C.GoString(C._PDF_fit_textflow(p.val, C.int(textflow), C.double(llx), C.double(lly), C.double(urx), C.double(ury), C.CString(options))) + return ret, p.catch() +} + +// FitTextline ... +func (p *PDFlib) FitTextline(text string, x, y float64, options string) error { + C._PDF_fit_textline(p.val, C.CString(text), 0, C.double(x), C.double(y), C.CString(options)) + return p.catch() +} + +// GetBuffer ... +func (p *PDFlib) GetBuffer() ([]byte, int, error) { + var size C.long + ret := []byte(C.GoStringN(C.PDF_get_buffer(p.val, &size), C.int(size))) + return ret, int(size), p.catch() +} + +// FIXME +// // GetParameter ... +// func (p *PDFlib) GetParameter(key string, modifier float64) (string, error) { +// ret := C.GoString(C._PDF_get_parameter(p.val, C.CString(key), C.double(modifier))) +// return ret, p.catch() +// } + +// FIXME +// // GetValue ... +// func (p *PDFlib) GetValue(key string, modifier float64) (float64, error) { +// ret := float64(C._PDF_get_value(p.val, C.CString(key), C.double(modifier))) +// return ret, p.catch() +// } + +// InfoFont ... +func (p *PDFlib) InfoFont(font int, keyword, options string) (float64, error) { + ret := float64(C._PDF_info_font(p.val, C.int(font), C.CString(keyword), C.CString(options))) + return ret, p.catch() +} + +// InfoGraphics formats vector graphics and query metrics and other properties. +func (p *PDFlib) InfoGraphics(graphics int, keyword, options string) (float64, error) { + ret := float64(C._PDF_info_graphics(p.val, C.int(graphics), C.CString(keyword), C.CString(options))) + return ret, p.catch() +} + +// InfoImage ... +func (p *PDFlib) InfoImage(image int, keyword, options string) (float64, error) { + ret := float64(C._PDF_info_image(p.val, C.int(image), C.CString(keyword), C.CString(options))) + return ret, p.catch() +} + +// InfoMatchbox ... +func (p *PDFlib) InfoMatchbox(boxname string, num int, keyword string) (float64, error) { + ret := float64(C._PDF_info_matchbox(p.val, C.CString(boxname), 0, C.int(num), C.CString(keyword))) + return ret, p.catch() +} + +// InfoPath ... +func (p *PDFlib) InfoPath(path int, keyword, options string) (float64, error) { + ret := float64(C._PDF_info_path(p.val, C.int(path), C.CString(keyword), C.CString(options))) + return ret, p.catch() +} + +// InfoPdiPage ... +func (p *PDFlib) InfoPdiPage(page int, keyword, options string) (float64, error) { + ret := float64(C._PDF_info_pdi_page(p.val, C.int(page), C.CString(keyword), C.CString(options))) + return ret, p.catch() +} + +// InfoTable ... +func (p *PDFlib) InfoTable(table int, keyword string) (float64, error) { + ret := float64(C._PDF_info_table(p.val, C.int(table), C.CString(keyword))) + return ret, p.catch() +} + +// InfoTextflow ... +func (p *PDFlib) InfoTextflow(textflow int, keyword string) (float64, error) { + ret := float64(C._PDF_info_textflow(p.val, C.int(textflow), C.CString(keyword))) + return ret, p.catch() +} + +// InfoTextline ... +func (p *PDFlib) InfoTextline(text, keyword, options string) (float64, error) { + ret := float64(C._PDF_info_textline(p.val, C.CString(text), 0, C.CString(keyword), C.CString(options))) + return ret, p.catch() +} + +// FIXME +// // InitGraphics ... +// func (p *PDFlib) InitGraphics() error { +// C._PDF_initgraphics(p.val) +// return p.catch() +// } + +// LineTo ... +func (p *PDFlib) LineTo(x, y float64) error { + C._PDF_lineto(p.val, C.double(x), C.double(y)) + return p.catch() +} + +// Load3dData ... +func (p *PDFlib) Load3dData(filename, options string) (int, error) { + ret := int(C._PDF_load_3ddata(p.val, C.CString(filename), 0, C.CString(options))) + return ret, p.catch() +} + +// LoadFont ... +func (p *PDFlib) LoadFont(fontname, encoding, options string) (int, error) { + ret := int(C._PDF_load_font(p.val, C.CString(fontname), 0, C.CString(encoding), C.CString(options))) + return ret, p.catch() +} + +// LoadGraphics opens a disk-based or virtual vector graphics file subject to various options +func (p *PDFlib) LoadGraphics(graphicstype, filename, options string) (int, error) { + ret := int(C._PDF_load_graphics(p.val, C.CString(graphicstype), C.CString(filename), 0, C.CString(options))) + return ret, p.catch() +} + +// LoadIccProfile ... +func (p *PDFlib) LoadIccProfile(profilename, options string) (int, error) { + ret := int(C._PDF_load_iccprofile(p.val, C.CString(profilename), 0, C.CString(options))) + return ret, p.catch() +} + +// LoadImage ... +func (p *PDFlib) LoadImage(imagetype, filename, options string) (int, error) { + ret := int(C._PDF_load_image(p.val, C.CString(imagetype), C.CString(filename), 0, C.CString(options))) + return ret, p.catch() +} + +// MakeSpotColor ... +func (p *PDFlib) MakeSpotColor(spotname string) (int, error) { + ret := int(C._PDF_makespotcolor(p.val, C.CString(spotname), 0)) + return ret, p.catch() +} + +// McPoint ... +func (p *PDFlib) McPoint(tag, options string) error { + C._PDF_mc_point(p.val, C.CString(tag), C.CString(options)) + return p.catch() +} + +// MoveTo ... +func (p *PDFlib) MoveTo(x, y float64) error { + C._PDF_moveto(p.val, C.double(x), C.double(y)) + return p.catch() +} + +// OpenPdiDocument ... +func (p *PDFlib) OpenPdiDocument(filename, options string) (int, error) { + ret := int(C._PDF_open_pdi_document(p.val, C.CString(filename), 0, C.CString(options))) + return ret, p.catch() +} + +// OpenPdiPage ... +func (p *PDFlib) OpenPdiPage(doc, page int, options string) (int, error) { + ret := int(C._PDF_open_pdi_page(p.val, C.int(doc), C.int(page), C.CString(options))) + return ret, p.catch() +} + +// PcosGetNumber ... +func (p *PDFlib) PcosGetNumber(doc int, path string) (float64, error) { + ret := float64(C._PDF_pcos_get_number(p.val, C.int(doc), C.CString(path))) + return ret, p.catch() +} + +// PcosGetString ... +func (p *PDFlib) PcosGetString(doc int, path string) (string, error) { + ret := string(C.GoString(C._PDF_pcos_get_string(p.val, C.int(doc), C.CString(path)))) + return ret, p.catch() +} + +// PcosGetStream ... +func (p *PDFlib) PcosGetStream(doc int, options, path string) (string, error) { + ret := "" // string(C.GoString(C._PDF_pcos_get_stream(p.val, C.int(doc), 0, C.CString(options), C.CString(path)))) + return ret, p.catch() +} + +// PocaDelete ... +func (p *PDFlib) PocaDelete(container int, options string) error { + C._PDF_poca_delete(p.val, C.int(container), C.CString(options)) + return p.catch() +} + +// PocaInsert ... +func (p *PDFlib) PocaInsert(container int, options string) error { + C._PDF_poca_insert(p.val, C.int(container), C.CString(options)) + return p.catch() +} + +// PocaNew ... +func (p *PDFlib) PocaNew(options string) (int, error) { + ret := int(C._PDF_poca_new(p.val, C.CString(options))) + return ret, p.catch() +} + +// PocaRemove ... +func (p *PDFlib) PocaRemove(container int, options string) error { + C._PDF_poca_remove(p.val, C.int(container), C.CString(options)) + return p.catch() +} + +// ProcessPdi ... +func (p *PDFlib) ProcessPdi(doc, page int, options string) (int, error) { + ret := int(C._PDF_process_pdi(p.val, C.int(doc), C.int(page), C.CString(options))) + return ret, p.catch() +} + +// FIXME +// // RCurveTo ... +// func (p *PDFlib) RCurveTo(x1, y1, x2, y2, x3, y3 float64) error { +// C._PDF_rcurveto(p.val, C.double(x1), C.double(x1), C.double(y1), C.double(x2), C.double(y2), C.double(y3)) +// return p.catch() +// } + +// Rect ... +func (p *PDFlib) Rect(x, y, w, h float64) error { + C._PDF_rect(p.val, C.double(x), C.double(y), C.double(w), C.double(h)) + return p.catch() +} + +// Restore ... +func (p *PDFlib) Restore() error { + C._PDF_restore(p.val) + return p.catch() +} + +// ResumePage ... +func (p *PDFlib) ResumePage(options string) error { + C._PDF_resume_page(p.val, C.CString(options)) + return p.catch() +} + +// Rotate ... +func (p *PDFlib) Rotate(phi float64) error { + C._PDF_rotate(p.val, C.double(phi)) + return p.catch() +} + +// Save ... +func (p *PDFlib) Save() error { + C._PDF_save(p.val) + return p.catch() +} + +// Scale ... +func (p *PDFlib) Scale(sx, sy float64) error { + C._PDF_scale(p.val, C.double(sx), C.double(sy)) + return p.catch() +} + +// SetGraphicsOption sets one or more graphics appearance options. +func (p *PDFlib) SetGraphicsOption(options string) error { + C._PDF_set_graphics_option(p.val, C.CString(options)) + return p.catch() +} + +// SetGstate ... +func (p *PDFlib) SetGstate(gstate int) error { + C._PDF_set_gstate(p.val, C.int(gstate)) + return p.catch() +} + +// SetInfo ... +func (p *PDFlib) SetInfo(key, value string) error { + C._PDF_set_info(p.val, C.CString(key), C.CString(value)) + return p.catch() +} + +// SetLayerDependency ... +func (p *PDFlib) SetLayerDependency(kind, options string) error { + C._PDF_set_layer_dependency(p.val, C.CString(kind), C.CString(options)) + return p.catch() +} + +// SetOption ... +func (p *PDFlib) SetOption(options string) error { + C._PDF_set_option(p.val, C.CString(options)) + return p.catch() +} + + +// SetTextPos ... +func (p *PDFlib) SetTextPos(x, y float64) error { + C._PDF_set_text_pos(p.val, C.double(x), C.double(y)) + return p.catch() +} + +// FIXME +// // SetValue ... +// func (p *PDFlib) SetValue(key string, value float64) error { +// C._PDF_set_value(p.val, C.CString(key), C.double(value)) +// return p.catch() +// } + +// SetColor ... +func (p *PDFlib) SetColor(fstype, colorspace string, c1, c2, c3, c4 float64) error { + C._PDF_setcolor(p.val, C.CString(fstype), C.CString(colorspace), C.double(c1), C.double(c2), C.double(c3), C.double(c4)) + return p.catch() +} + +// FIXME +// // SetDash ... +// func (p *PDFlib) SetDash(b, w float64) error { +// C._PDF_setdash(p.val, C.double(b), C.double(w)) +// return p.catch() +// } + +// FIXME +// // SetDashPattern ... +// func (p *PDFlib) SetDashPattern(options string) error { +// C._PDF_setdashpattern(p.val, C.CString(options)) +// return p.catch() +// } + +// // SetFlat ... +// func (p *PDFlib) SetFlat(flatness float64) error { +// C._PDF_setflat(p.val, C.double(flatness)) +// return p.catch() +// } + +// SetFont ... +func (p *PDFlib) SetFont(font int, fontsize float64) error { + C._PDF_setfont(p.val, C.int(font), C.double(fontsize)) + return p.catch() +} + +// // SetLinecap ... +// func (p *PDFlib) SetLinecap(linecap int) error { +// C._PDF_setlinecap(p.val, C.int(linecap)) +// return p.catch() +// } + +// // SetLinejoin ... +// func (p *PDFlib) SetLinejoin(linejoin int) error { +// C._PDF_setlinejoin(p.val, C.int(linejoin)) +// return p.catch() +// } + +// SetLinewidth ... +func (p *PDFlib) SetLinewidth(width float64) error { + C._PDF_setlinewidth(p.val, C.double(width)) + return p.catch() +} + +// SetMatrix ... +func (p *PDFlib) SetMatrix(a, b, c, d, e, f float64) error { + C._PDF_setmatrix(p.val, C.double(a), C.double(b), C.double(c), C.double(d), C.double(e), C.double(f)) + return p.catch() +} + +// // SetMiterLimit ... +// func (p *PDFlib) SetMiterLimit(miter float64) error { +// C._PDF_setmiterlimit(p.val, C.double(miter)) +// return p.catch() +// } + +// Shading ... +func (p *PDFlib) Shading(shtype string, x0, y0, x1, y1, c1, c2, c3, c4 float64, options string) (int, error) { + ret := int(C._PDF_shading(p.val, C.CString(shtype), C.double(x0), C.double(y0), C.double(x1), C.double(y1), C.double(c1), C.double(c2), C.double(c3), C.double(c4), C.CString(options))) + return ret, p.catch() +} + +// ShadingPattern ... +func (p *PDFlib) ShadingPattern(shading int, options string) (int, error) { + ret := int(C._PDF_shading_pattern(p.val, C.int(shading), C.CString(options))) + return ret, p.catch() +} + +// Shfill ... +func (p *PDFlib) Shfill(shading int) error { + C._PDF_shfill(p.val, C.int(shading)) + return p.catch() +} + +// Show ... +func (p *PDFlib) Show(text string) error { + C._PDF_show(p.val, C.CString(text)) + return p.catch() +} + +// ShowXY ... +func (p *PDFlib) ShowXY(text string, x, y float64) error { + C._PDF_show_xy(p.val, C.CString(text), C.double(x), C.double(y)) + return p.catch() +} + +// Skew ... +func (p *PDFlib) Skew(alpha, beta float64) error { + C._PDF_skew(p.val, C.double(alpha), C.double(beta)) + return p.catch() +} + +// StringWidth ... +func (p *PDFlib) StringWidth(text string, font int, fontsize float64) (float64, error) { + ret := float64(C._PDF_stringwidth(p.val, C.CString(text), C.int(font), C.double(fontsize))) + return ret, p.catch() +} + +// Stroke ... +func (p *PDFlib) Stroke() error { + C._PDF_stroke(p.val) + return p.catch() +} + +// SuspendPage ... +func (p *PDFlib) SuspendPage(options string) error { + C._PDF_suspend_page(p.val, C.CString(options)) + return p.catch() +} + +// Translate ... +func (p *PDFlib) Translate(tx, ty float64) error { + C._PDF_translate(p.val, C.double(tx), C.double(ty)) + return p.catch() +} diff --git a/pdflib10/golang.c b/pdflib10/golang.c new file mode 100644 index 0000000..e98a958 --- /dev/null +++ b/pdflib10/golang.c @@ -0,0 +1,608 @@ +#include +#include "pdflib.h" + +void _PDF_activate_item(PDF *p, int id) { + PDF_TRY(p) { PDF_activate_item(p, id); } PDF_CATCH(p) { } +} + +void _PDF_add_nameddest(PDF *p, const char *name, int len, const char *optlist) { + PDF_TRY(p) { PDF_add_nameddest(p, name, len, optlist); } PDF_CATCH(p) { } +} + +int _PDF_add_path_point(PDF *p, int path, double x, double y, const char *type, const char *optlist) { + PDF_TRY(p) { return PDF_add_path_point(p, path, x, y, type, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_add_portfolio_file(PDF *p, int folder, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_add_portfolio_file(p, folder, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_add_portfolio_folder(PDF *p, int parent, const char *foldername, int len, const char *optlist) { + PDF_TRY(p) { return PDF_add_portfolio_folder(p, parent, foldername, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_add_table_cell(PDF *p, int table, int column, int row, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_add_table_cell(p, table, column, row, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_add_textflow(PDF *p, int textflow, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_add_textflow(p, textflow, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_align(PDF *p, double dx, double dy) { + PDF_TRY(p) { PDF_align(p, dx, dy); } PDF_CATCH(p) { } +} + +void _PDF_arc(PDF *p, double x, double y, double r, double alpha, double beta) { + PDF_TRY(p) { PDF_arc(p, x, y, r, alpha, beta); } PDF_CATCH(p) { } +} + +void _PDF_arcn(PDF *p, double x, double y, double r, double alpha, double beta) { + PDF_TRY(p) { PDF_arcn(p, x, y, r, alpha, beta); } PDF_CATCH(p) { } +} + +int _PDF_begin_document(PDF *p, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_begin_document(p, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _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) { + PDF_TRY(p) { PDF_begin_font(p, fontname, len, a, b, c, d, e, f, optlist); } PDF_CATCH(p) { } +} + +void _PDF_begin_glyph_ext(PDF *p, int uv, const char *optlist) { + PDF_TRY(p) { PDF_begin_glyph_ext(p, uv, optlist); } PDF_CATCH(p) { } +} + +int _PDF_begin_item(PDF *p, const char *tag, const char *optlist) { + PDF_TRY(p) { return PDF_begin_item(p, tag, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_begin_layer(PDF *p, int layer) { + PDF_TRY(p) { PDF_begin_layer(p, layer); } PDF_CATCH(p) { } +} + +void _PDF_begin_mc(PDF *p, const char *tag, const char *optlist) { + PDF_TRY(p) { PDF_begin_mc(p, tag, optlist); } PDF_CATCH(p) { } +} + +void _PDF_begin_page_ext(PDF *p, double width, double height, const char *optlist) { + PDF_TRY(p) { PDF_begin_page_ext(p, width, height, optlist); } PDF_CATCH(p) { } +} + + +int _PDF_begin_pattern_ext(PDF *p, double width, double height, const char *optlist) { + PDF_TRY(p) { return PDF_begin_pattern_ext(p, width, height, optlist); } PDF_CATCH(p) { } return 1; +} + +int _PDF_begin_template_ext(PDF *p, double width, double height, const char *optlist) { + PDF_TRY(p) { return PDF_begin_template_ext(p, width, height, optlist); } PDF_CATCH(p) { } return 1; +} + +void _PDF_circle(PDF *p, double x, double y, double r) { + PDF_TRY(p) { PDF_circle(p, x, y, r); } PDF_CATCH(p) { } +} + +void _PDF_circular_arc(PDF *p, double x_1, double y_1, double x_2, double y_2) { + PDF_TRY(p) { PDF_circular_arc(p, x_1, y_1, x_2, y_2); } PDF_CATCH(p) { } +} + +void _PDF_clip(PDF *p) { + PDF_TRY(p) { PDF_clip(p); } PDF_CATCH(p) { } +} + +void _PDF_close_font(PDF *p, int font) { + PDF_TRY(p) { PDF_close_font(p, font); } PDF_CATCH(p) { } +} + +void _PDF_close_graphics(PDF *p, int graphics) { + PDF_TRY(p) { PDF_close_graphics(p, graphics); } PDF_CATCH(p) { } +} + +void _PDF_close_image(PDF *p, int image) { + PDF_TRY(p) { PDF_close_image(p, image); } PDF_CATCH(p) { } +} + +void _PDF_close_pdi_document(PDF *p, int doc) { + PDF_TRY(p) { PDF_close_pdi_document(p, doc); } PDF_CATCH(p) { } +} + +void _PDF_close_pdi_page(PDF *p, int page) { + PDF_TRY(p) { PDF_close_pdi_page(p, page); } PDF_CATCH(p) { } +} + +void _PDF_closepath(PDF *p) { + PDF_TRY(p) { PDF_closepath(p); } PDF_CATCH(p) { } +} + +void _PDF_closepath_fill_stroke(PDF *p) { + PDF_TRY(p) { PDF_closepath_fill_stroke(p); } PDF_CATCH(p) { } +} + +void _PDF_closepath_stroke(PDF *p) { + PDF_TRY(p) { PDF_closepath_stroke(p); } PDF_CATCH(p) { } +} + +void _PDF_concat(PDF *p, double a, double b, double c, double d, double e, double f) { + PDF_TRY(p) { PDF_concat(p, a, b, c, d, e, f); } PDF_CATCH(p) { } +} + +void _PDF_continue_text(PDF *p, const char *text) { + PDF_TRY(p) { PDF_continue_text(p, text); } PDF_CATCH(p) { } +} + +void _PDF_continue_text2(PDF *p, const char *text, int len) { + PDF_TRY(p) { PDF_continue_text2(p, text, len); } PDF_CATCH(p) { } +} + +int _PDF_create_3dview(PDF *p, const char *username, int len, const char *optlist) { + PDF_TRY(p) { return PDF_create_3dview(p, username, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_create_action(PDF *p, const char *type, const char *optlist) { + PDF_TRY(p) { return PDF_create_action(p, type, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_create_annotation(PDF *p, double llx, double lly, double urx, double ury, const char *type, const char *optlist) { + PDF_TRY(p) { PDF_create_annotation(p, llx, lly, urx, ury, type, optlist); } PDF_CATCH(p) { } +} + +int _PDF_create_bookmark(PDF *p, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_create_bookmark(p, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_create_field(PDF *p, double llx, double lly, double urx, double ury, const char *name, int len, const char *type, const char *optlist) { + PDF_TRY(p) { PDF_create_field(p, llx, lly, urx, ury, name, len, type, optlist); } PDF_CATCH(p) { } +} + +void _PDF_create_fieldgroup(PDF *p, const char *name, int len, const char *optlist) { + PDF_TRY(p) { PDF_create_fieldgroup(p, name, len, optlist); } PDF_CATCH(p) { } +} + +int _PDF_create_gstate(PDF *p, const char *optlist) { + PDF_TRY(p) { return PDF_create_gstate(p, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_create_pvf(PDF *p, const char *filename, int len, const void *data, size_t size, const char *optlist) { + PDF_TRY(p) { PDF_create_pvf(p, filename, len, data, size, optlist); } PDF_CATCH(p) { } +} + +int _PDF_create_textflow(PDF *p, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_create_textflow(p, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_curveto(PDF *p, double x_1, double y_1, double x_2, double y_2, double x_3, double y_3) { + PDF_TRY(p) { PDF_curveto(p, x_1, y_1, x_2, y_2, x_3, y_3); } PDF_CATCH(p) { } +} + +int _PDF_define_layer(PDF *p, const char *name, int len, const char *optlist) { + PDF_TRY(p) { return PDF_define_layer(p, name, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_delete(PDF *p) { + PDF_delete(p); +} + +void _PDF_delete_path(PDF *p, int path) { + PDF_TRY(p) { PDF_delete_path(p, path); } PDF_CATCH(p) { } +} + +int _PDF_delete_pvf(PDF *p, const char *filename, int len) { + PDF_TRY(p) { return PDF_delete_pvf(p, filename, len); } PDF_CATCH(p) { } return -1; +} + +void _PDF_delete_table(PDF *p, int table, const char *optlist) { + PDF_TRY(p) { PDF_delete_table(p, table, optlist); } PDF_CATCH(p) { } +} + +void _PDF_delete_textflow(PDF *p, int textflow) { + PDF_TRY(p) { PDF_delete_textflow(p, textflow); } PDF_CATCH(p) { } +} + +void _PDF_draw_path(PDF *p, int path, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_draw_path(p, path, x, y, optlist); } PDF_CATCH(p) { } +} + +void _PDF_ellipse(PDF *p, double x, double y, double rx, double ry) { + PDF_TRY(p) { PDF_ellipse(p, x, y, rx, ry); } PDF_CATCH(p) { } +} + +void _PDF_encoding_set_char(PDF *p, const char *encoding, int slot, const char *glyphname, int uv) { + PDF_TRY(p) { PDF_encoding_set_char(p, encoding, slot, glyphname, uv); } PDF_CATCH(p) { } +} + +void _PDF_end_document(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_end_document(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_end_font(PDF *p) { + PDF_TRY(p) { PDF_end_font(p); } PDF_CATCH(p) { } +} + +void _PDF_end_glyph(PDF *p) { + PDF_TRY(p) { PDF_end_glyph(p); } PDF_CATCH(p) { } +} + +void _PDF_end_item(PDF *p, int id) { + PDF_TRY(p) { PDF_end_item(p, id); } PDF_CATCH(p) { } +} + +void _PDF_end_layer(PDF *p) { + PDF_TRY(p) { PDF_end_layer(p); } PDF_CATCH(p) { } +} + +void _PDF_end_mc(PDF *p) { + PDF_TRY(p) { PDF_end_mc(p); } PDF_CATCH(p) { } +} + +void _PDF_end_page_ext(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_end_page_ext(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_end_pattern(PDF *p) { + PDF_TRY(p) { PDF_end_pattern(p); } PDF_CATCH(p) { } +} + +void _PDF_end_template_ext(PDF *p, double width, double height) { + PDF_TRY(p) { PDF_end_template_ext(p, width, height); } PDF_CATCH(p) { } +} + +void _PDF_endpath(PDF *p) { + PDF_TRY(p) { PDF_endpath(p); } PDF_CATCH(p) { } +} + +void _PDF_fill(PDF *p) { + PDF_TRY(p) { PDF_fill(p); } PDF_CATCH(p) { } +} + +int _PDF_fill_imageblock(PDF *p, int page, const char *blockname, int image, const char *optlist) { + PDF_TRY(p) { return PDF_fill_imageblock(p, page, blockname, image, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_fill_pdfblock(PDF *p, int page, const char *blockname, int contents, const char *optlist) { + PDF_TRY(p) { return PDF_fill_pdfblock(p, page, blockname, contents, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_fill_stroke(PDF *p) { + PDF_TRY(p) { PDF_fill_stroke(p); } PDF_CATCH(p) { } +} + +int _PDF_fill_textblock(PDF *p, int page, const char *blockname, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_fill_textblock(p, page, blockname, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_fit_graphics(PDF *p, int graphics, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_fit_graphics(p, graphics, x, y, optlist); } PDF_CATCH(p) { } +} + +void _PDF_fit_image(PDF *p, int image, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_fit_image(p, image, x, y, optlist); } PDF_CATCH(p) { } +} + +void _PDF_fit_pdi_page(PDF *p, int page, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_fit_pdi_page(p, page, x, y, optlist); } PDF_CATCH(p) { } +} + +const char * _PDF_fit_table(PDF *p, int table, double llx, double lly, double urx, double ury, const char *optlist) { + PDF_TRY(p) { return PDF_fit_table(p, table, llx, lly, urx, ury, optlist); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_fit_textflow(PDF *p, int textflow, double llx, double lly, double urx, double ury, const char *optlist) { + PDF_TRY(p) { return PDF_fit_textflow(p, textflow, llx, lly, urx, ury, optlist); } PDF_CATCH(p) { } return ""; +} + +void _PDF_fit_textline(PDF *p, const char *text, int len, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_fit_textline(p, text, len, x, y, optlist); } PDF_CATCH(p) { } +} + +const char * _PDF_get_apiname(PDF *p) { + PDF_TRY(p) { return PDF_get_apiname(p); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_get_buffer(PDF *p, long *size) { + PDF_TRY(p) { return PDF_get_buffer(p, size); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_get_errmsg(PDF *p) { + PDF_TRY(p) { return PDF_get_errmsg(p); } PDF_CATCH(p) { } return ""; +} + +int _PDF_get_errnum(PDF *p) { + PDF_TRY(p) { return PDF_get_errnum(p); } PDF_CATCH(p) { } return 0; +} + +// double _PDF_get_value(PDF *p, const char *key, double modifier) { +// PDF_TRY(p) { return PDF_get_value(p, key, modifier); } PDF_CATCH(p) { } return -1; +// } + +double _PDF_info_font(PDF *p, int font, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_font(p, font, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_graphics(PDF *p, int graphics, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_graphics(p, graphics, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_image(PDF *p, int image, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_image(p, image, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_matchbox(PDF *p, const char *boxname, int len, int num, const char *keyword) { + PDF_TRY(p) { return PDF_info_matchbox(p, boxname, len, num, keyword); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_path(PDF *p, int path, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_path(p, path, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_pdi_page(PDF *p, int page, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_pdi_page(p, page, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_table(PDF *p, int table, const char *keyword) { + PDF_TRY(p) { return PDF_info_table(p, table, keyword); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_textflow(PDF *p, int textflow, const char *keyword) { + PDF_TRY(p) { return PDF_info_textflow(p, textflow, keyword); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_textline(PDF *p, const char *text, int len, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_textline(p, text, len, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +// void _PDF_initgraphics(PDF *p) { +// PDF_TRY(p) { PDF_initgraphics(p); } PDF_CATCH(p) { } +// } + +void _PDF_lineto(PDF *p, double x, double y) { + PDF_TRY(p) { PDF_lineto(p, x, y); } PDF_CATCH(p) { } +} + +int _PDF_load_3ddata(PDF *p, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_load_3ddata(p, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_load_font(PDF *p, const char *fontname, int len, const char *encoding, const char *optlist) { + PDF_TRY(p) { return PDF_load_font(p, fontname, len, encoding, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_load_graphics(PDF *p, const char *graphicstype, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_load_graphics(p, graphicstype, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_load_iccprofile(PDF *p, const char *profilename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_load_iccprofile(p, profilename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_load_image(PDF *p, const char *imagetype, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_load_image(p, imagetype, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_makespotcolor(PDF *p, const char *spotname, int reserved) { + PDF_TRY(p) { return PDF_makespotcolor(p, spotname, reserved); } PDF_CATCH(p) { } return -1; +} + +void _PDF_mc_point(PDF *p, const char *tag, const char *optlist) { + PDF_TRY(p) { PDF_mc_point(p, tag, optlist); } PDF_CATCH(p) { } +} + +void _PDF_moveto(PDF *p, double x, double y) { + PDF_TRY(p) { PDF_moveto(p, x, y); } PDF_CATCH(p) { } +} + +int _PDF_open_pdi_document(PDF *p, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_open_pdi_document(p, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_open_pdi_page(PDF *p, int doc, int pagenumber, const char *optlist) { + PDF_TRY(p) { return PDF_open_pdi_page(p, doc, pagenumber, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_pcos_get_number(PDF *p, int doc, const char *path) { + PDF_TRY(p) { return PDF_pcos_get_number(p, doc, path); } PDF_CATCH(p) { } return -1; +} + +const char * _PDF_pcos_get_string(PDF *p, int doc, const char *path) { + PDF_TRY(p) { return PDF_pcos_get_string(p, doc, path); } PDF_CATCH(p) { } return ""; +} + +const unsigned char * _PDF_pcos_get_stream(PDF *p, int doc, int *length, const char *optlist, const char *path) { + unsigned char *r; PDF_TRY(p) { return PDF_pcos_get_stream(p, doc, length, optlist, path); } PDF_CATCH(p) { } return r; +} + +void _PDF_poca_delete(PDF *p, int container, const char *optlist) { + PDF_TRY(p) { PDF_poca_delete(p, container, optlist); } PDF_CATCH(p) { } +} + +void _PDF_poca_insert(PDF *p, int container, const char *optlist) { + PDF_TRY(p) { PDF_poca_insert(p, container, optlist); } PDF_CATCH(p) { } +} + +int _PDF_poca_new(PDF *p, const char *optlist) { + PDF_TRY(p) { return PDF_poca_new(p, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_poca_remove(PDF *p, int container, const char *optlist) { + PDF_TRY(p) { PDF_poca_remove(p, container, optlist); } PDF_CATCH(p) { } +} + +int _PDF_process_pdi(PDF *p, int doc, int page, const char *optlist) { + PDF_TRY(p) { return PDF_process_pdi(p, doc, page, optlist); } PDF_CATCH(p) { } return -1; +} + +// void _PDF_rcurveto(PDF *p, double x_1, double y_1, double x_2, double y_2, double x_3, double y_3) { +// PDF_TRY(p) { PDF_rcurveto(p, x_1, y_1, x_2, y_2, x_3, y_3); } PDF_CATCH(p) { } +// } + +void _PDF_rect(PDF *p, double x, double y, double width, double height) { + PDF_TRY(p) { PDF_rect(p, x, y, width, height); } PDF_CATCH(p) { } +} + +void _PDF_restore(PDF *p) { + PDF_TRY(p) { PDF_restore(p); } PDF_CATCH(p) { } +} + +void _PDF_resume_page(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_resume_page(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_rotate(PDF *p, double phi) { + PDF_TRY(p) { PDF_rotate(p, phi); } PDF_CATCH(p) { } +} + +void _PDF_save(PDF *p) { + PDF_TRY(p) { PDF_save(p); } PDF_CATCH(p) { } +} + +void _PDF_scale(PDF *p, double sx, double sy) { + PDF_TRY(p) { PDF_scale(p, sx, sy); } PDF_CATCH(p) { } +} + +void _PDF_set_graphics_option(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_set_graphics_option(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_set_gstate(PDF *p, int gstate) { + PDF_TRY(p) { PDF_set_gstate(p, gstate); } PDF_CATCH(p) { } +} + +void _PDF_set_info(PDF *p, const char *key, const char *value) { + PDF_TRY(p) { PDF_set_info(p, key, value); } PDF_CATCH(p) { } +} + +void _PDF_set_info2(PDF *p, const char *key, const char *value, int len) { + PDF_TRY(p) { PDF_set_info2(p, key, value, len); } PDF_CATCH(p) { } +} + +void _PDF_set_layer_dependency(PDF *p, const char *type, const char *optlist) { + PDF_TRY(p) { PDF_set_layer_dependency(p, type, optlist); } PDF_CATCH(p) { } +} + +void _PDF_set_option(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_set_option(p, optlist); } PDF_CATCH(p) { } +} + + +void _PDF_set_text_pos(PDF *p, double x, double y) { + PDF_TRY(p) { PDF_set_text_pos(p, x, y); } PDF_CATCH(p) { } +} + +// void _PDF_set_value(PDF *p, const char *key, double value) { +// PDF_TRY(p) { PDF_set_value(p, key, value); } PDF_CATCH(p) { } +// } + +void _PDF_setcolor(PDF *p, const char *fstype, const char *colorspace, double c1, double c2, double c3, double c4) { + PDF_TRY(p) { PDF_setcolor(p, fstype, colorspace, c1, c2, c3, c4); } PDF_CATCH(p) { } +} + +// void _PDF_setdash(PDF *p, double b, double w) { +// PDF_TRY(p) { PDF_setdash(p, b, w); } PDF_CATCH(p) { } +// } + +// void _PDF_setdashpattern(PDF *p, const char *optlist) { +// PDF_TRY(p) { PDF_setdashpattern(p, optlist); } PDF_CATCH(p) { } +// } + +// void _PDF_setflat(PDF *p, double flatness) { +// PDF_TRY(p) { PDF_setflat(p, flatness); } PDF_CATCH(p) { } +// } + +void _PDF_setfont(PDF *p, int font, double fontsize) { + PDF_TRY(p) { PDF_setfont(p, font, fontsize); } PDF_CATCH(p) { } +} + +// void _PDF_setlinecap(PDF *p, int linecap) { +// PDF_TRY(p) { PDF_setlinecap(p, linecap); } PDF_CATCH(p) { } +// } + +// void _PDF_setlinejoin(PDF *p, int linejoin) { +// PDF_TRY(p) { PDF_setlinejoin(p, linejoin); } PDF_CATCH(p) { } +// } + +void _PDF_setlinewidth(PDF *p, double width) { + PDF_TRY(p) { PDF_setlinewidth(p, width); } PDF_CATCH(p) { } +} + +void _PDF_setmatrix(PDF *p, double a, double b, double c, double d, double e, double f) { + PDF_TRY(p) { PDF_setmatrix(p, a, b, c, d, e, f); } PDF_CATCH(p) { } +} + +// void _PDF_setmiterlimit(PDF *p, double miter) { +// PDF_TRY(p) { PDF_setmiterlimit(p, miter); } PDF_CATCH(p) { } +// } + +int _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) { + PDF_TRY(p) { PDF_shading(p, shtype, x_0, y_0, x_1, y_1, c_1, c_2, c_3, c_4, optlist); } PDF_CATCH(p) { } return 0; +} + +int _PDF_shading_pattern(PDF *p, int shading, const char *optlist) { + PDF_TRY(p) { return PDF_shading_pattern(p, shading, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_shfill(PDF *p, int shading) { + PDF_TRY(p) { PDF_shfill(p, shading); } PDF_CATCH(p) { } +} + +void _PDF_show(PDF *p, const char *text) { + PDF_TRY(p) { PDF_show(p, text); } PDF_CATCH(p) { } +} + +void _PDF_show2(PDF *p, const char *text, int len) { + PDF_TRY(p) { PDF_show2(p, text, len); } PDF_CATCH(p) { } +} + +void _PDF_show_xy(PDF *p, const char *text, double x, double y) { + PDF_TRY(p) { PDF_show_xy(p, text, x, y); } PDF_CATCH(p) { } +} + +void _PDF_show_xy2(PDF *p, const char *text, int len, double x, double y) { + PDF_TRY(p) { PDF_show_xy2(p, text, len, x, y); } PDF_CATCH(p) { } +} + +void _PDF_skew(PDF *p, double alpha, double beta) { + PDF_TRY(p) { PDF_skew(p, alpha, beta); } PDF_CATCH(p) { } +} + +double _PDF_stringwidth(PDF *p, const char *text, int font, double fontsize) { + PDF_TRY(p) { return PDF_stringwidth(p, text, font, fontsize); } PDF_CATCH(p) { } return -1; +} + +double _PDF_stringwidth2(PDF *p, const char *text, int len, int font, double fontsize) { + PDF_TRY(p) { return PDF_stringwidth2(p, text, len, font, fontsize); } PDF_CATCH(p) { } return -1; +} + +void _PDF_stroke(PDF *p) { + PDF_TRY(p) { PDF_stroke(p); } PDF_CATCH(p) { } +} + +void _PDF_suspend_page(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_suspend_page(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_translate(PDF *p, double tx, double ty) { + PDF_TRY(p) { PDF_translate(p, tx, ty); } PDF_CATCH(p) { } +} + +// const char * _PDF_utf16_to_utf8(PDF *p, const char *utf16string, int len, int *size) { +// PDF_TRY(p) { return PDF_utf16_to_utf8(p, utf16string, len, size); } PDF_CATCH(p) { } return ""; +// } + +// const char * _PDF_utf8_to_utf16(PDF *p, const char *utf8string, const char *ordering, int *size) { +// PDF_TRY(p) { return PDF_utf8_to_utf16(p, utf8string, ordering, size); } PDF_CATCH(p) { } return ""; +// } + +// const char * _PDF_utf32_to_utf8(PDF *p, const char *utf32string, int len, int *size) { +// PDF_TRY(p) { return PDF_utf32_to_utf8(p, utf32string, len, size); } PDF_CATCH(p) { } return ""; +// } + +// const char * _PDF_utf8_to_utf32(PDF *p, const char *utf8string, const char *ordering, int *size) { +// PDF_TRY(p) { return PDF_utf8_to_utf32(p, utf8string, ordering, size); } PDF_CATCH(p) { } return ""; +// } + +// const char * _PDF_utf16_to_utf32(PDF *p, const char *utf16string, int len, const char *ordering, int *size) { +// PDF_TRY(p) { return PDF_utf16_to_utf32(p, utf16string, len, ordering, size); } PDF_CATCH(p) { } return ""; +// } + +// const char * _PDF_utf32_to_utf16(PDF *p, const char *utf32string, int len, const char *ordering, int *size) { +// PDF_TRY(p) { return PDF_utf32_to_utf16(p, utf32string, len, ordering, size); } PDF_CATCH(p) { } return ""; +// } diff --git a/pdflib10/golang.h b/pdflib10/golang.h new file mode 100644 index 0000000..bcb342d --- /dev/null +++ b/pdflib10/golang.h @@ -0,0 +1,308 @@ +#include +#include "golang.c" +#include "pdflib.h" + +void temp(PDF *p, const char *text, int len, double x, double y, const char *optlist); + +void _PDF_activate_item(PDF *p, int id); + +void _PDF_add_nameddest(PDF *p, const char *name, int len, const char *optlist); + +int _PDF_add_path_point(PDF *p, int path, double x, double y, const char *type, const char *optlist); + +int _PDF_add_portfolio_file(PDF *p, int folder, const char *filename, int len, const char *optlist); + +int _PDF_add_portfolio_folder(PDF *p, int parent, const char *foldername, int len, const char *optlist); + +int _PDF_add_table_cell(PDF *p, int table, int column, int row, const char *text, int len, const char *optlist); + +int _PDF_add_textflow(PDF *p, int textflow, const char *text, int len, const char *optlist); + +void _PDF_align(PDF *p, double dx, double dy); + +void _PDF_arc(PDF *p, double x, double y, double r, double alpha, double beta); + +void _PDF_arcn(PDF *p, double x, double y, double r, double alpha, double beta); + +int _PDF_begin_document(PDF *p, const char *filename, int len, const char *optlist); + +void _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 _PDF_begin_glyph_ext(PDF *p, int uv, const char *optlist); + +int _PDF_begin_item(PDF *p, const char *tag, const char *optlist); + +void _PDF_begin_layer(PDF *p, int layer); + +void _PDF_begin_mc(PDF *p, const char *tag, const char *optlist); + +void _PDF_begin_page_ext(PDF *p, double width, double height, const char *optlist); + +int _PDF_begin_pattern_ext(PDF *p, double width, double height, const char *optlist); + +int _PDF_begin_template_ext(PDF *p, double width, double height, const char *optlist); + +void _PDF_circle(PDF *p, double x, double y, double r); + +void _PDF_circular_arc(PDF *p, double x_1, double y_1, double x_2, double y_2); + +void _PDF_clip(PDF *p); + +void _PDF_close_font(PDF *p, int font); + +void _PDF_close_graphics(PDF *p, int graphics); + +void _PDF_close_image(PDF *p, int image); + +void _PDF_close_pdi_document(PDF *p, int doc); + +void _PDF_close_pdi_page(PDF *p, int page); + +void _PDF_closepath(PDF *p); + +void _PDF_closepath_fill_stroke(PDF *p); + +void _PDF_closepath_stroke(PDF *p); + +void _PDF_concat(PDF *p, double a, double b, double c, double d, double e, double f); + +void _PDF_continue_text(PDF *p, const char *text); + +void _PDF_continue_text2(PDF *p, const char *text, int len); + +int _PDF_create_3dview(PDF *p, const char *username, int len, const char *optlist); + +int _PDF_create_action(PDF *p, const char *type, const char *optlist); + +void _PDF_create_annotation(PDF *p, double llx, double lly, double urx, double ury, const char *type, const char *optlist); + +int _PDF_create_bookmark(PDF *p, const char *text, int len, const char *optlist); + +void _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 _PDF_create_fieldgroup(PDF *p, const char *name, int len, const char *optlist); + +int _PDF_create_gstate(PDF *p, const char *optlist); + +void _PDF_create_pvf(PDF *p, const char *filename, int len, const void *data, size_t size, const char *optlist); + +int _PDF_create_textflow(PDF *p, const char *text, int len, const char *optlist); + +void _PDF_curveto(PDF *p, double x_1, double y_1, double x_2, double y_2, double x_3, double y_3); + +int _PDF_define_layer(PDF *p, const char *name, int len, const char *optlist); + +void _PDF_delete(PDF *p); + +void _PDF_delete_path(PDF *p, int path); + +int _PDF_delete_pvf(PDF *p, const char *filename, int len); + +void _PDF_delete_table(PDF *p, int table, const char *optlist); + +void _PDF_delete_textflow(PDF *p, int textflow); + +void _PDF_draw_path(PDF *p, int path, double x, double y, const char *optlist); + +void _PDF_ellipse(PDF *p, double x, double y, double rx, double ry); + +void _PDF_encoding_set_char(PDF *p, const char *encoding, int slot, const char *glyphname, int uv); + +void _PDF_end_document(PDF *p, const char *optlist); + +void _PDF_end_font(PDF *p); + +void _PDF_end_glyph(PDF *p); + +void _PDF_end_item(PDF *p, int id); + +void _PDF_end_layer(PDF *p); + +void _PDF_end_mc(PDF *p); + +void _PDF_end_page_ext(PDF *p, const char *optlist); + +void _PDF_end_pattern(PDF *p); + +void _PDF_end_template_ext(PDF *p, double width, double height); + +void _PDF_endpath(PDF *p); + +void _PDF_fill(PDF *p); + +int _PDF_fill_imageblock(PDF *p, int page, const char *blockname, int image, const char *optlist); + +int _PDF_fill_pdfblock(PDF *p, int page, const char *blockname, int contents, const char *optlist); + +void _PDF_fill_stroke(PDF *p); + +int _PDF_fill_textblock(PDF *p, int page, const char *blockname, const char *text, int len, const char *optlist); + +void _PDF_fit_graphics(PDF *p, int graphics, double x, double y, const char *optlist); + +void _PDF_fit_image(PDF *p, int image, double x, double y, const char *optlist); + +void _PDF_fit_pdi_page(PDF *p, int page, double x, double y, const char *optlist); + +const char * _PDF_fit_table(PDF *p, int table, double llx, double lly, double urx, double ury, const char *optlist); + +const char * _PDF_fit_textflow(PDF *p, int textflow, double llx, double lly, double urx, double ury, const char *optlist); + +void _PDF_fit_textline(PDF *p, const char *text, int len, double x, double y, const char *optlist); + +const char * _PDF_get_apiname(PDF *p); + +const char * _PDF_get_buffer(PDF *p, long *size); + +const char * _PDF_get_errmsg(PDF *p); + +int _PDF_get_errnum(PDF *p); + +// FIXME +// const char * _PDF_get_parameter(PDF *p, const char *key, double modifier); + +// double _PDF_get_value(PDF *p, const char *key, double modifier); + +double _PDF_info_font(PDF *p, int font, const char *keyword, const char *optlist); + +double _PDF_info_graphics(PDF *p, int graphics, const char *keyword, const char *optlist); + +double _PDF_info_image(PDF *p, int image, const char *keyword, const char *optlist); + +double _PDF_info_matchbox(PDF *p, const char *boxname, int len, int num, const char *keyword); + +double _PDF_info_path(PDF *p, int path, const char *keyword, const char *optlist); + +double _PDF_info_pdi_page(PDF *p, int page, const char *keyword, const char *optlist); + +double _PDF_info_table(PDF *p, int table, const char *keyword); + +double _PDF_info_textflow(PDF *p, int textflow, const char *keyword); + +double _PDF_info_textline(PDF *p, const char *text, int len, const char *keyword, const char *optlist); + +// void _PDF_initgraphics(PDF *p); + +void _PDF_lineto(PDF *p, double x, double y); + +int _PDF_load_3ddata(PDF *p, const char *filename, int len, const char *optlist); + +int _PDF_load_font(PDF *p, const char *fontname, int len, const char *encoding, const char *optlist); + +int _PDF_load_graphics(PDF *p, const char *graphicstype, const char *filename, int len, const char *optlist); + +int _PDF_load_iccprofile(PDF *p, const char *profilename, int len, const char *optlist); + +int _PDF_load_image(PDF *p, const char *imagetype, const char *filename, int len, const char *optlist); + +int _PDF_makespotcolor(PDF *p, const char *spotname, int reserved); + +void _PDF_mc_point(PDF *p, const char *tag, const char *optlist); + +void _PDF_moveto(PDF *p, double x, double y); + +int _PDF_open_pdi_document(PDF *p, const char *filename, int len, const char *optlist); + +int _PDF_open_pdi_page(PDF *p, int doc, int pagenumber, const char *optlist); + +double _PDF_pcos_get_number(PDF *p, int doc, const char *path); + +const char * _PDF_pcos_get_string(PDF *p, int doc, const char *path); + +const unsigned char * _PDF_pcos_get_stream(PDF *p, int doc, int *length, const char *optlist, const char *path); + +void _PDF_poca_delete(PDF *p, int container, const char *optlist); + +void _PDF_poca_insert(PDF *p, int container, const char *optlist); + +int _PDF_poca_new(PDF *p, const char *optlist); + +void _PDF_poca_remove(PDF *p, int container, const char *optlist); + +int _PDF_process_pdi(PDF *p, int doc, int page, const char *optlist); + +void _PDF_rect(PDF *p, double x, double y, double width, double height); + +void _PDF_restore(PDF *p); + +void _PDF_resume_page(PDF *p, const char *optlist); + +void _PDF_rotate(PDF *p, double phi); + +void _PDF_save(PDF *p); + +void _PDF_scale(PDF *p, double sx, double sy); + +void _PDF_set_graphics_option(PDF *p, const char *optlist); + +void _PDF_set_gstate(PDF *p, int gstate); + +void _PDF_set_info(PDF *p, const char *key, const char *value); + +void _PDF_set_info2(PDF *p, const char *key, const char *value, int len); + +void _PDF_set_layer_dependency(PDF *p, const char *type, const char *optlist); + +void _PDF_set_option(PDF *p, const char *optlist); + +void _PDF_set_text_pos(PDF *p, double x, double y); + +// void _PDF_set_value(PDF *p, const char *key, double value); + +void _PDF_setcolor(PDF *p, const char *fstype, const char *colorspace, double c1, double c2, double c3, double c4); + +// void _PDF_setdash(PDF *p, double b, double w); + +// void _PDF_setdashpattern(PDF *p, const char *optlist); + +// void _PDF_setflat(PDF *p, double flatness); + +void _PDF_setfont(PDF *p, int font, double fontsize); + +// void _PDF_setlinecap(PDF *p, int linecap); + +// void _PDF_setlinejoin(PDF *p, int linejoin); + +void _PDF_setlinewidth(PDF *p, double width); + +void _PDF_setmatrix(PDF *p, double a, double b, double c, double d, double e, double f); + +// void _PDF_setmiterlimit(PDF *p, double miter); + +int _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 _PDF_shading_pattern(PDF *p, int shading, const char *optlist); + +void _PDF_shfill(PDF *p, int shading); + +void _PDF_show(PDF *p, const char *text); + +void _PDF_show2(PDF *p, const char *text, int len); + +void _PDF_show_xy(PDF *p, const char *text, double x, double y); + +void _PDF_show_xy2(PDF *p, const char *text, int len, double x, double y); + +void _PDF_skew(PDF *p, double alpha, double beta); + +double _PDF_stringwidth(PDF *p, const char *text, int font, double fontsize); + +double _PDF_stringwidth2(PDF *p, const char *text, int len, int font, double fontsize); + +void _PDF_stroke(PDF *p); + +void _PDF_suspend_page(PDF *p, const char *optlist); + +void _PDF_translate(PDF *p, double tx, double ty); + +// const char * _PDF_utf16_to_utf8(PDF *p, const char *utf16string, int len, int *size); + +// const char * _PDF_utf8_to_utf16(PDF *p, const char *utf8string, const char *ordering, int *size); + +// const char * _PDF_utf32_to_utf8(PDF *p, const char *utf32string, int len, int *size); + +// const char * _PDF_utf8_to_utf32(PDF *p, const char *utf8string, const char *ordering, int *size); + +// const char * _PDF_utf16_to_utf32(PDF *p, const char *utf16string, int len, const char *ordering, int *size); + +// const char * _PDF_utf32_to_utf16(PDF *p, const char *utf32string, int len, const char *ordering, int *size); diff --git a/pdflib10/include/golang.c b/pdflib10/include/golang.c new file mode 100644 index 0000000..ad05012 --- /dev/null +++ b/pdflib10/include/golang.c @@ -0,0 +1,618 @@ +#include +#include "pdflib.h" + +void _PDF_activate_item(PDF *p, int id) { + PDF_TRY(p) { PDF_activate_item(p, id); } PDF_CATCH(p) { } +} + +void _PDF_add_nameddest(PDF *p, const char *name, int len, const char *optlist) { + PDF_TRY(p) { PDF_add_nameddest(p, name, len, optlist); } PDF_CATCH(p) { } +} + +int _PDF_add_path_point(PDF *p, int path, double x, double y, const char *type, const char *optlist) { + PDF_TRY(p) { return PDF_add_path_point(p, path, x, y, type, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_add_portfolio_file(PDF *p, int folder, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_add_portfolio_file(p, folder, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_add_portfolio_folder(PDF *p, int parent, const char *foldername, int len, const char *optlist) { + PDF_TRY(p) { return PDF_add_portfolio_folder(p, parent, foldername, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_add_table_cell(PDF *p, int table, int column, int row, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_add_table_cell(p, table, column, row, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_add_textflow(PDF *p, int textflow, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_add_textflow(p, textflow, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_add_thumbnail(PDF *p, int image) { + PDF_TRY(p) { PDF_add_thumbnail(p, image); } PDF_CATCH(p) { } +} + +void _PDF_align(PDF *p, double dx, double dy) { + PDF_TRY(p) { PDF_align(p, dx, dy); } PDF_CATCH(p) { } +} + +void _PDF_arc(PDF *p, double x, double y, double r, double alpha, double beta) { + PDF_TRY(p) { PDF_arc(p, x, y, r, alpha, beta); } PDF_CATCH(p) { } +} + +void _PDF_arcn(PDF *p, double x, double y, double r, double alpha, double beta) { + PDF_TRY(p) { PDF_arcn(p, x, y, r, alpha, beta); } PDF_CATCH(p) { } +} + +int _PDF_begin_document(PDF *p, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_begin_document(p, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _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) { + PDF_TRY(p) { PDF_begin_font(p, fontname, len, a, b, c, d, e, f, optlist); } PDF_CATCH(p) { } +} + +void _PDF_begin_glyph(PDF *p, const char *glyphname, double wx, double llx, double lly, double urx, double ury) { + PDF_TRY(p) { PDF_begin_glyph(p, glyphname, wx, llx, lly, urx, ury); } PDF_CATCH(p) { } +} + +int _PDF_begin_item(PDF *p, const char *tag, const char *optlist) { + PDF_TRY(p) { return PDF_begin_item(p, tag, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_begin_layer(PDF *p, int layer) { + PDF_TRY(p) { PDF_begin_layer(p, layer); } PDF_CATCH(p) { } +} + +void _PDF_begin_mc(PDF *p, const char *tag, const char *optlist) { + PDF_TRY(p) { PDF_begin_mc(p, tag, optlist); } PDF_CATCH(p) { } +} + +void _PDF_begin_page_ext(PDF *p, double width, double height, const char *optlist) { + PDF_TRY(p) { PDF_begin_page_ext(p, width, height, optlist); } PDF_CATCH(p) { } +} + +int _PDF_begin_pattern(PDF *p, double width, double height, double xstep, double ystep, int painttype) { + PDF_TRY(p) { return PDF_begin_pattern(p, width, height, xstep, ystep, painttype); } PDF_CATCH(p) { } return 1; +} + +int _PDF_begin_template_ext(PDF *p, double width, double height, const char *optlist) { + PDF_TRY(p) { return PDF_begin_template_ext(p, width, height, optlist); } PDF_CATCH(p) { } return 1; +} + +void _PDF_circle(PDF *p, double x, double y, double r) { + PDF_TRY(p) { PDF_circle(p, x, y, r); } PDF_CATCH(p) { } +} + +void _PDF_circular_arc(PDF *p, double x_1, double y_1, double x_2, double y_2) { + PDF_TRY(p) { PDF_circular_arc(p, x_1, y_1, x_2, y_2); } PDF_CATCH(p) { } +} + +void _PDF_clip(PDF *p) { + PDF_TRY(p) { PDF_clip(p); } PDF_CATCH(p) { } +} + +void _PDF_close_font(PDF *p, int font) { + PDF_TRY(p) { PDF_close_font(p, font); } PDF_CATCH(p) { } +} + +void _PDF_close_graphics(PDF *p, int graphics) { + PDF_TRY(p) { PDF_close_graphics(p, graphics); } PDF_CATCH(p) { } +} + +void _PDF_close_image(PDF *p, int image) { + PDF_TRY(p) { PDF_close_image(p, image); } PDF_CATCH(p) { } +} + +void _PDF_close_pdi_document(PDF *p, int doc) { + PDF_TRY(p) { PDF_close_pdi_document(p, doc); } PDF_CATCH(p) { } +} + +void _PDF_close_pdi_page(PDF *p, int page) { + PDF_TRY(p) { PDF_close_pdi_page(p, page); } PDF_CATCH(p) { } +} + +void _PDF_closepath(PDF *p) { + PDF_TRY(p) { PDF_closepath(p); } PDF_CATCH(p) { } +} + +void _PDF_closepath_fill_stroke(PDF *p) { + PDF_TRY(p) { PDF_closepath_fill_stroke(p); } PDF_CATCH(p) { } +} + +void _PDF_closepath_stroke(PDF *p) { + PDF_TRY(p) { PDF_closepath_stroke(p); } PDF_CATCH(p) { } +} + +void _PDF_concat(PDF *p, double a, double b, double c, double d, double e, double f) { + PDF_TRY(p) { PDF_concat(p, a, b, c, d, e, f); } PDF_CATCH(p) { } +} + +void _PDF_continue_text(PDF *p, const char *text) { + PDF_TRY(p) { PDF_continue_text(p, text); } PDF_CATCH(p) { } +} + +void _PDF_continue_text2(PDF *p, const char *text, int len) { + PDF_TRY(p) { PDF_continue_text2(p, text, len); } PDF_CATCH(p) { } +} + +int _PDF_create_3dview(PDF *p, const char *username, int len, const char *optlist) { + PDF_TRY(p) { return PDF_create_3dview(p, username, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_create_action(PDF *p, const char *type, const char *optlist) { + PDF_TRY(p) { return PDF_create_action(p, type, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_create_annotation(PDF *p, double llx, double lly, double urx, double ury, const char *type, const char *optlist) { + PDF_TRY(p) { PDF_create_annotation(p, llx, lly, urx, ury, type, optlist); } PDF_CATCH(p) { } +} + +int _PDF_create_bookmark(PDF *p, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_create_bookmark(p, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_create_field(PDF *p, double llx, double lly, double urx, double ury, const char *name, int len, const char *type, const char *optlist) { + PDF_TRY(p) { PDF_create_field(p, llx, lly, urx, ury, name, len, type, optlist); } PDF_CATCH(p) { } +} + +void _PDF_create_fieldgroup(PDF *p, const char *name, int len, const char *optlist) { + PDF_TRY(p) { PDF_create_fieldgroup(p, name, len, optlist); } PDF_CATCH(p) { } +} + +int _PDF_create_gstate(PDF *p, const char *optlist) { + PDF_TRY(p) { return PDF_create_gstate(p, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_create_pvf(PDF *p, const char *filename, int len, const void *data, size_t size, const char *optlist) { + PDF_TRY(p) { PDF_create_pvf(p, filename, len, data, size, optlist); } PDF_CATCH(p) { } +} + +int _PDF_create_textflow(PDF *p, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_create_textflow(p, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_curveto(PDF *p, double x_1, double y_1, double x_2, double y_2, double x_3, double y_3) { + PDF_TRY(p) { PDF_curveto(p, x_1, y_1, x_2, y_2, x_3, y_3); } PDF_CATCH(p) { } +} + +int _PDF_define_layer(PDF *p, const char *name, int len, const char *optlist) { + PDF_TRY(p) { return PDF_define_layer(p, name, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_delete(PDF *p) { + PDF_delete(p); +} + +void _PDF_delete_path(PDF *p, int path) { + PDF_TRY(p) { PDF_delete_path(p, path); } PDF_CATCH(p) { } +} + +int _PDF_delete_pvf(PDF *p, const char *filename, int len) { + PDF_TRY(p) { return PDF_delete_pvf(p, filename, len); } PDF_CATCH(p) { } return -1; +} + +void _PDF_delete_table(PDF *p, int table, const char *optlist) { + PDF_TRY(p) { PDF_delete_table(p, table, optlist); } PDF_CATCH(p) { } +} + +void _PDF_delete_textflow(PDF *p, int textflow) { + PDF_TRY(p) { PDF_delete_textflow(p, textflow); } PDF_CATCH(p) { } +} + +void _PDF_draw_path(PDF *p, int path, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_draw_path(p, path, x, y, optlist); } PDF_CATCH(p) { } +} + +void _PDF_ellipse(PDF *p, double x, double y, double rx, double ry) { + PDF_TRY(p) { PDF_ellipse(p, x, y, rx, ry); } PDF_CATCH(p) { } +} + +void _PDF_encoding_set_char(PDF *p, const char *encoding, int slot, const char *glyphname, int uv) { + PDF_TRY(p) { PDF_encoding_set_char(p, encoding, slot, glyphname, uv); } PDF_CATCH(p) { } +} + +void _PDF_end_document(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_end_document(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_end_font(PDF *p) { + PDF_TRY(p) { PDF_end_font(p); } PDF_CATCH(p) { } +} + +void _PDF_end_glyph(PDF *p) { + PDF_TRY(p) { PDF_end_glyph(p); } PDF_CATCH(p) { } +} + +void _PDF_end_item(PDF *p, int id) { + PDF_TRY(p) { PDF_end_item(p, id); } PDF_CATCH(p) { } +} + +void _PDF_end_layer(PDF *p) { + PDF_TRY(p) { PDF_end_layer(p); } PDF_CATCH(p) { } +} + +void _PDF_end_mc(PDF *p) { + PDF_TRY(p) { PDF_end_mc(p); } PDF_CATCH(p) { } +} + +void _PDF_end_page_ext(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_end_page_ext(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_end_pattern(PDF *p) { + PDF_TRY(p) { PDF_end_pattern(p); } PDF_CATCH(p) { } +} + +void _PDF_end_template_ext(PDF *p, double width, double height) { + PDF_TRY(p) { PDF_end_template_ext(p, width, height); } PDF_CATCH(p) { } +} + +void _PDF_endpath(PDF *p) { + PDF_TRY(p) { PDF_endpath(p); } PDF_CATCH(p) { } +} + +void _PDF_fill(PDF *p) { + PDF_TRY(p) { PDF_fill(p); } PDF_CATCH(p) { } +} + +int _PDF_fill_imageblock(PDF *p, int page, const char *blockname, int image, const char *optlist) { + PDF_TRY(p) { return PDF_fill_imageblock(p, page, blockname, image, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_fill_pdfblock(PDF *p, int page, const char *blockname, int contents, const char *optlist) { + PDF_TRY(p) { return PDF_fill_pdfblock(p, page, blockname, contents, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_fill_stroke(PDF *p) { + PDF_TRY(p) { PDF_fill_stroke(p); } PDF_CATCH(p) { } +} + +int _PDF_fill_textblock(PDF *p, int page, const char *blockname, const char *text, int len, const char *optlist) { + PDF_TRY(p) { return PDF_fill_textblock(p, page, blockname, text, len, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_fit_graphics(PDF *p, int graphics, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_fit_graphics(p, graphics, x, y, optlist); } PDF_CATCH(p) { } +} + +void _PDF_fit_image(PDF *p, int image, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_fit_image(p, image, x, y, optlist); } PDF_CATCH(p) { } +} + +void _PDF_fit_pdi_page(PDF *p, int page, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_fit_pdi_page(p, page, x, y, optlist); } PDF_CATCH(p) { } +} + +const char * _PDF_fit_table(PDF *p, int table, double llx, double lly, double urx, double ury, const char *optlist) { + PDF_TRY(p) { return PDF_fit_table(p, table, llx, lly, urx, ury, optlist); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_fit_textflow(PDF *p, int textflow, double llx, double lly, double urx, double ury, const char *optlist) { + PDF_TRY(p) { return PDF_fit_textflow(p, textflow, llx, lly, urx, ury, optlist); } PDF_CATCH(p) { } return ""; +} + +void _PDF_fit_textline(PDF *p, const char *text, int len, double x, double y, const char *optlist) { + PDF_TRY(p) { PDF_fit_textline(p, text, len, x, y, optlist); } PDF_CATCH(p) { } +} + +const char * _PDF_get_apiname(PDF *p) { + PDF_TRY(p) { return PDF_get_apiname(p); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_get_buffer(PDF *p, long *size) { + PDF_TRY(p) { return PDF_get_buffer(p, size); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_get_errmsg(PDF *p) { + PDF_TRY(p) { return PDF_get_errmsg(p); } PDF_CATCH(p) { } return ""; +} + +int _PDF_get_errnum(PDF *p) { + PDF_TRY(p) { return PDF_get_errnum(p); } PDF_CATCH(p) { } return 0; +} + +const char * _PDF_get_parameter(PDF *p, const char *key, double modifier) { + PDF_TRY(p) { return PDF_get_parameter(p, key, modifier); } PDF_CATCH(p) { } return ""; +} + +double _PDF_get_value(PDF *p, const char *key, double modifier) { + PDF_TRY(p) { return PDF_get_value(p, key, modifier); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_font(PDF *p, int font, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_font(p, font, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_graphics(PDF *p, int graphics, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_graphics(p, graphics, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_image(PDF *p, int image, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_image(p, image, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_matchbox(PDF *p, const char *boxname, int len, int num, const char *keyword) { + PDF_TRY(p) { return PDF_info_matchbox(p, boxname, len, num, keyword); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_path(PDF *p, int path, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_path(p, path, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_pdi_page(PDF *p, int page, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_pdi_page(p, page, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_table(PDF *p, int table, const char *keyword) { + PDF_TRY(p) { return PDF_info_table(p, table, keyword); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_textflow(PDF *p, int textflow, const char *keyword) { + PDF_TRY(p) { return PDF_info_textflow(p, textflow, keyword); } PDF_CATCH(p) { } return -1; +} + +double _PDF_info_textline(PDF *p, const char *text, int len, const char *keyword, const char *optlist) { + PDF_TRY(p) { return PDF_info_textline(p, text, len, keyword, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_initgraphics(PDF *p) { + PDF_TRY(p) { PDF_initgraphics(p); } PDF_CATCH(p) { } +} + +void _PDF_lineto(PDF *p, double x, double y) { + PDF_TRY(p) { PDF_lineto(p, x, y); } PDF_CATCH(p) { } +} + +int _PDF_load_3ddata(PDF *p, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_load_3ddata(p, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_load_font(PDF *p, const char *fontname, int len, const char *encoding, const char *optlist) { + PDF_TRY(p) { return PDF_load_font(p, fontname, len, encoding, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_load_graphics(PDF *p, const char *graphicstype, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_load_graphics(p, graphicstype, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_load_iccprofile(PDF *p, const char *profilename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_load_iccprofile(p, profilename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_load_image(PDF *p, const char *imagetype, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_load_image(p, imagetype, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_makespotcolor(PDF *p, const char *spotname, int reserved) { + PDF_TRY(p) { return PDF_makespotcolor(p, spotname, reserved); } PDF_CATCH(p) { } return -1; +} + +void _PDF_mc_point(PDF *p, const char *tag, const char *optlist) { + PDF_TRY(p) { PDF_mc_point(p, tag, optlist); } PDF_CATCH(p) { } +} + +void _PDF_moveto(PDF *p, double x, double y) { + PDF_TRY(p) { PDF_moveto(p, x, y); } PDF_CATCH(p) { } +} + +int _PDF_open_pdi_document(PDF *p, const char *filename, int len, const char *optlist) { + PDF_TRY(p) { return PDF_open_pdi_document(p, filename, len, optlist); } PDF_CATCH(p) { } return -1; +} + +int _PDF_open_pdi_page(PDF *p, int doc, int pagenumber, const char *optlist) { + PDF_TRY(p) { return PDF_open_pdi_page(p, doc, pagenumber, optlist); } PDF_CATCH(p) { } return -1; +} + +double _PDF_pcos_get_number(PDF *p, int doc, const char *path) { + PDF_TRY(p) { return PDF_pcos_get_number(p, doc, path); } PDF_CATCH(p) { } return -1; +} + +const char * _PDF_pcos_get_string(PDF *p, int doc, const char *path) { + PDF_TRY(p) { return PDF_pcos_get_string(p, doc, path); } PDF_CATCH(p) { } return ""; +} + +const unsigned char * _PDF_pcos_get_stream(PDF *p, int doc, int *length, const char *optlist, const char *path) { + unsigned char *r; PDF_TRY(p) { return PDF_pcos_get_stream(p, doc, length, optlist, path); } PDF_CATCH(p) { } return r; +} + +void _PDF_poca_delete(PDF *p, int container, const char *optlist) { + PDF_TRY(p) { PDF_poca_delete(p, container, optlist); } PDF_CATCH(p) { } +} + +void _PDF_poca_insert(PDF *p, int container, const char *optlist) { + PDF_TRY(p) { PDF_poca_insert(p, container, optlist); } PDF_CATCH(p) { } +} + +int _PDF_poca_new(PDF *p, const char *optlist) { + PDF_TRY(p) { return PDF_poca_new(p, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_poca_remove(PDF *p, int container, const char *optlist) { + PDF_TRY(p) { PDF_poca_remove(p, container, optlist); } PDF_CATCH(p) { } +} + +int _PDF_process_pdi(PDF *p, int doc, int page, const char *optlist) { + PDF_TRY(p) { return PDF_process_pdi(p, doc, page, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_rcurveto(PDF *p, double x_1, double y_1, double x_2, double y_2, double x_3, double y_3) { + PDF_TRY(p) { PDF_rcurveto(p, x_1, y_1, x_2, y_2, x_3, y_3); } PDF_CATCH(p) { } +} + +void _PDF_rect(PDF *p, double x, double y, double width, double height) { + PDF_TRY(p) { PDF_rect(p, x, y, width, height); } PDF_CATCH(p) { } +} + +void _PDF_restore(PDF *p) { + PDF_TRY(p) { PDF_restore(p); } PDF_CATCH(p) { } +} + +void _PDF_resume_page(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_resume_page(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_rotate(PDF *p, double phi) { + PDF_TRY(p) { PDF_rotate(p, phi); } PDF_CATCH(p) { } +} + +void _PDF_save(PDF *p) { + PDF_TRY(p) { PDF_save(p); } PDF_CATCH(p) { } +} + +void _PDF_scale(PDF *p, double sx, double sy) { + PDF_TRY(p) { PDF_scale(p, sx, sy); } PDF_CATCH(p) { } +} + +void _PDF_set_graphics_option(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_set_graphics_option(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_set_gstate(PDF *p, int gstate) { + PDF_TRY(p) { PDF_set_gstate(p, gstate); } PDF_CATCH(p) { } +} + +void _PDF_set_info(PDF *p, const char *key, const char *value) { + PDF_TRY(p) { PDF_set_info(p, key, value); } PDF_CATCH(p) { } +} + +void _PDF_set_info2(PDF *p, const char *key, const char *value, int len) { + PDF_TRY(p) { PDF_set_info2(p, key, value, len); } PDF_CATCH(p) { } +} + +void _PDF_set_layer_dependency(PDF *p, const char *type, const char *optlist) { + PDF_TRY(p) { PDF_set_layer_dependency(p, type, optlist); } PDF_CATCH(p) { } +} + +void _PDF_set_option(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_set_option(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_set_parameter(PDF *p, const char *key, const char *value) { + PDF_TRY(p) { PDF_set_parameter(p, key, value); } PDF_CATCH(p) { } +} + +void _PDF_set_text_pos(PDF *p, double x, double y) { + PDF_TRY(p) { PDF_set_text_pos(p, x, y); } PDF_CATCH(p) { } +} + +void _PDF_set_value(PDF *p, const char *key, double value) { + PDF_TRY(p) { PDF_set_value(p, key, value); } PDF_CATCH(p) { } +} + +void _PDF_setcolor(PDF *p, const char *fstype, const char *colorspace, double c1, double c2, double c3, double c4) { + PDF_TRY(p) { PDF_setcolor(p, fstype, colorspace, c1, c2, c3, c4); } PDF_CATCH(p) { } +} + +void _PDF_setdash(PDF *p, double b, double w) { + PDF_TRY(p) { PDF_setdash(p, b, w); } PDF_CATCH(p) { } +} + +void _PDF_setdashpattern(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_setdashpattern(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_setflat(PDF *p, double flatness) { + PDF_TRY(p) { PDF_setflat(p, flatness); } PDF_CATCH(p) { } +} + +void _PDF_setfont(PDF *p, int font, double fontsize) { + PDF_TRY(p) { PDF_setfont(p, font, fontsize); } PDF_CATCH(p) { } +} + +void _PDF_setlinecap(PDF *p, int linecap) { + PDF_TRY(p) { PDF_setlinecap(p, linecap); } PDF_CATCH(p) { } +} + +void _PDF_setlinejoin(PDF *p, int linejoin) { + PDF_TRY(p) { PDF_setlinejoin(p, linejoin); } PDF_CATCH(p) { } +} + +void _PDF_setlinewidth(PDF *p, double width) { + PDF_TRY(p) { PDF_setlinewidth(p, width); } PDF_CATCH(p) { } +} + +void _PDF_setmatrix(PDF *p, double a, double b, double c, double d, double e, double f) { + PDF_TRY(p) { PDF_setmatrix(p, a, b, c, d, e, f); } PDF_CATCH(p) { } +} + +void _PDF_setmiterlimit(PDF *p, double miter) { + PDF_TRY(p) { PDF_setmiterlimit(p, miter); } PDF_CATCH(p) { } +} + +int _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) { + PDF_TRY(p) { PDF_shading(p, shtype, x_0, y_0, x_1, y_1, c_1, c_2, c_3, c_4, optlist); } PDF_CATCH(p) { } return 0; +} + +int _PDF_shading_pattern(PDF *p, int shading, const char *optlist) { + PDF_TRY(p) { return PDF_shading_pattern(p, shading, optlist); } PDF_CATCH(p) { } return -1; +} + +void _PDF_shfill(PDF *p, int shading) { + PDF_TRY(p) { PDF_shfill(p, shading); } PDF_CATCH(p) { } +} + +void _PDF_show(PDF *p, const char *text) { + PDF_TRY(p) { PDF_show(p, text); } PDF_CATCH(p) { } +} + +void _PDF_show2(PDF *p, const char *text, int len) { + PDF_TRY(p) { PDF_show2(p, text, len); } PDF_CATCH(p) { } +} + +void _PDF_show_xy(PDF *p, const char *text, double x, double y) { + PDF_TRY(p) { PDF_show_xy(p, text, x, y); } PDF_CATCH(p) { } +} + +void _PDF_show_xy2(PDF *p, const char *text, int len, double x, double y) { + PDF_TRY(p) { PDF_show_xy2(p, text, len, x, y); } PDF_CATCH(p) { } +} + +void _PDF_skew(PDF *p, double alpha, double beta) { + PDF_TRY(p) { PDF_skew(p, alpha, beta); } PDF_CATCH(p) { } +} + +double _PDF_stringwidth(PDF *p, const char *text, int font, double fontsize) { + PDF_TRY(p) { return PDF_stringwidth(p, text, font, fontsize); } PDF_CATCH(p) { } return -1; +} + +double _PDF_stringwidth2(PDF *p, const char *text, int len, int font, double fontsize) { + PDF_TRY(p) { return PDF_stringwidth2(p, text, len, font, fontsize); } PDF_CATCH(p) { } return -1; +} + +void _PDF_stroke(PDF *p) { + PDF_TRY(p) { PDF_stroke(p); } PDF_CATCH(p) { } +} + +void _PDF_suspend_page(PDF *p, const char *optlist) { + PDF_TRY(p) { PDF_suspend_page(p, optlist); } PDF_CATCH(p) { } +} + +void _PDF_translate(PDF *p, double tx, double ty) { + PDF_TRY(p) { PDF_translate(p, tx, ty); } PDF_CATCH(p) { } +} + +const char * _PDF_utf16_to_utf8(PDF *p, const char *utf16string, int len, int *size) { + PDF_TRY(p) { return PDF_utf16_to_utf8(p, utf16string, len, size); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_utf8_to_utf16(PDF *p, const char *utf8string, const char *ordering, int *size) { + PDF_TRY(p) { return PDF_utf8_to_utf16(p, utf8string, ordering, size); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_utf32_to_utf8(PDF *p, const char *utf32string, int len, int *size) { + PDF_TRY(p) { return PDF_utf32_to_utf8(p, utf32string, len, size); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_utf8_to_utf32(PDF *p, const char *utf8string, const char *ordering, int *size) { + PDF_TRY(p) { return PDF_utf8_to_utf32(p, utf8string, ordering, size); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_utf16_to_utf32(PDF *p, const char *utf16string, int len, const char *ordering, int *size) { + PDF_TRY(p) { return PDF_utf16_to_utf32(p, utf16string, len, ordering, size); } PDF_CATCH(p) { } return ""; +} + +const char * _PDF_utf32_to_utf16(PDF *p, const char *utf32string, int len, const char *ordering, int *size) { + PDF_TRY(p) { return PDF_utf32_to_utf16(p, utf32string, len, ordering, size); } PDF_CATCH(p) { } return ""; +} diff --git a/pdflib10/include/golang.h b/pdflib10/include/golang.h new file mode 100644 index 0000000..f6a3103 --- /dev/null +++ b/pdflib10/include/golang.h @@ -0,0 +1,311 @@ +#include +#include "golang.c" +#include "pdflib.h" + +void temp(PDF *p, const char *text, int len, double x, double y, const char *optlist); + +void _PDF_activate_item(PDF *p, int id); + +void _PDF_add_nameddest(PDF *p, const char *name, int len, const char *optlist); + +int _PDF_add_path_point(PDF *p, int path, double x, double y, const char *type, const char *optlist); + +int _PDF_add_portfolio_file(PDF *p, int folder, const char *filename, int len, const char *optlist); + +int _PDF_add_portfolio_folder(PDF *p, int parent, const char *foldername, int len, const char *optlist); + +int _PDF_add_table_cell(PDF *p, int table, int column, int row, const char *text, int len, const char *optlist); + +int _PDF_add_textflow(PDF *p, int textflow, const char *text, int len, const char *optlist); + +void _PDF_add_thumbnail(PDF *p, int image); + +void _PDF_align(PDF *p, double dx, double dy); + +void _PDF_arc(PDF *p, double x, double y, double r, double alpha, double beta); + +void _PDF_arcn(PDF *p, double x, double y, double r, double alpha, double beta); + +int _PDF_begin_document(PDF *p, const char *filename, int len, const char *optlist); + +void _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 _PDF_begin_glyph(PDF *p, const char *glyphname, double wx, double llx, double lly, double urx, double ury); + +int _PDF_begin_item(PDF *p, const char *tag, const char *optlist); + +void _PDF_begin_layer(PDF *p, int layer); + +void _PDF_begin_mc(PDF *p, const char *tag, const char *optlist); + +void _PDF_begin_page_ext(PDF *p, double width, double height, const char *optlist); + +int _PDF_begin_pattern(PDF *p, double width, double height, double xstep, double ystep, int painttype); + +int _PDF_begin_template_ext(PDF *p, double width, double height, const char *optlist); + +void _PDF_circle(PDF *p, double x, double y, double r); + +void _PDF_circular_arc(PDF *p, double x_1, double y_1, double x_2, double y_2); + +void _PDF_clip(PDF *p); + +void _PDF_close_font(PDF *p, int font); + +void _PDF_close_graphics(PDF *p, int graphics); + +void _PDF_close_image(PDF *p, int image); + +void _PDF_close_pdi_document(PDF *p, int doc); + +void _PDF_close_pdi_page(PDF *p, int page); + +void _PDF_closepath(PDF *p); + +void _PDF_closepath_fill_stroke(PDF *p); + +void _PDF_closepath_stroke(PDF *p); + +void _PDF_concat(PDF *p, double a, double b, double c, double d, double e, double f); + +void _PDF_continue_text(PDF *p, const char *text); + +void _PDF_continue_text2(PDF *p, const char *text, int len); + +int _PDF_create_3dview(PDF *p, const char *username, int len, const char *optlist); + +int _PDF_create_action(PDF *p, const char *type, const char *optlist); + +void _PDF_create_annotation(PDF *p, double llx, double lly, double urx, double ury, const char *type, const char *optlist); + +int _PDF_create_bookmark(PDF *p, const char *text, int len, const char *optlist); + +void _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 _PDF_create_fieldgroup(PDF *p, const char *name, int len, const char *optlist); + +int _PDF_create_gstate(PDF *p, const char *optlist); + +void _PDF_create_pvf(PDF *p, const char *filename, int len, const void *data, size_t size, const char *optlist); + +int _PDF_create_textflow(PDF *p, const char *text, int len, const char *optlist); + +void _PDF_curveto(PDF *p, double x_1, double y_1, double x_2, double y_2, double x_3, double y_3); + +int _PDF_define_layer(PDF *p, const char *name, int len, const char *optlist); + +void _PDF_delete(PDF *p); + +void _PDF_delete_path(PDF *p, int path); + +int _PDF_delete_pvf(PDF *p, const char *filename, int len); + +void _PDF_delete_table(PDF *p, int table, const char *optlist); + +void _PDF_delete_textflow(PDF *p, int textflow); + +void _PDF_draw_path(PDF *p, int path, double x, double y, const char *optlist); + +void _PDF_ellipse(PDF *p, double x, double y, double rx, double ry); + +void _PDF_encoding_set_char(PDF *p, const char *encoding, int slot, const char *glyphname, int uv); + +void _PDF_end_document(PDF *p, const char *optlist); + +void _PDF_end_font(PDF *p); + +void _PDF_end_glyph(PDF *p); + +void _PDF_end_item(PDF *p, int id); + +void _PDF_end_layer(PDF *p); + +void _PDF_end_mc(PDF *p); + +void _PDF_end_page_ext(PDF *p, const char *optlist); + +void _PDF_end_pattern(PDF *p); + +void _PDF_end_template_ext(PDF *p, double width, double height); + +void _PDF_endpath(PDF *p); + +void _PDF_fill(PDF *p); + +int _PDF_fill_imageblock(PDF *p, int page, const char *blockname, int image, const char *optlist); + +int _PDF_fill_pdfblock(PDF *p, int page, const char *blockname, int contents, const char *optlist); + +void _PDF_fill_stroke(PDF *p); + +int _PDF_fill_textblock(PDF *p, int page, const char *blockname, const char *text, int len, const char *optlist); + +void _PDF_fit_graphics(PDF *p, int graphics, double x, double y, const char *optlist); + +void _PDF_fit_image(PDF *p, int image, double x, double y, const char *optlist); + +void _PDF_fit_pdi_page(PDF *p, int page, double x, double y, const char *optlist); + +const char * _PDF_fit_table(PDF *p, int table, double llx, double lly, double urx, double ury, const char *optlist); + +const char * _PDF_fit_textflow(PDF *p, int textflow, double llx, double lly, double urx, double ury, const char *optlist); + +void _PDF_fit_textline(PDF *p, const char *text, int len, double x, double y, const char *optlist); + +const char * _PDF_get_apiname(PDF *p); + +const char * _PDF_get_buffer(PDF *p, long *size); + +const char * _PDF_get_errmsg(PDF *p); + +int _PDF_get_errnum(PDF *p); + +const char * _PDF_get_parameter(PDF *p, const char *key, double modifier); + +double _PDF_get_value(PDF *p, const char *key, double modifier); + +double _PDF_info_font(PDF *p, int font, const char *keyword, const char *optlist); + +double _PDF_info_graphics(PDF *p, int graphics, const char *keyword, const char *optlist); + +double _PDF_info_image(PDF *p, int image, const char *keyword, const char *optlist); + +double _PDF_info_matchbox(PDF *p, const char *boxname, int len, int num, const char *keyword); + +double _PDF_info_path(PDF *p, int path, const char *keyword, const char *optlist); + +double _PDF_info_pdi_page(PDF *p, int page, const char *keyword, const char *optlist); + +double _PDF_info_table(PDF *p, int table, const char *keyword); + +double _PDF_info_textflow(PDF *p, int textflow, const char *keyword); + +double _PDF_info_textline(PDF *p, const char *text, int len, const char *keyword, const char *optlist); + +void _PDF_initgraphics(PDF *p); + +void _PDF_lineto(PDF *p, double x, double y); + +int _PDF_load_3ddata(PDF *p, const char *filename, int len, const char *optlist); + +int _PDF_load_font(PDF *p, const char *fontname, int len, const char *encoding, const char *optlist); + +int _PDF_load_graphics(PDF *p, const char *graphicstype, const char *filename, int len, const char *optlist); + +int _PDF_load_iccprofile(PDF *p, const char *profilename, int len, const char *optlist); + +int _PDF_load_image(PDF *p, const char *imagetype, const char *filename, int len, const char *optlist); + +int _PDF_makespotcolor(PDF *p, const char *spotname, int reserved); + +void _PDF_mc_point(PDF *p, const char *tag, const char *optlist); + +void _PDF_moveto(PDF *p, double x, double y); + +int _PDF_open_pdi_document(PDF *p, const char *filename, int len, const char *optlist); + +int _PDF_open_pdi_page(PDF *p, int doc, int pagenumber, const char *optlist); + +double _PDF_pcos_get_number(PDF *p, int doc, const char *path); + +const char * _PDF_pcos_get_string(PDF *p, int doc, const char *path); + +const unsigned char * _PDF_pcos_get_stream(PDF *p, int doc, int *length, const char *optlist, const char *path); + +void _PDF_poca_delete(PDF *p, int container, const char *optlist); + +void _PDF_poca_insert(PDF *p, int container, const char *optlist); + +int _PDF_poca_new(PDF *p, const char *optlist); + +void _PDF_poca_remove(PDF *p, int container, const char *optlist); + +int _PDF_process_pdi(PDF *p, int doc, int page, const char *optlist); + +void _PDF_rect(PDF *p, double x, double y, double width, double height); + +void _PDF_restore(PDF *p); + +void _PDF_resume_page(PDF *p, const char *optlist); + +void _PDF_rotate(PDF *p, double phi); + +void _PDF_save(PDF *p); + +void _PDF_scale(PDF *p, double sx, double sy); + +void _PDF_set_graphics_option(PDF *p, const char *optlist); + +void _PDF_set_gstate(PDF *p, int gstate); + +void _PDF_set_info(PDF *p, const char *key, const char *value); + +void _PDF_set_info2(PDF *p, const char *key, const char *value, int len); + +void _PDF_set_layer_dependency(PDF *p, const char *type, const char *optlist); + +void _PDF_set_option(PDF *p, const char *optlist); + +void _PDF_set_parameter(PDF *p, const char *key, const char *value); + +void _PDF_set_text_pos(PDF *p, double x, double y); + +void _PDF_set_value(PDF *p, const char *key, double value); + +void _PDF_setcolor(PDF *p, const char *fstype, const char *colorspace, double c1, double c2, double c3, double c4); + +void _PDF_setdash(PDF *p, double b, double w); + +void _PDF_setdashpattern(PDF *p, const char *optlist); + +void _PDF_setflat(PDF *p, double flatness); + +void _PDF_setfont(PDF *p, int font, double fontsize); + +void _PDF_setlinecap(PDF *p, int linecap); + +void _PDF_setlinejoin(PDF *p, int linejoin); + +void _PDF_setlinewidth(PDF *p, double width); + +void _PDF_setmatrix(PDF *p, double a, double b, double c, double d, double e, double f); + +void _PDF_setmiterlimit(PDF *p, double miter); + +int _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 _PDF_shading_pattern(PDF *p, int shading, const char *optlist); + +void _PDF_shfill(PDF *p, int shading); + +void _PDF_show(PDF *p, const char *text); + +void _PDF_show2(PDF *p, const char *text, int len); + +void _PDF_show_xy(PDF *p, const char *text, double x, double y); + +void _PDF_show_xy2(PDF *p, const char *text, int len, double x, double y); + +void _PDF_skew(PDF *p, double alpha, double beta); + +double _PDF_stringwidth(PDF *p, const char *text, int font, double fontsize); + +double _PDF_stringwidth2(PDF *p, const char *text, int len, int font, double fontsize); + +void _PDF_stroke(PDF *p); + +void _PDF_suspend_page(PDF *p, const char *optlist); + +void _PDF_translate(PDF *p, double tx, double ty); + +const char * _PDF_utf16_to_utf8(PDF *p, const char *utf16string, int len, int *size); + +const char * _PDF_utf8_to_utf16(PDF *p, const char *utf8string, const char *ordering, int *size); + +const char * _PDF_utf32_to_utf8(PDF *p, const char *utf32string, int len, int *size); + +const char * _PDF_utf8_to_utf32(PDF *p, const char *utf8string, const char *ordering, int *size); + +const char * _PDF_utf16_to_utf32(PDF *p, const char *utf16string, int len, const char *ordering, int *size); + +const char * _PDF_utf32_to_utf16(PDF *p, const char *utf32string, int len, const char *ordering, int *size); diff --git a/pdflib10/include/pdflib.h b/pdflib10/include/pdflib.h new file mode 100644 index 0000000..4c5b913 --- /dev/null +++ b/pdflib10/include/pdflib.h @@ -0,0 +1,1405 @@ +/*---------------------------------------------------------------------------* + | Copyright (c) 1997-2022 PDFlib GmbH. All rights reserved. | + +---------------------------------------------------------------------------+ + | This software may not be copied or distributed except as expressly | + | authorized by PDFlib GmbH's general license agreement or a custom | + | license agreement signed by PDFlib GmbH. | + | For more information about licensing please refer to www.pdflib.com. | + *---------------------------------------------------------------------------*/ + +/* + * Public function declarations for PDFlib, PDFlib+PDI, and PPS; + * see PDFlib API Reference for details. + */ + +#ifndef PDFLIB_H +#define PDFLIB_H + +/* Make our declarations C++ compatible */ +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#define PDFLIB_PRODUCTNAME "PDFlib" + +/* + * The version defines below can be used to check the version of the + * include file against the library. + */ + +#define PDFLIB_MAJORVERSION 10 /* major version number */ +#define PDFLIB_MINORVERSION 0 /* minor version number */ +#define PDFLIB_REVISION 2 /* revision number */ +#define PDFLIB_SHORT_VERSIONSTRING "10" /* short version number */ +#define PDFLIB_LONG_VERSIONSTRING "10.0.2" /* full version number*/ + +/* + * ---------------------------------------------------------------------- + * Setup, mostly Windows calling conventions and DLL stuff + * ---------------------------------------------------------------------- + */ + +#if defined(WIN32) && !defined(PDFLIB_CALL) + #define PDFLIB_CALL __cdecl +#endif + +#undef PDFLIB_API +#if defined(WIN32) + + #ifdef PDFLIB_EXPORTS + #define PDFLIB_API __declspec(dllexport) /* prepare a DLL (internal use) */ + + #elif defined(PDFLIB_DLL) + + #define PDFLIB_API __declspec(dllimport) /* PDFlib clients: import DLL */ + #endif /* PDFLIB_DLL */ + +#else + #if __GNUC__ >= 4 + #define PDFLIB_API __attribute__ ((visibility("default"))) + #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ + || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) + #define PDFLIB_API __global + #elif defined(HPUX_HIDDEN_DEF) + #define PDFLIB_API __declspec(dllexport) + #endif +#endif /* WIN32 */ + +#ifndef PDFLIB_CALL + #define PDFLIB_CALL /* */ /* default: no special calling conventions */ +#endif + +#ifndef PDFLIB_API + #define PDFLIB_API /* */ /* default: generate or use static library */ +#endif + +#ifndef PDFLIB_DEPRECATED + +#if defined(__GNUC__) || defined(__clang__) +#define PDFLIB_DEPRECATED(func) func __attribute__ ((deprecated)) +#elif defined(_MSC_VER) +#define PDFLIB_DEPRECATED(func) __declspec(deprecated) func +#else +#define PDFLIB_DEPRECATED(func) func +#endif + +#endif + +typedef struct PDF_s PDF; + + +/* + * ---------------------------------------------------------------------- + * Function prototypes for all supported API methods + * ---------------------------------------------------------------------- + */ + +/* Activate a previously created structure element or other content item. */ +PDFLIB_API void PDFLIB_CALL +PDF_activate_item(PDF *p, int id); + +/* Create a named destination on a page in the document. */ +PDFLIB_API void PDFLIB_CALL +PDF_add_nameddest(PDF *p, const char *name, int len, const char *optlist); + +/* Add a point to a new or existing path object. + Returns: A path handle which can be used in subsequent path-related calls. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_path_point(PDF *p, int path, double x, double y, + const char *type, const char *optlist); + +/* Add a file to a portfolio folder or a package. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_portfolio_file(PDF *p, int folder, const char *filename, int len, + const char *optlist); + +/* Add a folder to a new or existing portfolio. + Returns: A folder handle which can be used in subsequent + portfolio-related calls. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_portfolio_folder(PDF *p, int parent, const char *foldername, int len, + const char *optlist); + +/* Add a cell to a new or existing table. + Returns: A table handle which can be used in subsequent table-related calls. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_table_cell(PDF *p, int table, int column, int row, const char *text, + int len, const char *optlist); + +/* Create a Textflow object, or add text and explicit options to an existing + Textflow. + Returns: A Textflow handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_textflow(PDF *p, int textflow, const char *text, int len, + const char *optlist); + +/* Align the coordinate system with a relative vector. */ +PDFLIB_API void PDFLIB_CALL +PDF_align(PDF *p, double dx, double dy); + +/* Draw a counterclockwise circular arc segment. */ +PDFLIB_API void PDFLIB_CALL +PDF_arc(PDF *p, double x, double y, double r, double alpha, double beta); + +/* Draw a clockwise circular arc segment. */ +PDFLIB_API void PDFLIB_CALL +PDF_arcn(PDF *p, double x, double y, double r, double alpha, double beta); + +/* Create a new PDF document subject to various options. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_begin_document(PDF *p, const char *filename, int len, const char *optlist); + +/* Create a new PDF document subject to various options. */ +typedef size_t (*writeproc_t)(PDF *p1, void *data, size_t size); +PDFLIB_API void PDFLIB_CALL +PDF_begin_document_callback(PDF *p, writeproc_t writeproc, const char *optlist); + +/* Create a new node in the document part hierarchy (requires PDF/VT or + PDF 2.0). +*/ +PDFLIB_API void PDFLIB_CALL +PDF_begin_dpart(PDF *p, const char *optlist); + +/* Start a Type 3 font definition. */ +PDFLIB_API 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); + +/* Start a glyph definition for a Type 3 font. */ +PDFLIB_API void PDFLIB_CALL +PDF_begin_glyph_ext(PDF *p, int uv, const char *optlist); + +/* Open a structure element or other content element for Tagged PDF. + Returns: An item handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_begin_item(PDF *p, const char *tagname, const char *optlist); + +/* Start a layer for subsequent output on the page. */ +PDFLIB_API void PDFLIB_CALL +PDF_begin_layer(PDF *p, int layer); + +/* Begin a marked content sequence with optional properties. */ +PDFLIB_API void PDFLIB_CALL +PDF_begin_mc(PDF *p, const char *tagname, const char *optlist); + +/* Add a new page to the document, and specify various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_begin_page_ext(PDF *p, double width, double height, const char *optlist); + +/* Start the definition of a tiling pattern with options. + Returns: A pattern handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_begin_pattern_ext(PDF *p, + double width, double height, const char *optlist); + +/* Start a template definition. + Returns: A template handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_begin_template_ext(PDF *p, double width, double height, + const char *optlist); + +/* Check the validity of a PDFlib context (unsupported). */ +PDFLIB_API int PDFLIB_CALL +PDF_check_context(PDF *p); + +/* Draw a circle. */ +PDFLIB_API void PDFLIB_CALL +PDF_circle(PDF *p, double x, double y, double r); + +/* Draw a circular arc segment defined by three points. */ +PDFLIB_API void PDFLIB_CALL +PDF_circular_arc(PDF *p, double x1, double y1, double x2, double y2); + +/* Use the current path as clipping path, and terminate the path. */ +PDFLIB_API void PDFLIB_CALL +PDF_clip(PDF *p); + +/* Close an open font handle which has not yet been used in the document. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_font(PDF *p, int font); + +/* Close vector graphics. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_graphics(PDF *p, int graphics); + +/* Close an image or template. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_image(PDF *p, int image); + +/* Close all open PDI page handles, and close the input PDF document. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_pdi_document(PDF *p, int doc); + +/* Close the page handle and free all page-related resources. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_pdi_page(PDF *p, int page); + +/* Close the current path. */ +PDFLIB_API void PDFLIB_CALL +PDF_closepath(PDF *p); + +/* Close the path, fill, and stroke it. */ +PDFLIB_API void PDFLIB_CALL +PDF_closepath_fill_stroke(PDF *p); + +/* Close the path, and stroke it. */ +PDFLIB_API void PDFLIB_CALL +PDF_closepath_stroke(PDF *p); + +/* Apply a transformation matrix to the current coordinate system. */ +PDFLIB_API void PDFLIB_CALL +PDF_concat(PDF *p, double a, double b, double c, double d, double e, double f); + +/* Print text at the next line. */ +PDFLIB_API void PDFLIB_CALL +PDF_continue_text(PDF *p, const char *text); + +/* Same as PDF_continue_text(), but with explicit string length. */ +PDFLIB_API void PDFLIB_CALL +PDF_continue_text2(PDF *p, const char *text, int len); + +/* Convert a string in an arbitrary encoding to a Unicode string in various + formats. + Returns: The converted Unicode string. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_convert_to_unicode(PDF *p, const char *inputformat, + const char *inputstring, int inputlen, int *outputlen, const char *optlist); + +/* Create a 3D view. + Returns: A 3D view handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_3dview(PDF *p, const char *username, int len, const char *optlist); + +/* Create an action which can be applied to various objects and events. + Returns: An action handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_action(PDF *p, const char *type, const char *optlist); + +/* Create an annotation on the current page. */ +PDFLIB_API void PDFLIB_CALL +PDF_create_annotation(PDF *p, double llx, double lly, double urx, double ury, + const char *type, const char *optlist); + +/* Create a DeviceN colorspace with an arbitrary number of color components. + Returns: A DeviceN color space handle, or -1 (in PHP: 0) on error. + */ +PDFLIB_API int PDFLIB_CALL +PDF_create_devicen(PDF *p, const char *optlist); + +/* Create a bookmark subject to various options. + Returns: A handle for the generated bookmark. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_bookmark(PDF *p, const char *text, int len, const char *optlist); + +/* Create a new form field or fill an imported form field. */ +PDFLIB_API 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); + +/* Create a form field group subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_create_fieldgroup(PDF *p, const char *name, int len, const char *optlist); + +/* Create a graphics state object subject to various options. + Returns: A graphics state handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_gstate(PDF *p, const char *optlist); + +/* Create a named virtual read-only file from data provided in memory. */ +PDFLIB_API void PDFLIB_CALL +PDF_create_pvf(PDF *p, const char *filename, int len, + const void *data, size_t size, const char *optlist); + +/* Create a Textflow object from text contents, inline options, and explicit + options. + Returns: A Textflow handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_textflow(PDF *p, const char *text, int len, const char *optlist); + +/* Draw a Bezier curve from the current point, using three more control + points. */ +PDFLIB_API void PDFLIB_CALL +PDF_curveto(PDF *p, + double x1, double y1, double x2, double y2, double x3, double y3); + +/* Create a new layer definition. + Returns: A layer handle which can be used in subsequent layer-related calls. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_define_layer(PDF *p, const char *name, int len, const char *optlist); + +/* Deflate a Unicode string (UTF-16 or UTF-32) to a byte string (unsupported) +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_deflate_unicode(PDF *p, const char *utfstring, int len, int charsize, + int *highchar); + +/* Delete a PDFlib object and free all internal resources. */ +PDFLIB_API void PDFLIB_CALL +PDF_delete(PDF *p); + +/* Delete a path object. */ +PDFLIB_API void PDFLIB_CALL +PDF_delete_path(PDF *p, int path); + +/* Delete a named virtual file and free its data structures (but not the + contents). + Returns: -1 (in PHP: 0) if the virtual file exists but is locked, and + 1 otherwise. + */ +PDFLIB_API int PDFLIB_CALL +PDF_delete_pvf(PDF *p, const char *filename, int len); + +/* Delete a table and all associated data structures. */ +PDFLIB_API void PDFLIB_CALL +PDF_delete_table(PDF *p, int table, const char *optlist); + +/* Delete a Textflow and all associated data structures. */ +PDFLIB_API void PDFLIB_CALL +PDF_delete_textflow(PDF *p, int textflow); + +/* Draw a path object. */ +PDFLIB_API void PDFLIB_CALL PDF_draw_path(PDF *p, int path, double x, double y, + const char *optlist); + +/* Draw an ellipse. */ +PDFLIB_API void PDFLIB_CALL +PDF_ellipse(PDF *p, double x, double y, double rx, double ry); + +/* Draw an elliptical arc segment from the current point. */ +PDFLIB_API void PDFLIB_CALL +PDF_elliptical_arc(PDF *p, double x, double y, double rx, double ry, + const char *optlist); + +/* Add a glyph name and/or Unicode value to a custom 8-bit encoding. */ +PDFLIB_API void PDFLIB_CALL +PDF_encoding_set_char(PDF *p, const char *encoding, int slot, + const char *glyphname, int uv); + +/* Close the generated PDF document and apply various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_document(PDF *p, const char *optlist); + +/* Close a node in the document part hierarchy (requires PDF/VT or PDF 2.0). */ +PDFLIB_API void PDFLIB_CALL +PDF_end_dpart(PDF *p, const char *optlist); + +/* Terminate a Type 3 font definition. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_font(PDF *p); + +/* Terminate a glyph definition for a Type 3 font. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_glyph(PDF *p); + +/* Close a structure element or other content item. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_item(PDF *p, int id); + +/* Deactivate all active layers. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_layer(PDF *p); + +/* End the least recently opened marked content sequence. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_mc(PDF *p); + +/* Finish a page and apply various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_page_ext(PDF *p, const char *optlist); + +/* Finish the definition of a tiling pattern. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_pattern(PDF *p); + +/* Finish a template definition. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_template_ext(PDF *p, double width, double height); + +/* End the current path without filling or stroking it. */ +PDFLIB_API void PDFLIB_CALL +PDF_endpath(PDF *p); + +/* Download data from a network resource and store it in a disk-based or + virtual file. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. + */ +PDFLIB_API int PDFLIB_CALL +PDF_download(PDF *p, const char *filename, int len, const char *optlist); + +/* Fill the interior of the path with the current fill color. */ +PDFLIB_API void PDFLIB_CALL +PDF_fill(PDF *p); + +/* Fill a graphics Block with variable data according to its properties. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_fill_graphicsblock(PDF *p, int page, const char *blockname, + int graphics, const char *optlist); + +/* Fill an image block with variable data according to its properties. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_fill_imageblock(PDF *p, int page, const char *blockname, + int image, const char *optlist); + +/* Fill a PDF block with variable data according to its properties. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_fill_pdfblock(PDF *p, int page, const char *blockname, + int contents, const char *optlist); + +/* Fill and stroke the path with the current fill and stroke color. */ +PDFLIB_API void PDFLIB_CALL +PDF_fill_stroke(PDF *p); + +/* Fill a Textline or Textflow Block with variable data according to its + properties. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_fill_textblock(PDF *p, int page, const char *blockname, + const char *text, int len, const char *optlist); + +/* Place vector graphics on a content stream, subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_fit_graphics(PDF *p, int graphics, double x, double y, const char *optlist); + +/* Place an image or template on the page, subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_fit_image(PDF *p, int image, double x, double y, const char *optlist); + +/* Place an imported PDF page on the output page subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_fit_pdi_page(PDF *p, int page, double x, double y, const char *optlist); + +/* Fully or partially place a table on the page. + Returns: A string which specifies the reason for returning. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_fit_table(PDF *p, int table, double llx, double lly, + double urx, double ury, const char *optlist); + +/* Format the next portion of a Textflow. + Returns: A string which specifies the reason for returning. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_fit_textflow(PDF *p, int textflow, double llx, double lly, + double urx, double ury, const char *optlist); + +/* Place a single line of text at position (x, y) subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_fit_textline(PDF *p, const char *text, int len, double x, double y, + const char *optlist); + +/* The API structure with function pointers. */ +typedef struct PDFlib_api_s PDFlib_api; + +/* + * Retrieve a structure with PDFlib API function pointers (mainly for DLLs). + * Although this function is published here it is not supposed to be used + * directly by clients. Use PDF_new_dl() in pdflibdl.c instead. + */ +PDFLIB_API const PDFlib_api * PDFLIB_CALL +PDF_get_api(void); + +/* Get the name of the API method which threw the last exception or failed. + Returns: Name of an API method. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_get_apiname(PDF *p); + +/* Get the contents of the PDF output buffer. + Returns: A buffer full of binary PDF data for consumption by the client. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_get_buffer(PDF *p, long *size); + +/* Get the text of the last thrown exception or the reason of a failed + method call. + Returns: Text containing the description of the most recent error condition. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_get_errmsg(PDF *p); + +/* Get the number of the last thrown exception or the reason of a failed + method call. + Returns: The error code of the most recent error condition. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_get_errnum(PDF *p); + +/* Fetch the opaque application pointer stored in PDFlib. + Returns: The opaque application pointer stored in PDFlib. +*/ +PDFLIB_API void * PDFLIB_CALL +PDF_get_opaque(PDF *p); + +/* Retrieve some option or other value. + Returns: The value of some option value as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_get_option(PDF *p, const char *keyword, const char *optlist); + +/* Retrieve a string value. + Returns: a string identified by a string index returned by another + method. */ +PDFLIB_API const char * PDFLIB_CALL +PDF_get_string(PDF *p, int idx, const char *optlist); + +/* enums for the return values of PDF_get_unicode_format() */ +typedef enum +{ + pdf_uni_none = 0, /* no Unicode format */ + pdf_uni_utf8 = 5, /* UTF-8 */ + pdf_uni_utf16 = 7, /* UTF-16 */ + pdf_uni_utf16be = 8, /* UTF-16 BE */ + pdf_uni_utf16le = 9, /* UTF-16 LE */ + pdf_uni_utf32 = 10 /* UTF-32 */ +} +pdf_unicode_format; + +/* Get the type of the Unicode format which belongs to the Unicode string + returned from the last API method (unsupported) +*/ +PDFLIB_API pdf_unicode_format PDFLIB_CALL +PDF_get_unicode_format(PDF *p); + +/* Query detailed information about a loaded font. + Returns: The value of some font property as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_font(PDF *p, int font, const char *keyword, const char *optlist); + +/* Format vector graphics and query metrics and other properties. + Returns: The value of some graphics metrics as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_graphics(PDF *p, int graphics, const char *keyword, + const char *optlist); + +/* Format an image and query metrics and other image properties. + Returns: The value of some image metrics as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_image(PDF *p, int image, const char *keyword, const char *optlist); + +/* Query information about a matchbox on the current page. + Returns: The value of some matchbox parameter as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_matchbox(PDF *p, const char *boxname, int len, int num, + const char *keyword); + +/* Query the results of drawing a path object without actually drawing it. + Returns: The value of some geometrical values as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_path(PDF *p, int path, const char *keyword, const char *optlist); + +/* Perform formatting calculations for a PDI page and query the resulting + metrics. + Returns: The value of some page metrics as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_pdi_page(PDF *p, int page, const char *keyword, const char *optlist); + +/* Query properties of a virtual file or the PDFlib Virtual Filesystem (PVF) + Returns: The value of some file parameter as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_pvf(PDF *p, const char *filename, int len, const char *keyword); + +/* Query table information related to the most recently placed table + instance. + Returns: The value of some table parameter as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_table(PDF *p, int table, const char *keyword); + +/* Query the current state of a Textflow after a call to PDF_fit_textflow(). + Returns: The value of some table parameter as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_textflow(PDF *p, int textflow, const char *keyword); + +/* Perform textline formatting without creating output and query the resulting + metrics. + Returns: The value of some text metric value as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_textline(PDF *p, const char *text, int len, const char *keyword, + const char *optlist); + +/* Draw a line from the current point to another point. */ +PDFLIB_API void PDFLIB_CALL +PDF_lineto(PDF *p, double x, double y); + +/* Load a 3D model from a disk-based or virtual file. + Returns: A 3D handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_3ddata(PDF *p, const char *filename, int len, const char *optlist); + +/* Load a multimedia asset or file attachment from a file or URL. + Returns: An asset handle, or -1 (in PHP: 0) on error. + */ +PDFLIB_API int PDFLIB_CALL +PDF_load_asset(PDF *p, const char *type, const char *filename, + int len, const char *optlist); + +/* Search for a font and prepare it for later use. + Returns: A font handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_font(PDF *p, const char *fontname, int len, + const char *encoding, const char *optlist); + +/* Open a disk-based or virtual vector graphics file subject to various options. + Returns: A graphics handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_graphics(PDF *p, const char *type, const char *filename, + int len, const char *optlist); + +/* Search for an ICC profile and prepare it for later use. + Returns: A profile handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_iccprofile(PDF *p, const char *profilename, int len, + const char *optlist); + +/* Open a disk-based or virtual image file subject to various options. + Returns: An image handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_image(PDF *p, const char *imagetype, const char *filename, + int len, const char *optlist); + +/* Find a built-in spot color name, or make a named spot color from the + current fill color. + Returns: A color handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_makespotcolor(PDF *p, const char *spotname, int reserved); + +/* Add a marked content point with optional properties. */ +PDFLIB_API void PDFLIB_CALL +PDF_mc_point(PDF *p, const char *tagname, const char *optlist); + +/* Set the current point for graphics output. */ +PDFLIB_API void PDFLIB_CALL +PDF_moveto(PDF *p, double x, double y); + +/* Create a new PDFlib object. + Returns: A handle to a PDFlib object. +*/ +PDFLIB_API PDF * PDFLIB_CALL +PDF_new(void); + +/* Create a new PDFlib object with client-supplied error handling and memory + allocation routines. + Returns: A handle to a PDFlib object. +*/ +typedef void (*errorproc_t)(PDF *p1, const char *msg); +typedef void* (*allocproc_t)(PDF *p2, size_t size, const char *caller); +typedef void* (*reallocproc_t)(PDF *p3, + void *mem, size_t size, const char *caller); +typedef void (*freeproc_t)(PDF *p4, void *mem); + +PDFLIB_API PDF * PDFLIB_CALL +PDF_new2(errorproc_t errorhandler, allocproc_t allocproc, + reallocproc_t reallocproc, freeproc_t freeproc, void *opaque); + +/* Open a disk-based or virtual PDF document and prepare it for later use. + Returns: A PDI document handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_open_pdi_document(PDF *p, const char *filename, int len, + const char *optlist); + +/* Platform- and compiler-specific file offset type for large files >2GB. + * It must match the internal type pdc_off_t. + */ +#if defined(WIN32) + #if defined(__BORLANDC__) + typedef fpos_t pdf_off_t; + #else + typedef __int64 pdf_off_t; + #endif +#else + /* LFS support available on non-Windows platform? */ + #if defined(_LARGE_FILES) || defined(_LARGEFILE_SOURCE) || _FILE_OFFSET_BITS==64 + #include + typedef off_t pdf_off_t; + #else /* LFS support */ + typedef long pdf_off_t; + #endif /* LFS support */ +#endif + +/* Open a PDF document from a custom data source and prepare it for + later use. + Returns: A PDI document handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_open_pdi_callback(PDF *p, void *opaque, pdf_off_t filesize, + size_t (*readproc)(void *opaque, void *buffer, size_t size), + int (*seekproc)(void *opaque, pdf_off_t offset), + const char *optlist); + +/* Prepare a page for later use with PDF_fit_pdi_page(). + Returns: A page handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_open_pdi_page(PDF *p, int doc, int pagenumber, const char *optlist); + +/* Get the value of a pCOS path with type number or boolean. + Returns: The numerical value of the object identified by the pCOS path. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_pcos_get_number(PDF *p, int doc, const char *path, ...); + +/* Get the value of a pCOS path with type name, number, string, or boolean. + Returns: A string with the value of the object identified by the pCOS path. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_pcos_get_string(PDF *p, int doc, const char *path, ...); + +/* Get the contents of a pCOS path with type stream, fstream, or string. + Returns: The unencrypted data contained in the stream or string. +*/ +PDFLIB_API const unsigned char * PDFLIB_CALL +PDF_pcos_get_stream(PDF *p, int doc, int *length, const char *optlist, + const char *path, ...); + +/* Delete a PDF container object. */ +PDFLIB_API void PDFLIB_CALL +PDF_poca_delete(PDF *p, int container, const char *optlist); + +/* Insert a simple or container object in a PDF container object. */ +PDFLIB_API void PDFLIB_CALL +PDF_poca_insert(PDF *p, int container, const char *optlist); + +/* Create a new PDF container object of type dictionary or array and + insert objects. + Returns: A container handle which can be used until it is deleted with + PDF_poca_delete(). +*/ +PDFLIB_API int PDFLIB_CALL +PDF_poca_new(PDF *p, const char *optlist); + +/* Remove a simple or container object from a PDF container object. */ +PDFLIB_API void PDFLIB_CALL +PDF_poca_remove(PDF *p, int container, const char *optlist); + +/* Process certain elements of an imported PDF document. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_process_pdi(PDF *p, int doc, int pagenumber, const char *optlist); + +/* Draw a rectangle. */ +PDFLIB_API void PDFLIB_CALL +PDF_rect(PDF *p, double x, double y, double width, double height); + +/* Restore the most recently saved graphics state from the stack. */ +PDFLIB_API void PDFLIB_CALL +PDF_restore(PDF *p); + +/* Resume a page to add more content to it. */ +PDFLIB_API void PDFLIB_CALL +PDF_resume_page(PDF *p, const char *optlist); + +/* Rotate the coordinate system. */ +PDFLIB_API void PDFLIB_CALL +PDF_rotate(PDF *p, double phi); + +/* Save the current graphics state to a stack. */ +PDFLIB_API void PDFLIB_CALL +PDF_save(PDF *p); + +/* Scale the coordinate system. */ +PDFLIB_API void PDFLIB_CALL +PDF_scale(PDF *p, double sx, double sy); + +/* Set one or more graphics appearance options. */ +PDFLIB_API void PDFLIB_CALL +PDF_set_graphics_option(PDF *p, const char *optlist); + +/* Activate a graphics state 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); + +/* Set one or more internal options for PDFlib (unsupported). +*/ +PDFLIB_API void PDFLIB_CALL +PDF_set_internal_option(PDF *p, const char *optlist); + +/* Define layer relationships. */ +PDFLIB_API void PDFLIB_CALL +PDF_set_layer_dependency(PDF *p, const char *type, const char *optlist); + +/* Set one or more global options. */ +PDFLIB_API void PDFLIB_CALL +PDF_set_option(PDF *p, const char *optlist); + +/* Set one or more text filter or text appearance options for simple text + output methods. */ +PDFLIB_API void PDFLIB_CALL +PDF_set_text_option(PDF *p, const char *optlist); + +/* Set the position for simple text output */ +PDFLIB_API void PDFLIB_CALL +PDF_set_text_pos(PDF *p, double x, double y); + +/* Set the color space and color for the graphics and text state. */ +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 font in the specified size. */ +PDFLIB_API void PDFLIB_CALL +PDF_setfont(PDF *p, int font, double fontsize); + +/* 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); + +/* Define a shading (color gradient) between two or more colors. + Returns: A shading handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_shading(PDF *p, const char *type, double x0, double y0, double x1, + double y1, double c1, double c2, double c3, double c4, + const char *optlist); + +/* Define a shading pattern using a shading object. + Returns: A pattern handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_shading_pattern(PDF *p, int shading, const char *optlist); + +/* Fill an area with a shading. */ +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); + +/* Print text in the current font at the specified position. */ +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); + +/* Skew the coordinate system. */ +PDFLIB_API void PDFLIB_CALL +PDF_skew(PDF *p, double alpha, double beta); + +/* Calculate the width of text in an arbitrary font. + Returns: The width of text. +*/ +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. + Returns: The width of text. + */ +PDFLIB_API double PDFLIB_CALL +PDF_stringwidth2(PDF *p, const char *text, int len, int font, double fontsize); + +/* Stroke the path with the current line width and current stroke color, + 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); + +/* + * ---------------------------------------------------------------------- + * PDFlib API structure with function pointers to all API methods + * ---------------------------------------------------------------------- + */ + +/* Auxiliary structure for try/catch */ +typedef struct +{ + jmp_buf jbuf; +} pdf_jmpbuf; + +/* The API structure with pointers to all PDFlib API methods */ +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); + void (PDFLIB_CALL * PDF_add_nameddest)(PDF *p, const char *name, + int len, const char *optlist); + int (PDFLIB_CALL * PDF_add_path_point)(PDF *p, int path, double x, + double y, const char *type, const char *optlist); + int (PDFLIB_CALL * PDF_add_portfolio_file)(PDF *p, int folder, + const char *filename, int len, const char *optlist); + int (PDFLIB_CALL * PDF_add_portfolio_folder)(PDF *p, int folder, + const char *foldername, int len, const char *optlist); + int (PDFLIB_CALL * PDF_add_table_cell)(PDF *p, int table, int column, + int row, const char *text, int len, const char *optlist); + int (PDFLIB_CALL * PDF_add_textflow)(PDF *p, int textflow, const char *text, + int len, const char *optlist); + void (PDFLIB_CALL * PDF_align)(PDF *p, double dx, double dy); + 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); + 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_dpart)(PDF *p, 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_ext)(PDF *p, int uv, + const char *optlist); + 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_ext)(PDF *p, double width, + double height, const char *optlist); + int (PDFLIB_CALL * PDF_begin_pattern_ext)(PDF *p, double width, + double height, const char *optlist); + int (PDFLIB_CALL * PDF_begin_template_ext)(PDF *p, + double width, double height, const char *optlist); + int (PDFLIB_CALL * PDF_check_context)(PDF *p); + void (PDFLIB_CALL * PDF_circle)(PDF *p, double x, double y, double r); + void (PDFLIB_CALL * PDF_circular_arc)(PDF *p, double x1, double y1, + double x2, double y2); + void (PDFLIB_CALL * PDF_clip)(PDF *p); + void (PDFLIB_CALL * PDF_close_font)(PDF *p, int font); + void (PDFLIB_CALL * PDF_close_graphics)(PDF *p, int graphics); + void (PDFLIB_CALL * PDF_close_image)(PDF *p, int image); + void (PDFLIB_CALL * PDF_close_pdi_document)(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); + const char * (PDFLIB_CALL * PDF_convert_to_unicode)(PDF *p, + const char *inputformat, const char *inputstring, int inputlen, + int *outputlen, const char *optlist); + int (PDFLIB_CALL * PDF_create_3dview)(PDF *p, const char *username, + int len, const char *optlist); + 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); + int (PDFLIB_CALL * PDF_create_devicen)(PDF *p, 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 x1, double y1, + double x2, double y2, double x3, double y3); + int (PDFLIB_CALL * PDF_define_layer)(PDF *p, const char *name, int len, + const char *optlist); + const char * (PDFLIB_CALL * PDF_deflate_unicode)(PDF *p, + const char *utfstring, int len, int charsize, int *highchar); + void (PDFLIB_CALL * PDF_delete)(PDF *); + void (PDFLIB_CALL * PDF_delete_path)(PDF *p, int path); + int (PDFLIB_CALL * PDF_delete_pvf)(PDF *p, const char *filename, int len); + void (PDFLIB_CALL * PDF_delete_table)(PDF *p, int table, + const char *optlist); + void (PDFLIB_CALL * PDF_delete_textflow)(PDF *p, int textflow); + void (PDFLIB_CALL * PDF_draw_path)(PDF *p, int path, double x, double y, + const char *optlist); + void (PDFLIB_CALL * PDF_ellipse)(PDF *p, double x, double y, + double rx, double ry); + void (PDFLIB_CALL * PDF_elliptical_arc)(PDF *p, double x, double y, + double rx, double ry, const char *optlist); + 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_dpart)(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_ext)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_end_pattern)(PDF *p); + void (PDFLIB_CALL * PDF_end_template_ext)(PDF *p, + double width, double height); + void (PDFLIB_CALL * PDF_endpath)(PDF *p); + int (PDFLIB_CALL * PDF_download)(PDF *p, const char *filename, + int len, const char *optlist); + void (PDFLIB_CALL * PDF_fill)(PDF *p); + int (PDFLIB_CALL * PDF_fill_graphicsblock)(PDF *p, int page, + const char *blockname, int graphics, const char *optlist); + 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); + void (PDFLIB_CALL * PDF_fit_graphics)(PDF *p, int graphics, double x, + double y, const char *optlist); + 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_table)(PDF *p, int table, + double llx, double lly, double urx, double ury, + 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); + void * (PDFLIB_CALL * PDF_get_opaque)(PDF *p); + double (PDFLIB_CALL * PDF_get_option)(PDF *p, const char *keyword, + const char *optlist); + const char * (PDFLIB_CALL * PDF_get_string)(PDF *p, int idx, + const char *optlist); + pdf_unicode_format (PDFLIB_CALL * PDF_get_unicode_format)(PDF *p); + double (PDFLIB_CALL * PDF_info_font)(PDF *p, int font, const char *keyword, + const char *optlist); + double (PDFLIB_CALL *PDF_info_graphics)(PDF *p, int graphics, + const char *keyword, const char *optlist); + double (PDFLIB_CALL *PDF_info_image)(PDF *p, int image, const char *keyword, + const char *optlist); + double (PDFLIB_CALL * PDF_info_matchbox)(PDF *p, const char *boxname, + int len, int num, const char *keyword); + double (PDFLIB_CALL * PDF_info_path)(PDF *p, int path, const char *keyword, + const char *optlist); + double (PDFLIB_CALL * PDF_info_pdi_page)(PDF *p, int page, + const char *keyword, const char *optlist); + double (PDFLIB_CALL * PDF_info_pvf)(PDF *p, const char *filename, int len, + const char *keyword); + double (PDFLIB_CALL * PDF_info_table)(PDF *p, int table, + const char *keyword); + double (PDFLIB_CALL * PDF_info_textflow)(PDF *p, int textflow, + const char *keyword); + double (PDFLIB_CALL * PDF_info_textline)(PDF *p, const char *text, int len, + const char *keyword, const char *optlist); + void (PDFLIB_CALL * PDF_lineto)(PDF *p, double x, double y); + int (PDFLIB_CALL * PDF_load_3ddata)(PDF *p, const char *filename, int len, + const char *optlist); + int (PDFLIB_CALL * PDF_load_asset)(PDF *p, const char *type, + const char *filename, int len, const char *optlist); + int (PDFLIB_CALL * PDF_load_font)(PDF *p, const char *fontname, + int len, const char *encoding, const char *optlist); + int (PDFLIB_CALL * PDF_load_graphics)(PDF *p, const char *type, + const char *filename, int len, 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_pdi_callback)(PDF *p, void *opaque, + pdf_off_t filesize, size_t (*readproc)(void *opaque, void *buffer, + size_t size), int (*seekproc)(void *opaque, pdf_off_t offset), + const char *optlist); + int (PDFLIB_CALL * PDF_open_pdi_document)(PDF *p, const char *filename, + int len, const char *optlist); + int (PDFLIB_CALL * PDF_open_pdi_page)(PDF *p, + int doc, int pagenumber, const char *optlist); + double (PDFLIB_CALL * PDF_pcos_get_number)(PDF *p, + int doc, const char *path, ...); + const unsigned char * (PDFLIB_CALL * PDF_pcos_get_stream)(PDF *p, + int doc, int *length, const char *optlist, + const char *path, ...); + const char * (PDFLIB_CALL * PDF_pcos_get_string)(PDF *p, + int doc, const char *path, ...); + void (PDFLIB_CALL * PDF_poca_delete)(PDF *p, int container, + const char *optlist); + void (PDFLIB_CALL * PDF_poca_insert)(PDF *p, int container, + const char *optlist); + int (PDFLIB_CALL * PDF_poca_new)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_poca_remove)(PDF *p, int container, + const char *optlist); + 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_graphics_option)(PDF *p, const char *optlist); + 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_internal_option)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_set_layer_dependency)(PDF *p, const char *type, + const char *optlist); + void (PDFLIB_CALL * PDF_set_option)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_set_text_option)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_set_text_pos)(PDF *p, double x, double y); + 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_setfont)(PDF *p, int font, double fontsize); + 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); + int (PDFLIB_CALL * PDF_shading)(PDF *p, const char *type, double x0, + double y0, double x1, double y1, double c1, double c2, + double c3, double c4, 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); + 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_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); + + 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); +}; + +/* + * ---------------------------------------------------------------------- + * pCOS-specific enums and defines + * ---------------------------------------------------------------------- + */ + +/* + * Guard against multiple definition of pcos_mode and pcos_object_type for the + * case that multiple PDFlib products are used in the same program. + */ + +#ifndef PDF_PCOS_ENUMS + +/* + * Numerical values for the pCOS pseudo object "pcosmode". + */ +typedef enum +{ + pcos_mode_minimum = 0, /* encrypted doc (opened w/o password) */ + pcos_mode_restricted = 1, /* encrypted doc (opened w/ user password) */ + pcos_mode_full = 2 /* unencrypted doc or opened w/ master password */ +} pcos_mode; + + +/* + * Numerical values for the object types retrieved with the pCOS prefix "type:" + * and the method PDF_pcos_get_number(). + */ +typedef enum +{ + pcos_ot_null = 0, + pcos_ot_boolean = 1, + pcos_ot_number = 2, + pcos_ot_name = 3, + pcos_ot_string = 4, + pcos_ot_array = 5, + pcos_ot_dict = 6, + pcos_ot_stream = 7, + pcos_ot_fstream = 8 +} pcos_object_type; + +#define PDF_PCOS_ENUMS + +#endif /* PDF_PCOS_ENUMS */ + + +/* + * ---------------------------------------------------------------------- + * 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() and PDF_begin_template_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 + +/* + * ---------------------------------------------------------------------- + * Private stuff, do not use! + * ---------------------------------------------------------------------- + */ + +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 + * ---------------------------------------------------------------------- + */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* PDFLIB_H */ + +/* + * vim600: sw=4 fdm=marker + */ diff --git a/pdflib10/lib/libpdf.a b/pdflib10/lib/libpdf.a new file mode 100644 index 0000000..872e6c2 Binary files /dev/null and b/pdflib10/lib/libpdf.a differ diff --git a/pdflib10/pdflib.h b/pdflib10/pdflib.h new file mode 100644 index 0000000..4c5b913 --- /dev/null +++ b/pdflib10/pdflib.h @@ -0,0 +1,1405 @@ +/*---------------------------------------------------------------------------* + | Copyright (c) 1997-2022 PDFlib GmbH. All rights reserved. | + +---------------------------------------------------------------------------+ + | This software may not be copied or distributed except as expressly | + | authorized by PDFlib GmbH's general license agreement or a custom | + | license agreement signed by PDFlib GmbH. | + | For more information about licensing please refer to www.pdflib.com. | + *---------------------------------------------------------------------------*/ + +/* + * Public function declarations for PDFlib, PDFlib+PDI, and PPS; + * see PDFlib API Reference for details. + */ + +#ifndef PDFLIB_H +#define PDFLIB_H + +/* Make our declarations C++ compatible */ +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#define PDFLIB_PRODUCTNAME "PDFlib" + +/* + * The version defines below can be used to check the version of the + * include file against the library. + */ + +#define PDFLIB_MAJORVERSION 10 /* major version number */ +#define PDFLIB_MINORVERSION 0 /* minor version number */ +#define PDFLIB_REVISION 2 /* revision number */ +#define PDFLIB_SHORT_VERSIONSTRING "10" /* short version number */ +#define PDFLIB_LONG_VERSIONSTRING "10.0.2" /* full version number*/ + +/* + * ---------------------------------------------------------------------- + * Setup, mostly Windows calling conventions and DLL stuff + * ---------------------------------------------------------------------- + */ + +#if defined(WIN32) && !defined(PDFLIB_CALL) + #define PDFLIB_CALL __cdecl +#endif + +#undef PDFLIB_API +#if defined(WIN32) + + #ifdef PDFLIB_EXPORTS + #define PDFLIB_API __declspec(dllexport) /* prepare a DLL (internal use) */ + + #elif defined(PDFLIB_DLL) + + #define PDFLIB_API __declspec(dllimport) /* PDFlib clients: import DLL */ + #endif /* PDFLIB_DLL */ + +#else + #if __GNUC__ >= 4 + #define PDFLIB_API __attribute__ ((visibility("default"))) + #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ + || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) + #define PDFLIB_API __global + #elif defined(HPUX_HIDDEN_DEF) + #define PDFLIB_API __declspec(dllexport) + #endif +#endif /* WIN32 */ + +#ifndef PDFLIB_CALL + #define PDFLIB_CALL /* */ /* default: no special calling conventions */ +#endif + +#ifndef PDFLIB_API + #define PDFLIB_API /* */ /* default: generate or use static library */ +#endif + +#ifndef PDFLIB_DEPRECATED + +#if defined(__GNUC__) || defined(__clang__) +#define PDFLIB_DEPRECATED(func) func __attribute__ ((deprecated)) +#elif defined(_MSC_VER) +#define PDFLIB_DEPRECATED(func) __declspec(deprecated) func +#else +#define PDFLIB_DEPRECATED(func) func +#endif + +#endif + +typedef struct PDF_s PDF; + + +/* + * ---------------------------------------------------------------------- + * Function prototypes for all supported API methods + * ---------------------------------------------------------------------- + */ + +/* Activate a previously created structure element or other content item. */ +PDFLIB_API void PDFLIB_CALL +PDF_activate_item(PDF *p, int id); + +/* Create a named destination on a page in the document. */ +PDFLIB_API void PDFLIB_CALL +PDF_add_nameddest(PDF *p, const char *name, int len, const char *optlist); + +/* Add a point to a new or existing path object. + Returns: A path handle which can be used in subsequent path-related calls. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_path_point(PDF *p, int path, double x, double y, + const char *type, const char *optlist); + +/* Add a file to a portfolio folder or a package. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_portfolio_file(PDF *p, int folder, const char *filename, int len, + const char *optlist); + +/* Add a folder to a new or existing portfolio. + Returns: A folder handle which can be used in subsequent + portfolio-related calls. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_portfolio_folder(PDF *p, int parent, const char *foldername, int len, + const char *optlist); + +/* Add a cell to a new or existing table. + Returns: A table handle which can be used in subsequent table-related calls. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_table_cell(PDF *p, int table, int column, int row, const char *text, + int len, const char *optlist); + +/* Create a Textflow object, or add text and explicit options to an existing + Textflow. + Returns: A Textflow handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_add_textflow(PDF *p, int textflow, const char *text, int len, + const char *optlist); + +/* Align the coordinate system with a relative vector. */ +PDFLIB_API void PDFLIB_CALL +PDF_align(PDF *p, double dx, double dy); + +/* Draw a counterclockwise circular arc segment. */ +PDFLIB_API void PDFLIB_CALL +PDF_arc(PDF *p, double x, double y, double r, double alpha, double beta); + +/* Draw a clockwise circular arc segment. */ +PDFLIB_API void PDFLIB_CALL +PDF_arcn(PDF *p, double x, double y, double r, double alpha, double beta); + +/* Create a new PDF document subject to various options. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_begin_document(PDF *p, const char *filename, int len, const char *optlist); + +/* Create a new PDF document subject to various options. */ +typedef size_t (*writeproc_t)(PDF *p1, void *data, size_t size); +PDFLIB_API void PDFLIB_CALL +PDF_begin_document_callback(PDF *p, writeproc_t writeproc, const char *optlist); + +/* Create a new node in the document part hierarchy (requires PDF/VT or + PDF 2.0). +*/ +PDFLIB_API void PDFLIB_CALL +PDF_begin_dpart(PDF *p, const char *optlist); + +/* Start a Type 3 font definition. */ +PDFLIB_API 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); + +/* Start a glyph definition for a Type 3 font. */ +PDFLIB_API void PDFLIB_CALL +PDF_begin_glyph_ext(PDF *p, int uv, const char *optlist); + +/* Open a structure element or other content element for Tagged PDF. + Returns: An item handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_begin_item(PDF *p, const char *tagname, const char *optlist); + +/* Start a layer for subsequent output on the page. */ +PDFLIB_API void PDFLIB_CALL +PDF_begin_layer(PDF *p, int layer); + +/* Begin a marked content sequence with optional properties. */ +PDFLIB_API void PDFLIB_CALL +PDF_begin_mc(PDF *p, const char *tagname, const char *optlist); + +/* Add a new page to the document, and specify various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_begin_page_ext(PDF *p, double width, double height, const char *optlist); + +/* Start the definition of a tiling pattern with options. + Returns: A pattern handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_begin_pattern_ext(PDF *p, + double width, double height, const char *optlist); + +/* Start a template definition. + Returns: A template handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_begin_template_ext(PDF *p, double width, double height, + const char *optlist); + +/* Check the validity of a PDFlib context (unsupported). */ +PDFLIB_API int PDFLIB_CALL +PDF_check_context(PDF *p); + +/* Draw a circle. */ +PDFLIB_API void PDFLIB_CALL +PDF_circle(PDF *p, double x, double y, double r); + +/* Draw a circular arc segment defined by three points. */ +PDFLIB_API void PDFLIB_CALL +PDF_circular_arc(PDF *p, double x1, double y1, double x2, double y2); + +/* Use the current path as clipping path, and terminate the path. */ +PDFLIB_API void PDFLIB_CALL +PDF_clip(PDF *p); + +/* Close an open font handle which has not yet been used in the document. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_font(PDF *p, int font); + +/* Close vector graphics. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_graphics(PDF *p, int graphics); + +/* Close an image or template. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_image(PDF *p, int image); + +/* Close all open PDI page handles, and close the input PDF document. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_pdi_document(PDF *p, int doc); + +/* Close the page handle and free all page-related resources. */ +PDFLIB_API void PDFLIB_CALL +PDF_close_pdi_page(PDF *p, int page); + +/* Close the current path. */ +PDFLIB_API void PDFLIB_CALL +PDF_closepath(PDF *p); + +/* Close the path, fill, and stroke it. */ +PDFLIB_API void PDFLIB_CALL +PDF_closepath_fill_stroke(PDF *p); + +/* Close the path, and stroke it. */ +PDFLIB_API void PDFLIB_CALL +PDF_closepath_stroke(PDF *p); + +/* Apply a transformation matrix to the current coordinate system. */ +PDFLIB_API void PDFLIB_CALL +PDF_concat(PDF *p, double a, double b, double c, double d, double e, double f); + +/* Print text at the next line. */ +PDFLIB_API void PDFLIB_CALL +PDF_continue_text(PDF *p, const char *text); + +/* Same as PDF_continue_text(), but with explicit string length. */ +PDFLIB_API void PDFLIB_CALL +PDF_continue_text2(PDF *p, const char *text, int len); + +/* Convert a string in an arbitrary encoding to a Unicode string in various + formats. + Returns: The converted Unicode string. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_convert_to_unicode(PDF *p, const char *inputformat, + const char *inputstring, int inputlen, int *outputlen, const char *optlist); + +/* Create a 3D view. + Returns: A 3D view handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_3dview(PDF *p, const char *username, int len, const char *optlist); + +/* Create an action which can be applied to various objects and events. + Returns: An action handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_action(PDF *p, const char *type, const char *optlist); + +/* Create an annotation on the current page. */ +PDFLIB_API void PDFLIB_CALL +PDF_create_annotation(PDF *p, double llx, double lly, double urx, double ury, + const char *type, const char *optlist); + +/* Create a DeviceN colorspace with an arbitrary number of color components. + Returns: A DeviceN color space handle, or -1 (in PHP: 0) on error. + */ +PDFLIB_API int PDFLIB_CALL +PDF_create_devicen(PDF *p, const char *optlist); + +/* Create a bookmark subject to various options. + Returns: A handle for the generated bookmark. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_bookmark(PDF *p, const char *text, int len, const char *optlist); + +/* Create a new form field or fill an imported form field. */ +PDFLIB_API 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); + +/* Create a form field group subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_create_fieldgroup(PDF *p, const char *name, int len, const char *optlist); + +/* Create a graphics state object subject to various options. + Returns: A graphics state handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_gstate(PDF *p, const char *optlist); + +/* Create a named virtual read-only file from data provided in memory. */ +PDFLIB_API void PDFLIB_CALL +PDF_create_pvf(PDF *p, const char *filename, int len, + const void *data, size_t size, const char *optlist); + +/* Create a Textflow object from text contents, inline options, and explicit + options. + Returns: A Textflow handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_create_textflow(PDF *p, const char *text, int len, const char *optlist); + +/* Draw a Bezier curve from the current point, using three more control + points. */ +PDFLIB_API void PDFLIB_CALL +PDF_curveto(PDF *p, + double x1, double y1, double x2, double y2, double x3, double y3); + +/* Create a new layer definition. + Returns: A layer handle which can be used in subsequent layer-related calls. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_define_layer(PDF *p, const char *name, int len, const char *optlist); + +/* Deflate a Unicode string (UTF-16 or UTF-32) to a byte string (unsupported) +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_deflate_unicode(PDF *p, const char *utfstring, int len, int charsize, + int *highchar); + +/* Delete a PDFlib object and free all internal resources. */ +PDFLIB_API void PDFLIB_CALL +PDF_delete(PDF *p); + +/* Delete a path object. */ +PDFLIB_API void PDFLIB_CALL +PDF_delete_path(PDF *p, int path); + +/* Delete a named virtual file and free its data structures (but not the + contents). + Returns: -1 (in PHP: 0) if the virtual file exists but is locked, and + 1 otherwise. + */ +PDFLIB_API int PDFLIB_CALL +PDF_delete_pvf(PDF *p, const char *filename, int len); + +/* Delete a table and all associated data structures. */ +PDFLIB_API void PDFLIB_CALL +PDF_delete_table(PDF *p, int table, const char *optlist); + +/* Delete a Textflow and all associated data structures. */ +PDFLIB_API void PDFLIB_CALL +PDF_delete_textflow(PDF *p, int textflow); + +/* Draw a path object. */ +PDFLIB_API void PDFLIB_CALL PDF_draw_path(PDF *p, int path, double x, double y, + const char *optlist); + +/* Draw an ellipse. */ +PDFLIB_API void PDFLIB_CALL +PDF_ellipse(PDF *p, double x, double y, double rx, double ry); + +/* Draw an elliptical arc segment from the current point. */ +PDFLIB_API void PDFLIB_CALL +PDF_elliptical_arc(PDF *p, double x, double y, double rx, double ry, + const char *optlist); + +/* Add a glyph name and/or Unicode value to a custom 8-bit encoding. */ +PDFLIB_API void PDFLIB_CALL +PDF_encoding_set_char(PDF *p, const char *encoding, int slot, + const char *glyphname, int uv); + +/* Close the generated PDF document and apply various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_document(PDF *p, const char *optlist); + +/* Close a node in the document part hierarchy (requires PDF/VT or PDF 2.0). */ +PDFLIB_API void PDFLIB_CALL +PDF_end_dpart(PDF *p, const char *optlist); + +/* Terminate a Type 3 font definition. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_font(PDF *p); + +/* Terminate a glyph definition for a Type 3 font. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_glyph(PDF *p); + +/* Close a structure element or other content item. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_item(PDF *p, int id); + +/* Deactivate all active layers. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_layer(PDF *p); + +/* End the least recently opened marked content sequence. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_mc(PDF *p); + +/* Finish a page and apply various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_page_ext(PDF *p, const char *optlist); + +/* Finish the definition of a tiling pattern. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_pattern(PDF *p); + +/* Finish a template definition. */ +PDFLIB_API void PDFLIB_CALL +PDF_end_template_ext(PDF *p, double width, double height); + +/* End the current path without filling or stroking it. */ +PDFLIB_API void PDFLIB_CALL +PDF_endpath(PDF *p); + +/* Download data from a network resource and store it in a disk-based or + virtual file. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. + */ +PDFLIB_API int PDFLIB_CALL +PDF_download(PDF *p, const char *filename, int len, const char *optlist); + +/* Fill the interior of the path with the current fill color. */ +PDFLIB_API void PDFLIB_CALL +PDF_fill(PDF *p); + +/* Fill a graphics Block with variable data according to its properties. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_fill_graphicsblock(PDF *p, int page, const char *blockname, + int graphics, const char *optlist); + +/* Fill an image block with variable data according to its properties. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_fill_imageblock(PDF *p, int page, const char *blockname, + int image, const char *optlist); + +/* Fill a PDF block with variable data according to its properties. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_fill_pdfblock(PDF *p, int page, const char *blockname, + int contents, const char *optlist); + +/* Fill and stroke the path with the current fill and stroke color. */ +PDFLIB_API void PDFLIB_CALL +PDF_fill_stroke(PDF *p); + +/* Fill a Textline or Textflow Block with variable data according to its + properties. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_fill_textblock(PDF *p, int page, const char *blockname, + const char *text, int len, const char *optlist); + +/* Place vector graphics on a content stream, subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_fit_graphics(PDF *p, int graphics, double x, double y, const char *optlist); + +/* Place an image or template on the page, subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_fit_image(PDF *p, int image, double x, double y, const char *optlist); + +/* Place an imported PDF page on the output page subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_fit_pdi_page(PDF *p, int page, double x, double y, const char *optlist); + +/* Fully or partially place a table on the page. + Returns: A string which specifies the reason for returning. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_fit_table(PDF *p, int table, double llx, double lly, + double urx, double ury, const char *optlist); + +/* Format the next portion of a Textflow. + Returns: A string which specifies the reason for returning. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_fit_textflow(PDF *p, int textflow, double llx, double lly, + double urx, double ury, const char *optlist); + +/* Place a single line of text at position (x, y) subject to various options. */ +PDFLIB_API void PDFLIB_CALL +PDF_fit_textline(PDF *p, const char *text, int len, double x, double y, + const char *optlist); + +/* The API structure with function pointers. */ +typedef struct PDFlib_api_s PDFlib_api; + +/* + * Retrieve a structure with PDFlib API function pointers (mainly for DLLs). + * Although this function is published here it is not supposed to be used + * directly by clients. Use PDF_new_dl() in pdflibdl.c instead. + */ +PDFLIB_API const PDFlib_api * PDFLIB_CALL +PDF_get_api(void); + +/* Get the name of the API method which threw the last exception or failed. + Returns: Name of an API method. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_get_apiname(PDF *p); + +/* Get the contents of the PDF output buffer. + Returns: A buffer full of binary PDF data for consumption by the client. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_get_buffer(PDF *p, long *size); + +/* Get the text of the last thrown exception or the reason of a failed + method call. + Returns: Text containing the description of the most recent error condition. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_get_errmsg(PDF *p); + +/* Get the number of the last thrown exception or the reason of a failed + method call. + Returns: The error code of the most recent error condition. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_get_errnum(PDF *p); + +/* Fetch the opaque application pointer stored in PDFlib. + Returns: The opaque application pointer stored in PDFlib. +*/ +PDFLIB_API void * PDFLIB_CALL +PDF_get_opaque(PDF *p); + +/* Retrieve some option or other value. + Returns: The value of some option value as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_get_option(PDF *p, const char *keyword, const char *optlist); + +/* Retrieve a string value. + Returns: a string identified by a string index returned by another + method. */ +PDFLIB_API const char * PDFLIB_CALL +PDF_get_string(PDF *p, int idx, const char *optlist); + +/* enums for the return values of PDF_get_unicode_format() */ +typedef enum +{ + pdf_uni_none = 0, /* no Unicode format */ + pdf_uni_utf8 = 5, /* UTF-8 */ + pdf_uni_utf16 = 7, /* UTF-16 */ + pdf_uni_utf16be = 8, /* UTF-16 BE */ + pdf_uni_utf16le = 9, /* UTF-16 LE */ + pdf_uni_utf32 = 10 /* UTF-32 */ +} +pdf_unicode_format; + +/* Get the type of the Unicode format which belongs to the Unicode string + returned from the last API method (unsupported) +*/ +PDFLIB_API pdf_unicode_format PDFLIB_CALL +PDF_get_unicode_format(PDF *p); + +/* Query detailed information about a loaded font. + Returns: The value of some font property as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_font(PDF *p, int font, const char *keyword, const char *optlist); + +/* Format vector graphics and query metrics and other properties. + Returns: The value of some graphics metrics as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_graphics(PDF *p, int graphics, const char *keyword, + const char *optlist); + +/* Format an image and query metrics and other image properties. + Returns: The value of some image metrics as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_image(PDF *p, int image, const char *keyword, const char *optlist); + +/* Query information about a matchbox on the current page. + Returns: The value of some matchbox parameter as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_matchbox(PDF *p, const char *boxname, int len, int num, + const char *keyword); + +/* Query the results of drawing a path object without actually drawing it. + Returns: The value of some geometrical values as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_path(PDF *p, int path, const char *keyword, const char *optlist); + +/* Perform formatting calculations for a PDI page and query the resulting + metrics. + Returns: The value of some page metrics as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_pdi_page(PDF *p, int page, const char *keyword, const char *optlist); + +/* Query properties of a virtual file or the PDFlib Virtual Filesystem (PVF) + Returns: The value of some file parameter as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_pvf(PDF *p, const char *filename, int len, const char *keyword); + +/* Query table information related to the most recently placed table + instance. + Returns: The value of some table parameter as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_table(PDF *p, int table, const char *keyword); + +/* Query the current state of a Textflow after a call to PDF_fit_textflow(). + Returns: The value of some table parameter as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_textflow(PDF *p, int textflow, const char *keyword); + +/* Perform textline formatting without creating output and query the resulting + metrics. + Returns: The value of some text metric value as requested by keyword. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_info_textline(PDF *p, const char *text, int len, const char *keyword, + const char *optlist); + +/* Draw a line from the current point to another point. */ +PDFLIB_API void PDFLIB_CALL +PDF_lineto(PDF *p, double x, double y); + +/* Load a 3D model from a disk-based or virtual file. + Returns: A 3D handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_3ddata(PDF *p, const char *filename, int len, const char *optlist); + +/* Load a multimedia asset or file attachment from a file or URL. + Returns: An asset handle, or -1 (in PHP: 0) on error. + */ +PDFLIB_API int PDFLIB_CALL +PDF_load_asset(PDF *p, const char *type, const char *filename, + int len, const char *optlist); + +/* Search for a font and prepare it for later use. + Returns: A font handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_font(PDF *p, const char *fontname, int len, + const char *encoding, const char *optlist); + +/* Open a disk-based or virtual vector graphics file subject to various options. + Returns: A graphics handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_graphics(PDF *p, const char *type, const char *filename, + int len, const char *optlist); + +/* Search for an ICC profile and prepare it for later use. + Returns: A profile handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_iccprofile(PDF *p, const char *profilename, int len, + const char *optlist); + +/* Open a disk-based or virtual image file subject to various options. + Returns: An image handle, or -1 (in PHP: 0) on error. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_load_image(PDF *p, const char *imagetype, const char *filename, + int len, const char *optlist); + +/* Find a built-in spot color name, or make a named spot color from the + current fill color. + Returns: A color handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_makespotcolor(PDF *p, const char *spotname, int reserved); + +/* Add a marked content point with optional properties. */ +PDFLIB_API void PDFLIB_CALL +PDF_mc_point(PDF *p, const char *tagname, const char *optlist); + +/* Set the current point for graphics output. */ +PDFLIB_API void PDFLIB_CALL +PDF_moveto(PDF *p, double x, double y); + +/* Create a new PDFlib object. + Returns: A handle to a PDFlib object. +*/ +PDFLIB_API PDF * PDFLIB_CALL +PDF_new(void); + +/* Create a new PDFlib object with client-supplied error handling and memory + allocation routines. + Returns: A handle to a PDFlib object. +*/ +typedef void (*errorproc_t)(PDF *p1, const char *msg); +typedef void* (*allocproc_t)(PDF *p2, size_t size, const char *caller); +typedef void* (*reallocproc_t)(PDF *p3, + void *mem, size_t size, const char *caller); +typedef void (*freeproc_t)(PDF *p4, void *mem); + +PDFLIB_API PDF * PDFLIB_CALL +PDF_new2(errorproc_t errorhandler, allocproc_t allocproc, + reallocproc_t reallocproc, freeproc_t freeproc, void *opaque); + +/* Open a disk-based or virtual PDF document and prepare it for later use. + Returns: A PDI document handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_open_pdi_document(PDF *p, const char *filename, int len, + const char *optlist); + +/* Platform- and compiler-specific file offset type for large files >2GB. + * It must match the internal type pdc_off_t. + */ +#if defined(WIN32) + #if defined(__BORLANDC__) + typedef fpos_t pdf_off_t; + #else + typedef __int64 pdf_off_t; + #endif +#else + /* LFS support available on non-Windows platform? */ + #if defined(_LARGE_FILES) || defined(_LARGEFILE_SOURCE) || _FILE_OFFSET_BITS==64 + #include + typedef off_t pdf_off_t; + #else /* LFS support */ + typedef long pdf_off_t; + #endif /* LFS support */ +#endif + +/* Open a PDF document from a custom data source and prepare it for + later use. + Returns: A PDI document handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_open_pdi_callback(PDF *p, void *opaque, pdf_off_t filesize, + size_t (*readproc)(void *opaque, void *buffer, size_t size), + int (*seekproc)(void *opaque, pdf_off_t offset), + const char *optlist); + +/* Prepare a page for later use with PDF_fit_pdi_page(). + Returns: A page handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_open_pdi_page(PDF *p, int doc, int pagenumber, const char *optlist); + +/* Get the value of a pCOS path with type number or boolean. + Returns: The numerical value of the object identified by the pCOS path. +*/ +PDFLIB_API double PDFLIB_CALL +PDF_pcos_get_number(PDF *p, int doc, const char *path, ...); + +/* Get the value of a pCOS path with type name, number, string, or boolean. + Returns: A string with the value of the object identified by the pCOS path. +*/ +PDFLIB_API const char * PDFLIB_CALL +PDF_pcos_get_string(PDF *p, int doc, const char *path, ...); + +/* Get the contents of a pCOS path with type stream, fstream, or string. + Returns: The unencrypted data contained in the stream or string. +*/ +PDFLIB_API const unsigned char * PDFLIB_CALL +PDF_pcos_get_stream(PDF *p, int doc, int *length, const char *optlist, + const char *path, ...); + +/* Delete a PDF container object. */ +PDFLIB_API void PDFLIB_CALL +PDF_poca_delete(PDF *p, int container, const char *optlist); + +/* Insert a simple or container object in a PDF container object. */ +PDFLIB_API void PDFLIB_CALL +PDF_poca_insert(PDF *p, int container, const char *optlist); + +/* Create a new PDF container object of type dictionary or array and + insert objects. + Returns: A container handle which can be used until it is deleted with + PDF_poca_delete(). +*/ +PDFLIB_API int PDFLIB_CALL +PDF_poca_new(PDF *p, const char *optlist); + +/* Remove a simple or container object from a PDF container object. */ +PDFLIB_API void PDFLIB_CALL +PDF_poca_remove(PDF *p, int container, const char *optlist); + +/* Process certain elements of an imported PDF document. + Returns: -1 (in PHP: 0) on error, and 1 otherwise. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_process_pdi(PDF *p, int doc, int pagenumber, const char *optlist); + +/* Draw a rectangle. */ +PDFLIB_API void PDFLIB_CALL +PDF_rect(PDF *p, double x, double y, double width, double height); + +/* Restore the most recently saved graphics state from the stack. */ +PDFLIB_API void PDFLIB_CALL +PDF_restore(PDF *p); + +/* Resume a page to add more content to it. */ +PDFLIB_API void PDFLIB_CALL +PDF_resume_page(PDF *p, const char *optlist); + +/* Rotate the coordinate system. */ +PDFLIB_API void PDFLIB_CALL +PDF_rotate(PDF *p, double phi); + +/* Save the current graphics state to a stack. */ +PDFLIB_API void PDFLIB_CALL +PDF_save(PDF *p); + +/* Scale the coordinate system. */ +PDFLIB_API void PDFLIB_CALL +PDF_scale(PDF *p, double sx, double sy); + +/* Set one or more graphics appearance options. */ +PDFLIB_API void PDFLIB_CALL +PDF_set_graphics_option(PDF *p, const char *optlist); + +/* Activate a graphics state 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); + +/* Set one or more internal options for PDFlib (unsupported). +*/ +PDFLIB_API void PDFLIB_CALL +PDF_set_internal_option(PDF *p, const char *optlist); + +/* Define layer relationships. */ +PDFLIB_API void PDFLIB_CALL +PDF_set_layer_dependency(PDF *p, const char *type, const char *optlist); + +/* Set one or more global options. */ +PDFLIB_API void PDFLIB_CALL +PDF_set_option(PDF *p, const char *optlist); + +/* Set one or more text filter or text appearance options for simple text + output methods. */ +PDFLIB_API void PDFLIB_CALL +PDF_set_text_option(PDF *p, const char *optlist); + +/* Set the position for simple text output */ +PDFLIB_API void PDFLIB_CALL +PDF_set_text_pos(PDF *p, double x, double y); + +/* Set the color space and color for the graphics and text state. */ +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 font in the specified size. */ +PDFLIB_API void PDFLIB_CALL +PDF_setfont(PDF *p, int font, double fontsize); + +/* 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); + +/* Define a shading (color gradient) between two or more colors. + Returns: A shading handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_shading(PDF *p, const char *type, double x0, double y0, double x1, + double y1, double c1, double c2, double c3, double c4, + const char *optlist); + +/* Define a shading pattern using a shading object. + Returns: A pattern handle. +*/ +PDFLIB_API int PDFLIB_CALL +PDF_shading_pattern(PDF *p, int shading, const char *optlist); + +/* Fill an area with a shading. */ +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); + +/* Print text in the current font at the specified position. */ +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); + +/* Skew the coordinate system. */ +PDFLIB_API void PDFLIB_CALL +PDF_skew(PDF *p, double alpha, double beta); + +/* Calculate the width of text in an arbitrary font. + Returns: The width of text. +*/ +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. + Returns: The width of text. + */ +PDFLIB_API double PDFLIB_CALL +PDF_stringwidth2(PDF *p, const char *text, int len, int font, double fontsize); + +/* Stroke the path with the current line width and current stroke color, + 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); + +/* + * ---------------------------------------------------------------------- + * PDFlib API structure with function pointers to all API methods + * ---------------------------------------------------------------------- + */ + +/* Auxiliary structure for try/catch */ +typedef struct +{ + jmp_buf jbuf; +} pdf_jmpbuf; + +/* The API structure with pointers to all PDFlib API methods */ +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); + void (PDFLIB_CALL * PDF_add_nameddest)(PDF *p, const char *name, + int len, const char *optlist); + int (PDFLIB_CALL * PDF_add_path_point)(PDF *p, int path, double x, + double y, const char *type, const char *optlist); + int (PDFLIB_CALL * PDF_add_portfolio_file)(PDF *p, int folder, + const char *filename, int len, const char *optlist); + int (PDFLIB_CALL * PDF_add_portfolio_folder)(PDF *p, int folder, + const char *foldername, int len, const char *optlist); + int (PDFLIB_CALL * PDF_add_table_cell)(PDF *p, int table, int column, + int row, const char *text, int len, const char *optlist); + int (PDFLIB_CALL * PDF_add_textflow)(PDF *p, int textflow, const char *text, + int len, const char *optlist); + void (PDFLIB_CALL * PDF_align)(PDF *p, double dx, double dy); + 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); + 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_dpart)(PDF *p, 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_ext)(PDF *p, int uv, + const char *optlist); + 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_ext)(PDF *p, double width, + double height, const char *optlist); + int (PDFLIB_CALL * PDF_begin_pattern_ext)(PDF *p, double width, + double height, const char *optlist); + int (PDFLIB_CALL * PDF_begin_template_ext)(PDF *p, + double width, double height, const char *optlist); + int (PDFLIB_CALL * PDF_check_context)(PDF *p); + void (PDFLIB_CALL * PDF_circle)(PDF *p, double x, double y, double r); + void (PDFLIB_CALL * PDF_circular_arc)(PDF *p, double x1, double y1, + double x2, double y2); + void (PDFLIB_CALL * PDF_clip)(PDF *p); + void (PDFLIB_CALL * PDF_close_font)(PDF *p, int font); + void (PDFLIB_CALL * PDF_close_graphics)(PDF *p, int graphics); + void (PDFLIB_CALL * PDF_close_image)(PDF *p, int image); + void (PDFLIB_CALL * PDF_close_pdi_document)(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); + const char * (PDFLIB_CALL * PDF_convert_to_unicode)(PDF *p, + const char *inputformat, const char *inputstring, int inputlen, + int *outputlen, const char *optlist); + int (PDFLIB_CALL * PDF_create_3dview)(PDF *p, const char *username, + int len, const char *optlist); + 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); + int (PDFLIB_CALL * PDF_create_devicen)(PDF *p, 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 x1, double y1, + double x2, double y2, double x3, double y3); + int (PDFLIB_CALL * PDF_define_layer)(PDF *p, const char *name, int len, + const char *optlist); + const char * (PDFLIB_CALL * PDF_deflate_unicode)(PDF *p, + const char *utfstring, int len, int charsize, int *highchar); + void (PDFLIB_CALL * PDF_delete)(PDF *); + void (PDFLIB_CALL * PDF_delete_path)(PDF *p, int path); + int (PDFLIB_CALL * PDF_delete_pvf)(PDF *p, const char *filename, int len); + void (PDFLIB_CALL * PDF_delete_table)(PDF *p, int table, + const char *optlist); + void (PDFLIB_CALL * PDF_delete_textflow)(PDF *p, int textflow); + void (PDFLIB_CALL * PDF_draw_path)(PDF *p, int path, double x, double y, + const char *optlist); + void (PDFLIB_CALL * PDF_ellipse)(PDF *p, double x, double y, + double rx, double ry); + void (PDFLIB_CALL * PDF_elliptical_arc)(PDF *p, double x, double y, + double rx, double ry, const char *optlist); + 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_dpart)(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_ext)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_end_pattern)(PDF *p); + void (PDFLIB_CALL * PDF_end_template_ext)(PDF *p, + double width, double height); + void (PDFLIB_CALL * PDF_endpath)(PDF *p); + int (PDFLIB_CALL * PDF_download)(PDF *p, const char *filename, + int len, const char *optlist); + void (PDFLIB_CALL * PDF_fill)(PDF *p); + int (PDFLIB_CALL * PDF_fill_graphicsblock)(PDF *p, int page, + const char *blockname, int graphics, const char *optlist); + 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); + void (PDFLIB_CALL * PDF_fit_graphics)(PDF *p, int graphics, double x, + double y, const char *optlist); + 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_table)(PDF *p, int table, + double llx, double lly, double urx, double ury, + 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); + void * (PDFLIB_CALL * PDF_get_opaque)(PDF *p); + double (PDFLIB_CALL * PDF_get_option)(PDF *p, const char *keyword, + const char *optlist); + const char * (PDFLIB_CALL * PDF_get_string)(PDF *p, int idx, + const char *optlist); + pdf_unicode_format (PDFLIB_CALL * PDF_get_unicode_format)(PDF *p); + double (PDFLIB_CALL * PDF_info_font)(PDF *p, int font, const char *keyword, + const char *optlist); + double (PDFLIB_CALL *PDF_info_graphics)(PDF *p, int graphics, + const char *keyword, const char *optlist); + double (PDFLIB_CALL *PDF_info_image)(PDF *p, int image, const char *keyword, + const char *optlist); + double (PDFLIB_CALL * PDF_info_matchbox)(PDF *p, const char *boxname, + int len, int num, const char *keyword); + double (PDFLIB_CALL * PDF_info_path)(PDF *p, int path, const char *keyword, + const char *optlist); + double (PDFLIB_CALL * PDF_info_pdi_page)(PDF *p, int page, + const char *keyword, const char *optlist); + double (PDFLIB_CALL * PDF_info_pvf)(PDF *p, const char *filename, int len, + const char *keyword); + double (PDFLIB_CALL * PDF_info_table)(PDF *p, int table, + const char *keyword); + double (PDFLIB_CALL * PDF_info_textflow)(PDF *p, int textflow, + const char *keyword); + double (PDFLIB_CALL * PDF_info_textline)(PDF *p, const char *text, int len, + const char *keyword, const char *optlist); + void (PDFLIB_CALL * PDF_lineto)(PDF *p, double x, double y); + int (PDFLIB_CALL * PDF_load_3ddata)(PDF *p, const char *filename, int len, + const char *optlist); + int (PDFLIB_CALL * PDF_load_asset)(PDF *p, const char *type, + const char *filename, int len, const char *optlist); + int (PDFLIB_CALL * PDF_load_font)(PDF *p, const char *fontname, + int len, const char *encoding, const char *optlist); + int (PDFLIB_CALL * PDF_load_graphics)(PDF *p, const char *type, + const char *filename, int len, 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_pdi_callback)(PDF *p, void *opaque, + pdf_off_t filesize, size_t (*readproc)(void *opaque, void *buffer, + size_t size), int (*seekproc)(void *opaque, pdf_off_t offset), + const char *optlist); + int (PDFLIB_CALL * PDF_open_pdi_document)(PDF *p, const char *filename, + int len, const char *optlist); + int (PDFLIB_CALL * PDF_open_pdi_page)(PDF *p, + int doc, int pagenumber, const char *optlist); + double (PDFLIB_CALL * PDF_pcos_get_number)(PDF *p, + int doc, const char *path, ...); + const unsigned char * (PDFLIB_CALL * PDF_pcos_get_stream)(PDF *p, + int doc, int *length, const char *optlist, + const char *path, ...); + const char * (PDFLIB_CALL * PDF_pcos_get_string)(PDF *p, + int doc, const char *path, ...); + void (PDFLIB_CALL * PDF_poca_delete)(PDF *p, int container, + const char *optlist); + void (PDFLIB_CALL * PDF_poca_insert)(PDF *p, int container, + const char *optlist); + int (PDFLIB_CALL * PDF_poca_new)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_poca_remove)(PDF *p, int container, + const char *optlist); + 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_graphics_option)(PDF *p, const char *optlist); + 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_internal_option)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_set_layer_dependency)(PDF *p, const char *type, + const char *optlist); + void (PDFLIB_CALL * PDF_set_option)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_set_text_option)(PDF *p, const char *optlist); + void (PDFLIB_CALL * PDF_set_text_pos)(PDF *p, double x, double y); + 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_setfont)(PDF *p, int font, double fontsize); + 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); + int (PDFLIB_CALL * PDF_shading)(PDF *p, const char *type, double x0, + double y0, double x1, double y1, double c1, double c2, + double c3, double c4, 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); + 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_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); + + 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); +}; + +/* + * ---------------------------------------------------------------------- + * pCOS-specific enums and defines + * ---------------------------------------------------------------------- + */ + +/* + * Guard against multiple definition of pcos_mode and pcos_object_type for the + * case that multiple PDFlib products are used in the same program. + */ + +#ifndef PDF_PCOS_ENUMS + +/* + * Numerical values for the pCOS pseudo object "pcosmode". + */ +typedef enum +{ + pcos_mode_minimum = 0, /* encrypted doc (opened w/o password) */ + pcos_mode_restricted = 1, /* encrypted doc (opened w/ user password) */ + pcos_mode_full = 2 /* unencrypted doc or opened w/ master password */ +} pcos_mode; + + +/* + * Numerical values for the object types retrieved with the pCOS prefix "type:" + * and the method PDF_pcos_get_number(). + */ +typedef enum +{ + pcos_ot_null = 0, + pcos_ot_boolean = 1, + pcos_ot_number = 2, + pcos_ot_name = 3, + pcos_ot_string = 4, + pcos_ot_array = 5, + pcos_ot_dict = 6, + pcos_ot_stream = 7, + pcos_ot_fstream = 8 +} pcos_object_type; + +#define PDF_PCOS_ENUMS + +#endif /* PDF_PCOS_ENUMS */ + + +/* + * ---------------------------------------------------------------------- + * 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() and PDF_begin_template_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 + +/* + * ---------------------------------------------------------------------- + * Private stuff, do not use! + * ---------------------------------------------------------------------- + */ + +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 + * ---------------------------------------------------------------------- + */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* PDFLIB_H */ + +/* + * vim600: sw=4 fdm=marker + */ diff --git a/pdflib10_linux.go b/pdflib10_linux.go new file mode 100644 index 0000000..8d2768c --- /dev/null +++ b/pdflib10_linux.go @@ -0,0 +1,22 @@ +// Copyright © 2016 Abcum Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this info except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build pdflib10 && cgo +// +build pdflib10,cgo + +package pdflib + +// #cgo CFLAGS: -Iinclude +// #cgo LDFLAGS: -L${SRCDIR}/pdflib10/lib -lpdf-linux -lm +import "C"