mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-02-16 11:50:54 +01:00
43 lines
853 B
TeX
43 lines
853 B
TeX
// CHAPTER -1: Introduction
|
|
|
|
Use
|
|
---
|
|
|
|
For development server-side with node: cpdf.js (minified version cpdf.min.js)
|
|
|
|
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
|
|
-----------
|
|
|
|
cpdf.js is synchronous and non-re-entrant.
|
|
|
|
|
|
Data types
|
|
----------
|
|
|
|
Arguments are numbers, strings, or arrays (of type UInt8Array for data). Page
|
|
ranges are represented by arrays of numbers.
|
|
|
|
|
|
Memory Management
|
|
-----------------
|
|
|
|
A PDF p must be explicitly deallocated with deletePdf(p).
|
|
|
|
|
|
Errors
|
|
------
|
|
|
|
Any function may raise an exception, containing a string describing the problem.
|
|
|
|
|