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:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I forgot the load() as well. what a shame 🔢
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.