Localhost merge

it is possible to use the api for testing during development on localhost

Access denied. Please make sure you use the correct key.

image

Hey there,

Yes you can test the merge API from localhost.

Please make sure you are passing the correct Rest API license key. Note that this is a different key than your normal PDF.js key. It can be acquired in the dashboard.

Passing no license key to the API should work too, but note that your requests will be heavily rate-limited without a license key.

I was unable to generate the license and development key, ask for credit card details

const blob = new Blob([fileData], {type: 'application/pdf'});
    const data = new FormData();
    data.append('xfdf', xfdf);
    data.append('file', blob);
    data.append('license', '');

    // Process the file
    const response = await fetch('https://api.pdfjs.express/xfdf/merge', {
      method: 'post',
      body: data

    }).then(resp => resp.json());

https://d76jl3qoeno6t.cloudfront.net/a506335c-7dae-4c42-988c-2fafad0e1c5d.pdf

Hi,

The REST API will charge you based on usage, which is why it asks for a credit card. View pricing details here.

If you do not want to enter credit card details for testing, you may proceed to use the REST api and just don’t pass a license at all.

Thanks,
Logan