0

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.

loadComplete() {
   this.pdfViewer.PDFViewerApplication.pdfSidebar.close(); //close the left nav
}

Thanks.

aneeshere
  • 509
  • 5
  • 16

1 Answers1

0

Got the solution.

Instead of depending on the onDocumentLoad i tried the following and it worked.

<ng2-pdfjs-viewer
  ...
  pagemode="none"
></ng2-pdfjs-viewer>

Turned out to be quite straightforward in the end and it is mentioned in the document as well.

pagemode - State of sidebar. Available options are none, thumbs,bookmarks,attachments. E.g. pagemode=attachments.

From the documentation, i got the idea that if i use pagemode="none" the left side bar would not appear at all. pagemode="closed" would have made it instantly understandable :)

aneeshere
  • 509
  • 5
  • 16