Hi, thanks for your great work with this library.
I have a pdf with can be filled without problems on the official demo page.
If I load it via fetch, and convert it to an Array Buffer via resonse.arrayBuffer() I get the following exception:
Uncaught (in promise) Error: Invalid xref stream index: index says 1 objects, but space for 12
I created a csb to demonstrate my Problem:
https://codesandbox.io/s/youthful-swanson-jm9pm
import React, { useEffect } from "react";
import ReactDOM from "react-dom";
const pdf = require("./pdfform.minipdf.dist");
function App() {
useEffect(() => {
// both form.pdf and beratungsprotokoll.pdf are working
// with the official demo at:
// https://phihag.github.io/pdfform.js/docs/demo.html
// loaded via fetch() however both produce
// an xref error:
// Invalid xref stream index: index says 1 objects, but space for 12
fetch("https://jm9pm.csb.app/beratungsprotokoll.pdf")
.then(res => res.arrayBuffer())
.then(pdfArrayBuffer => {
console.log(pdfArrayBuffer);
console.log(pdf());
console.log(pdf().list_fields(pdfArrayBuffer));
});
}, []);
return <div>see console for status</div>;
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
Hi, thanks for your great work with this library.
I have a pdf with can be filled without problems on the official demo page.
If I load it via
fetch, and convert it to an Array Buffer viaresonse.arrayBuffer()I get the following exception:I created a csb to demonstrate my Problem:
https://codesandbox.io/s/youthful-swanson-jm9pm