Does pdfium / chrome do any compression on base64 pdfs before rendering?

175 views
Skip to first unread message

mar...@tabnex.com

unread,
Jun 16, 2018, 10:55:07 PM6/16/18
to pdfium
Hey sorry if this is not the right place to ask but I'm trying to render a pdf via iframe using data encoding. It errors out with the error message below

And I've been very confused as I've compared the base64text before the server returns a response and what chrome shows in the error message, and they are different - I've also verified it's not base64url :/ 

I've also I written a simple program to convert that text to binary pdf and it produced the expected pdf

So I'm wondering since the chrome base64 string is valid maybe chrome does some compression beforehand? I don't know what else would result in the difference

Error:

The webpage at data:application/pdf;base64,{Base64text} might be temporarily down or it may have moved permanently to a new web address.



Any help at all would be much appreciated, again I'm sorry if this is the wrong place to ask. Please let me know where best to ask these questions

Thanks,

Marcel

mar...@tabnex.com

unread,
Jun 16, 2018, 11:17:09 PM6/16/18
to pdfium
Hey this seems to be a silly mistake on my end, the pdf seems to have been encoded into base64 twice :/
Reply all
Reply to author
Forward
0 new messages