cpdf-source/docsplits/splits/c01.tex

50 lines
1.7 KiB
TeX
Raw Normal View History

2021-06-18 15:19:43 +02:00
/* 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();
2024-03-22 19:56:54 +01:00
/* 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 next
* function. Default value: false. */
void cpdf_embedStd14(int);
/* Set the directory to load Standard 14 fonts for embedding. */
void cpdf_embedStd14Dir(char *);
2021-06-18 15:19:43 +02:00
/*
* 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;
2024-03-22 19:56:54 +01:00
/* 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);
2021-06-18 15:19:43 +02:00
/* 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);