@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();
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.
@catphish .load() call is shown in README and in sample, as I see @BipinAle included it in his code
@catphish but thanks for help of course
@barteksc The reason that I forgot to call this method was because of the way the examples are laid out in the README. I had assumed I only needed one of the lines from the or options in the usage examples, and didn't realise I had to combine it with the .load() call. I thought this call was only needed for fromAsset calls. I'm sure this is completely my mistake, as no other users have reported it.
The reason I wondered if the reporter of this ticket has made the same mistake is that their code contains no line breaks, and there is a comment // in dp .load() half way through it. It's probably not the issue but it seemed worth mentioning, as the symptoms were identical to mine.
Thanks for the library by the way, it's working very well for me now I have resolved my stupidity :slightly_smiling_face:
I forgot the load() as well. what a shame 🔢
Had a similar behaviour and found out the cause of this was the fact that I was changing the visibility of a nearby view to GONE (after pdfView#load method was called), which was causing the pdfView container to resize.
I had the same issue - just needed to
pdfView.fromBytes(content).load();
If the Readme was updated it would probably help a lot of people
Most helpful comment
I forgot the load() as well. what a shame 🔢