Hi Scott,
Using PWB CEF 3.0.5.0 with all the print buttons and options in the ini file set to False: When viewing a PDF file with the built-in PDF viewer the Print button is still present. We would very much like to be able to hide/disable this print button and the download button as we do with the same functionality in the main PWB menus and buttons.
The CEF developer forums indicate they can be removed when compiling CEF but is there anything you can do to make them sensitive to switches in the PWB ini file?
With thanks,
Tim
PWB CEF PDF viewer print and download buttons
Re: PWB CEF PDF viewer print and download buttons
The Chrome PDF viewer is part of Chrome via the and is independent of PWB.
Unfortunately we do not compile CEF from source, PWB uses the binary distribution of CEF.
It is possible to provide your own PWB CEF PDF viewer with the following undocumented INI settings.
[PDFViewer]
EnablePDFViewer=false
PDFViewerPath=
PDFViewerArguments=
ShowMaximized=false
ShowModal=false
--Scott
Unfortunately we do not compile CEF from source, PWB uses the binary distribution of CEF.
It is possible to provide your own PWB CEF PDF viewer with the following undocumented INI settings.
[PDFViewer]
EnablePDFViewer=false
PDFViewerPath=
PDFViewerArguments=
ShowMaximized=false
ShowModal=false
--Scott
Re: PWB CEF PDF viewer print and download buttons
Thanks for the speedy response Scott,
I'll have a look at specifying SumatraPDF as the PDFViewer with a sumatrapdfrestrict.ini set to deny print and save for this particular usage.
Presumably you usage of CEF means that one could, in theory, compile one's own version of CEF and run PWB with that just by substituting the binaries for those in the PWB distribution or indeed, update the Chromium version independently of PWB by taking the CEF binary distribution directly and doing the same substitution?
Best regards,
Tim
I'll have a look at specifying SumatraPDF as the PDFViewer with a sumatrapdfrestrict.ini set to deny print and save for this particular usage.
Presumably you usage of CEF means that one could, in theory, compile one's own version of CEF and run PWB with that just by substituting the binaries for those in the PWB distribution or indeed, update the Chromium version independently of PWB by taking the CEF binary distribution directly and doing the same substitution?
Best regards,
Tim
Re: PWB CEF PDF viewer print and download buttons
Hi Scott,
[PDFViewer]
EnablePDFViewer=true
PDFViewerPath=C:\SumatraPDF\SumatraPDF.exe
PDFViewerArguments=
ShowMaximized=false
ShowModal=false
Opens SumatraPDF empty, what do I need to put as the PDFViewerArguments to pass it the location+file name (presumably in the temp/cache directory) of the PDF file?
Thanks,
Tim
[PDFViewer]
EnablePDFViewer=true
PDFViewerPath=C:\SumatraPDF\SumatraPDF.exe
PDFViewerArguments=
ShowMaximized=false
ShowModal=false
Opens SumatraPDF empty, what do I need to put as the PDFViewerArguments to pass it the location+file name (presumably in the temp/cache directory) of the PDF file?
Thanks,
Tim
Re: PWB CEF PDF viewer print and download buttons
I think I found the answer myself
[PDFViewer]PDFViewerArguments=%1
seems to work (unless it's a happy accident and not going to work going forward)
Tim
[PDFViewer]PDFViewerArguments=%1
seems to work (unless it's a happy accident and not going to work going forward)
Tim
Re: PWB CEF PDF viewer print and download buttons
That should work. Adding the arguments allows PWB to pass the URL to the PDF viewer.
--Scott
--Scott
Re: PWB CEF PDF viewer print and download buttons
I know this feature was undocumented but has it been dropped or stopped working?
The department where we were using this have noticed that (presumably since some intervening PWB upgrade) PDF's are loading in the internal PDF viewer rather than the specified external viewer.
I have just tested with the new 3.05.6 release and got these results:
[PDFViewer]
EnablePDFViewer=True
PDFViewerPath=C:\SumatraPDF\SumatraPDF.exe
The built-in PDF viewer runs in a Second window with no PWB bars etc., stays on top
[PDFViewer]
EnablePDFViewer=False
PDFViewerPath=C:\SumatraPDF\SumatraPDF.exe
The built-in PDF viewer runs in the First window
In neither case does SumatraPDF run. The PDFViewerPath string is definitely correct: copy & paste to a command line runs it with no problem.
Regards,
Tim
The department where we were using this have noticed that (presumably since some intervening PWB upgrade) PDF's are loading in the internal PDF viewer rather than the specified external viewer.
I have just tested with the new 3.05.6 release and got these results:
[PDFViewer]
EnablePDFViewer=True
PDFViewerPath=C:\SumatraPDF\SumatraPDF.exe
The built-in PDF viewer runs in a Second window with no PWB bars etc., stays on top
[PDFViewer]
EnablePDFViewer=False
PDFViewerPath=C:\SumatraPDF\SumatraPDF.exe
The built-in PDF viewer runs in the First window
In neither case does SumatraPDF run. The PDFViewerPath string is definitely correct: copy & paste to a command line runs it with no problem.
Regards,
Tim
Re: PWB CEF PDF viewer print and download buttons
The setting is still available. Try adding the following to your INI file.
[PDFViewer]
UseInternalViewer=False
Please note, if the web site is not presenting the PDF file with a "PDF" file extension the external application will not open it.
--Scott
[PDFViewer]
UseInternalViewer=False
Please note, if the web site is not presenting the PDF file with a "PDF" file extension the external application will not open it.
--Scott
Re: PWB CEF PDF viewer print and download buttons
Perfect, just like magic!
Oddly, I had tried "pwb --disable-pdf-extension" in combination with the .ini declarations, which did what it said but still didn't run the external viewer program, just opened an empty second window. It really is good to have a programmer who talks directly to users.
Thanks again,
Tim
Oddly, I had tried "pwb --disable-pdf-extension" in combination with the .ini declarations, which did what it said but still didn't run the external viewer program, just opened an empty second window. It really is good to have a programmer who talks directly to users.
Thanks again,
Tim
Re: PWB CEF PDF viewer print and download buttons
You welcome.
We use PWB in our own facilities for general public use so if there is an issue we are usually on top of it.
--Scott
We use PWB in our own facilities for general public use so if there is an issue we are usually on top of it.
--Scott
Re: PWB CEF PDF viewer print and download buttons
Using PWB CEF 3.0.5.0 with all the print buttons and options in the ini file set to False: When viewing a PDF file with the built-in PDF viewer the Print button is still present. We would very much like to be able to hide/disable this print button and the download button as we do with the same functionality in the main PWB menus and buttons.
John
Re: PWB CEF PDF viewer print and download buttons
It is not possible to disable the print button in the default Chrome PDF viewer.
You can use the PWB Execute filter to open the PDF file in an application of you choice.
For example the Sumatra PDF viewer:
https://www.sumatrapdfreader.org/downlo ... iewer.html
PWB Execute filter:
https://www.teamsoftwaresolutions.com/f ... 256&p=8059
--Scott
You can use the PWB Execute filter to open the PDF file in an application of you choice.
For example the Sumatra PDF viewer:
https://www.sumatrapdfreader.org/downlo ... iewer.html
PWB Execute filter:
https://www.teamsoftwaresolutions.com/f ... 256&p=8059
--Scott