3 #include <exec/types.h>
4 #include <exec/lists.h>
8 #endif /* __cplusplus */
10 void *pdfNew(const char *fname
);
11 void pdfConvertUserToDevice(void *_ctx
, double *x
, double *y
);
12 void pdfConvertDeviceToUser(void *_ctx
, int page
, double x
, double y
, int *ux
, int *uy
);
14 void pdfDelete(void *_ctx
);
16 float pdfGetPageMediaWidth(void *_ctx
, int page
);
17 float pdfGetPageMediaHeight(void *_ctx
, int page
);
18 int pdfGetDocumentDimensions(void *_ctx
, float *width
, float *height
);
19 int pdfGetPagesNum(void *_ctx
);
21 int pdfDisplayPageSlice(void *_ctx
, int page
, double scale
, int rotate
, int useMediaBox
, int crop
, int printing
,
22 int sliceX
, int sliceY
, int sliceW
, int sliceH
, int (*abortcheckcbk
)(void *), void *abortcheckcbkdata
);
30 int stride
; /* in bytes */
34 unsigned char *pdfGetBitmapRowData(void *_ctx
, int row
);
35 int pdfGetBitmapWidth(void *_ctx
);
36 int pdfGetBitmapHeight(void *_ctx
);
37 void pdfGetBitmap(void *_ctx
, struct pdfBitmap
*bm
);
39 void *pdfGetPage(void *_ctx
, int page
);
41 /* outline handling functions */
42 struct MinList
*pdfGetOutlines(void *_ctx
);
43 char *outlineGetTitle(void *_outline
);
44 struct MinList
*outlineGetChildren(void *_outline
);
45 int outlineHasChildren(void *_outline
);
46 int outlineGetPage(void *_outline
);
49 void pdfListLinks(void *_ctx
, int page
);
50 void *pdfFindLink(void *_ctx
, int page
, int x
, int y
);
51 char *linkGetDescription(void *_link
);
52 int pdfGetActionPageFromLink(void *_doc
, void *_link
);
56 int pdfSearch(void *_ctx
, int *page
, char *phrase
, int direction
, double *x1
, double *y1
, double *x2
, double *y2
);
64 /* locking (too lowlevel?) */
66 void pdfLock(void *_ctx
);
67 void pdfRelease(void *_ctx
);
70 /* document properties (sucky api?)*/
77 PDFATTRTYPE_STRING
= 1,
90 struct pdfAttribute
*pdfGetAttr(void *_ctx
, int property
);
91 void pdfFreeAttr(void *_ctx
, struct pdfAttribute
*attr
);
101 double x1
, y1
, x2
, y2
; // area on image
102 char *contents
; // in local charset
103 char *author
; // in local charset
104 void *obj
; // attached mui object
108 struct MinList
*pdfGetAnnotations(void *_ctx
, int page
);
113 double x1
, y1
, x2
, y2
; // bounding rectangle in pdf points
119 struct pdfSelectionRectangle
121 double x1
, y1
, x2
, y2
; // bounding rectangle in pdf points
124 struct pdfSelectionRegion
127 struct pdfSelectionRectangle rectangles
[0];
130 struct pdfSelectionRegion
*pdfBuildRegionForSelection(void *_ctx
, int page
, double x1
, double y1
, double x2
, double y2
, struct pdfSelectionRegion
*previous
);
131 void pdfDisposeRegionForSelection(void *_ctx
, struct pdfSelectionRegion
*region
);
133 struct pdfSelectionText
138 struct pdfSelectionText
*pdfBuildTextForSelection(void *_ctx
, int page
, double x1
, double y1
, double x2
, double y2
);
139 void pdfDisposeTextForSelection(void *_ctx
, struct pdfSelectionText
*text
);
142 /* internals (TODO: should not be exposed! */
146 struct MinList searchresultlist
;
147 struct searchresult
*currentsearchresult
; // current node on a page;
149 char *phrase
; // on which page we are currently searching
156 #endif /* __cplusplus */