The pdf-unite call and concatenates a list of PDF file using pdfunite.
To concatenate PDF files, you need to install Poppler (pdfunite) on your server:
sudo apt install poppler-utils
To use this call, the account must have the pdf flag set to true:
Using Backend.js, PDF files can be concatenated as follows:
const backend = new Backend('https://viereck.ch/backend');
const account = backend.account('your-account-id', '44705748... your-account-key');
const sources = [
{'#b': '7b8cf18d...'},
...
];
account.pdfUnite(sources, onDone, onError);
function onDone(token, request) {
...
}
function onError(errorCode, request) {
...
}
All PDF files must be uploaded beforehand, if necessary.
POST /backend/pdf-unite
Account: ACCOUNT ID
Timestamp: TIMESTAMP
Signature: SIGNATURE
200 with the object token of the generated PDF
204 if no source files are specified, and no PDF file is created
400 if a source file is missing
401 if the account ID or signature is missing or invalid
403 if the account is not allowed to use PDF concatenation