TaTo30 / vue-pdf

PDF component for Vue 3
https://tato30.github.io/vue-pdf/
MIT License
419 stars 62 forks source link

Invalid Stream #10

Closed BossHogg97 closed 1 year ago

BossHogg97 commented 1 year ago

Hi, I'm working with Vue3. The pdf data comes from the server and before passing it to your component I convert it as a UInt8Array but I have this warning that it doesn't allow me to view it. Any suggestions?

Warning: Setting up fake worker.
util.js:425 Warning: Indexing all PDF objects
util.js:425 Warning: Invalid stream: "FormatError: Bad FCHECK in flate stream: 120, 239"
util.js:425 Warning: Invalid stream: "FormatError: Bad FCHECK in flate stream: 120, 239"
util.js:425 Warning: Invalid stream: "FormatError: Bad FCHECK in flate stream: 120, 239"

I also post the instruction for data encoding:

var buf = Buffer.from(prop.data, 'utf-8')
const { pdf } = usePDF({ data: buf }

Thanks in advance

TaTo30 commented 1 year ago

According this Issue:

BossHogg97 commented 1 year ago

Thanks for the help