Website PDF Viewer
Adds a PDF Viewer block to the website builder: visitors read a PDF inside the page, one page at a time, and you decide per document whether it is public or for signed-in users only.
| Odoo | 17.0, 18.0, 19.0, 20.0 |
| Editions | Community, Enterprise |
| Works with | Website |
| Licence | OPL-1, 14 EUR |
| Tests | 14 automated, run on every version |
| Module | website_ |
The situation
A catalogue, a price list or a data sheet usually ends up as a link on the page. The visitor leaves for the browser viewer, which looks different on every phone, and anyone who gets the attachment URL can pass it on. Odoo's own File upload block does not give you a reading view or an access rule.
This module adds a PDF Viewer block and a PDF Documents list. The block shows the file page by page with a toolbar. The file is sent by a controller that checks the document's access rule first, so a Logged-in Visitors Only document answers 403 to a visitor who is not signed in.
What it adds
Getting started
Open Apps, clear the Apps filter, search for Website PDF Viewer and click Activate. It needs Website. The viewer uses the pdf.js files that come with Odoo; nothing is loaded from another site.
Apps › website_pdf_page_viewer › Activate
Open a page with Edit, drop PDF Viewer from the Content group, select it and choose or upload a PDF in the options panel. Set Height, Page fit and the three button switches, then Save.
Website › Edit › Blocks › Content › PDF Viewer
Visitors open the page and read. Add documents under PDF Documents; tick Logged-in Visitors Only for the ones that are not for everyone.
Fine print
Log
Do you need the viewer to show a document only to one customer group?
Tell us the rule you need and we will tell you if it fits.
Email odoo.expert.111@gmail.com
Also by Awins
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module