Closed JoaquimLey closed 2 years ago
Does it work with the puppeteer pdf function? if yes, please create a simple repo that replicates this issue, so I can debug the output.
It does, it simply uses the bytes returning the .page and running the same method from node-sign-pdf. It outputs that error (that's literally that) since the -report returns a Uint8Array
and not the Buffer.
@PejmanNik sorry for the delay wasn't able to get online this week. Was finally able to create a small example:
Run with
node app.js
@PejmanNik any updates?
I was on vacation and couldn't find the time to debug. Did the mentioned PR will resolve your issue?
Yes.
On Sun, 21 Nov 2021, 13:16 Pejman, @.***> wrote:
I was on vacation and couldn't find the time to debug. Did the mentioned PR will resolve your issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PejmanNik/puppeteer-report/issues/36#issuecomment-974815941, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABU2D7F23VT64TJQZ3YFXULUNDWJBANCNFSM5G7Z6TBA .
ok, I will close this issue, the PR needs one minor change and I can release the new version as soon as @miguelangelomendes fix it.
since -report is using
pdf-lib
the return value from the.page
and.pdf
isPromise<Uint8Array>
which in turn is giving us a lot of issues when combing with node-signpdf that we are using to sign the PDF.We're using puppeteer-report due to the limitations of puppeteer regarding running scripts on the footer/header templates (thank you for this lib btw) but now having trouble combining the two.
Any pointers on how we could use them or are you able to open a method/option to return the Buffer?
Current implementation
And running
plainAddPlaceholder
throws an exception:Original: https://github.com/vbuch/node-signpdf/blob/develop/src/helpers/plainAddPlaceholder/readRefTable.js#L48
Any pointers would be greatly appreciated and thank you in advance for your time.