Closed anees-tricon closed 2 years ago
@anees-tricon I explicitly set pagemode to none can fix it in iframe. It seems iframe can't disable sidebar by default. Here is a code example.
ng2-pdfjs-viewer([pdfSrc]="encodeLink", [openFile]="false", [viewBookmark]="false", [download]="false", pagemode="none")
@raykin , this looks more like removing the sidebar all-together from what i understand. I would want to keep the sidebar, but closed by default.
@anees-tricon it doesn't remove sidebar. I tested it in app and it just close sidebar, I can still open sidebar with two view mode. It also add a green dot to the sidebar. Btw, I notice it was opened in iframe in default.
@raykin , i did not get what you meant in iframe
@anees-tricon nevermind. I mean the PDF viewer opened in iframe. I used it in hybrid app so it could be different from web browser.
@raykin , thanks for your suggestion. This definitely should help remove the flicker(i haven't tried it yet).
on my original question, for few pdfs its closed by default and open for other few. I was wondering if the tool is somehow deciding it based on the content or something like that. If that is the case, i believe it is for a reason and hence i would not want to change the behaviour. And if there is a reason i can convince my product owner also of the same :)
Any idea?
@anees-tricon well, I have no suggestions on your troubles. I notice PDF viewer state sometimes can be remembered in my app. You can search more issues in PDF.js repo. Someone may have answers.
The state remembering is another thing i had doubts on. As you say it is sometimes. I really want to know more about it. That's for another thread though.
Closing this as pagemode="none"
did the trick for me.
The left sidebar seems to be closed by default for few pdfs and opened for few others? Is the tool taking some kind of decision on how it should be?
I had tried to close the sidebar always using the onDocumentLoad event, but the problem is, the side bar appears for a split second before being closed programmatically. Causing a flicker.