Hide Side Bar in PDF

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Hide Side Bar in PDF

Postby Dhvaj17 » Fri Aug 27, 2021 12:08 am

Hi,

Is there any command line arguement to hide sidebar in PDF?

This was not coming in cefsharp v86 client, but when i tested this on cefsharp v92 client, it started appearing.

I have attached pdf preview for v92 client & one from Edge browser which is same as v86 client behavior.

Please note in standalone chrome browser (92.0.4515.159), we do see the sidebar but not in edge chromium browser(92.0.902.78 ).

Sample PDF to test :
https://www.w3.org/WAI/ER/tests/xhtml/t ... /dummy.pdf

There must be some setting to hide this, but i am not able find this.
Attachments
PDF_Preview_EdgeBrowser.JPG
PDF Preview Edge Browser -
PDF_Preview_EdgeBrowser.JPG (41.25 KiB) Viewed 3009 times
V92_PDF_Preview.JPG
Pdf preview in V92 Client
V92_PDF_Preview.JPG (45.56 KiB) Viewed 3009 times
Dhvaj17
Techie
 
Posts: 36
Joined: Fri Oct 16, 2020 4:51 am

Re: Hide Side Bar in PDF

Postby amaitland » Fri Aug 27, 2021 2:48 am

Have you searched for ways to disable the sidebar in Chrome? Find out if chrome supports disabling the sidebar then see if the same works in CEF.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Hide Side Bar in PDF

Postby Phylanx » Mon Aug 30, 2021 12:40 am

Without looking on the code I have noticed a some code place that might be interesting:

\chromium\src\chrome\browser\resources\pdf\elements\viewer-pdf-toolbar.html, cr-icon-button id="print"

This is the representation of the PDF Viewer in HTML and the cr-icon-button="print" is the print button on the upper right.
Maybe the sidebar is in there too and you can comment it out or find a switch that influences it?
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am

Re: Hide Side Bar in PDF

Postby Dhvaj17 » Wed Sep 01, 2021 12:33 am

One update:

It seems to be an issue from chromium side to hide navigationpane (i.e. side bar).

ex :
https://www.w3.org/WAI/ER/tests/xhtml/t ... navpanes=0

Adding #values in url like #Navpanes=0&toolbar=0, hides both toolbar and sidebar, specifying one of them does not seems to be working and can see a open bugs on chromium side.
Dhvaj17
Techie
 
Posts: 36
Joined: Fri Oct 16, 2020 4:51 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 33 guests