File: c01.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 (49 lines) | stat: -rw-r--r-- 1,756 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
/* CHAPTER 0. Preliminaries */

/* The function cpdf_startup(argv) must be called before using the library. */
void cpdf_startup(char **);

/* Return the version of the cpdflib library as a string */
char *cpdf_version();

/*
 * Some operations have a fast mode. The default is 'slow' mode, which works
 * even on old-fashioned files. For more details, see section 1.13 of the
 * CPDF manual. These functions set the mode globally.
 */
void cpdf_setFast();
void cpdf_setSlow();

/* Calling this function with a true argument sets embedding for the Standard
 * 14 fonts.  You must also set the directory to load them from with the
 * cpdf_embedStd14Dir function. Default value: false. */
void cpdf_embedStd14(int);

/* Set the directory to load Standard 14 fonts for embedding. */
void cpdf_embedStd14Dir(char *);

/*
 * Errors. cpdf_lastError and cpdf_lastErrorString hold information about the
 * last error to have occurred. They should be consulted after each call. If
 * cpdf_lastError is non-zero, there was an error, and cpdf_lastErrorString
 * gives details. If cpdf_lastError is zero, there was no error on the most
 * recent cpdf call.
 */
extern int cpdf_lastError;
extern char *cpdf_lastErrorString;

/* In some contexts, for example, .NET or JNI, constants in DLLs can be
 * difficult or impossible to access. We provide functions in addition. */
int cpdf_fLastError(void);
char *cpdf_fLastErrorString(void);

/* cpdf_clearError clears the current error state. */
void cpdf_clearError(void);

/*
 * cpdf_onExit is a debug function which prints some information about
 * resource usage. This can be used to detect if PDFs or ranges are being
 * deallocated properly. Contrary to its name, it may be run at any time.
 */
void cpdf_onExit(void);