Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream must have data #33

Open
shuaixieca opened this issue Jul 15, 2020 · 1 comment
Open

stream must have data #33

shuaixieca opened this issue Jul 15, 2020 · 1 comment

Comments

@shuaixieca
Copy link

shuaixieca commented Jul 15, 2020

Hi, I got an error when implement in my local laptop, anyone could help me?

pdfform.pdf_js.js:formatted:2911 Uncaught Error: stream must have data
at error (pdfform.pdf_js.js:formatted:2911)
at assert (pdfform.pdf_js.js:formatted:2922)
at PDFDocument.init (pdfform.pdf_js.js:formatted:4979)
at new PDFDocument (pdfform.pdf_js.js:formatted:4973)
at Object.pdf_js.parse (pdfform.pdf_js.js:formatted:37295)
at Object.transform (pdfform.pdf_js.js:formatted:37671)
at pdfform-test.php:9

source code:

<?php ?>

<script src="js/pdfform.pdf_js.js"></script>
<script>
    var pdf_buf = "template2.pdf" // load PDF into an ArrayBuffer, for example via XHR (see demo)
    var fields = {
        'name': 'test',
        'checkbox': "True"
    };
    var out_buf = pdfform().transform(pdf_buf, fields);
    // Do something with the resulting PDF file in out_buf
</script>
@theryan722
Copy link

theryan722 commented Jul 20, 2020

Same issue for me with some PDF's, any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants