question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting blank view (pdfView.fromBytes(byte[])) when base64 is converted to byte array.

See original GitHub issue

@barteksc this is the code that I am facing this issue.

decodedString = Base64.decode(base64_string, Base64.DEFAULT); pdfView.fromBytes(decodedString) .defaultPage(pageNumber) .enableAnnotationRendering(true) .scrollHandle(new DefaultScrollHandle(this)) .spacing(10) // in dp .load();

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
neo-turakcommented, Feb 28, 2018

I forgot the load() as well. what a shame 🔢

2reactions
catphishcommented, Jul 10, 2017

I struggled with this same issue for a couple of hours today. In the end it turned out that I’d forgotten to call .load()

It’s not clear from your code whether you’re calling it or not, but thought I’d mention it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Byte to PDF doesn't work. Only appears blank - Stack Overflow
Try convert your byte array to base64 encoding like this: window.open("data:application/pdf;base64; " + System.Convert.
Read more >
[Solved] Convert a byte array to pdf in c# - CodeProject
You seem to be trying to write a byte arry from a database into a file: why is this giving you problems? If...
Read more >
Convert.FromBase64String(String) Method - Microsoft Learn
Converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array.
Read more >
Base64 Encoding - Go by Example
The encoder requires a []byte so we convert our string to that type. sEnc := b64.StdEncoding.EncodeToString([]byte(data)) fmt.Println(sEnc).
Read more >
How to convert Base64 to PDF
Convert Base64 to PDF online using a free decoding tool. ... Chrome with adobe pdf viewer is one example. Thanks. ... Although, I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found