Closed LeoMouyna closed 1 year ago
Tested with:
var dd = {
content: [
'Hello world!'
]
}
And pdfinfo show correct output:
pdfinfo document.pdf
Creator: pdfmake
Producer: pdfmake
CreationDate: Sun Apr 30 14:34:20 2023
Tagged: no
Form: none
Pages: 1
Encrypted: no
Page size: 595.28 x 841.89 pts (A4) (rotated 0 degrees)
File size: 6460 bytes
Optimized: no
PDF version: 1.3
Attach runnable example on playground for reproduce issue.
Thank you for this wonderful library ! :pray:
I'm trying to use it (v0.2) to generate pdf server side.
I took a look at the playground
server.js
code and used a very similar code to generate base64 encoded pdf url. It display well in all browser when pasting it and I can download a well formatted pdf from it.Then I would like to return a file stream without writing a file in my file system. I end up with this kind of code:
But then when I download it, I can't see any content, only blank pages. When I analyze it via
pdfinfo
I got and error:Syntax Error (318757): Illegal character '>'
I don't think it's related to
generateContent
because I even tested with "Hello world!" as content and got a blank page with a similar error.Do you have any clue why a base64 encoded works well and the other proposal doesn't ?