43 lines
853 B
TeX
Raw Normal View History

2022-08-10 19:07:58 +01:00
// CHAPTER -1: Introduction
2022-05-20 15:48:24 +01:00
2022-08-10 19:07:58 +01:00
Use
---
2022-05-20 15:48:24 +01:00
2022-08-10 19:07:58 +01:00
For development server-side with node: cpdf.js (minified version cpdf.min.js)
2022-05-20 15:48:24 +01:00
Load with "const cpdf = require('cpdf.js')" if installed in npm, or "const cpdf
= require('./cpdf.js')" to load from current directory.
For development client-side with the browser : cpdf.browser.js
(Minified version for deployment : cpdf.browser.min.js)
Load with <script src="cpdf.browser.js"></script> or similar.
Concurrency
2022-08-10 19:07:58 +01:00
-----------
2022-05-20 15:48:24 +01:00
cpdf.js is synchronous and non-re-entrant.
Data types
2022-08-10 19:07:58 +01:00
----------
2022-05-20 15:48:24 +01:00
2022-08-10 19:07:58 +01:00
Arguments are numbers, strings, or arrays (of type UInt8Array for data). Page
ranges are represented by arrays of numbers.
2022-05-20 15:48:24 +01:00
Memory Management
2022-08-10 19:07:58 +01:00
-----------------
2022-05-20 15:48:24 +01:00
2022-08-10 19:07:58 +01:00
A PDF p must be explicitly deallocated with deletePdf(p).
2022-05-20 15:48:24 +01:00
Errors
2022-08-10 19:07:58 +01:00
------
2022-05-20 15:48:24 +01:00
Any function may raise an exception, containing a string describing the problem.