File: c13.tex

package info (click to toggle)
cpdf 2.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,140 kB
  • sloc: ml: 35,825; makefile: 66; sh: 49
file content (55 lines) | stat: -rw-r--r-- 1,675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* CHAPTER 12. File Attachments */

/*
 * cpdf_attachFile(filename, pdf) attaches a file to the pdf. It is attached
 * at document level.
 */
void cpdf_attachFile(const char[], int);

/*
 * cpdf_attachFileToPage(filename, pdf, pagenumber) attaches a file, given
 * its file name, pdf, and the page number to which it should be attached.
 */
void cpdf_attachFileToPage(const char[], int, int);

/*
 * cpdf_attachFileFromMemory(memory, length, filename, pdf) attaches from
 * memory, just like cpdf_attachFile.
 */
void cpdf_attachFileFromMemory(void *, int, const char[], int);

/*
 * cpdf_attachFileToPageFromMemory(memory, length, filename, pdf, pagenumber)
 * attaches from memory, just like cpdf_attachFileToPage.
 */
void cpdf_attachFileToPageFromMemory(void *, int, const char[], int, int);

/* Remove all page- and document-level attachments from a document. */
void cpdf_removeAttachedFiles(int);

/*
 * List information about attachments. Call cpdf_startGetAttachments(pdf)
 * first, then cpdf_numberGetAttachments to find out how many there are. Then
 * cpdf_getAttachmentName etc. to return each one 0...(n - 1). Finally, call
 * cpdf_endGetAttachments to clean up.
 */
void cpdf_startGetAttachments(int);

/* Get the number of attachments. */
int cpdf_numberGetAttachments(void);

/* Get the name of the attachment. */
char *cpdf_getAttachmentName(int);

/* Gets the page number. 0 = document level. */
int cpdf_getAttachmentPage(int);

/*
 * cpdf_getAttachmentData(serial number, length) returns a pointer to the
 * data, and its length.
 */
void *cpdf_getAttachmentData(int, int *);

/* Clean up after getting attachments. */
void cpdf_endGetAttachments(void);