|
| 1 | +.. image:: https://odoo-community.org/readme-banner-image |
| 2 | + :target: https://odoo-community.org/get-involved?utm_source=readme |
| 3 | + :alt: Odoo Community Association |
| 4 | + |
| 5 | +========================= |
| 6 | +DMS — LibreOffice Preview |
| 7 | +========================= |
| 8 | + |
| 9 | +.. |
| 10 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 11 | + !! This file is generated by oca-gen-addon-readme !! |
| 12 | + !! changes will be overwritten. !! |
| 13 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 14 | + !! source digest: sha256:81baba4c980b32e56a3e208ba841264571d907763fa987650db3d700e2592292 |
| 15 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 16 | +
|
| 17 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 18 | + :target: https://odoo-community.org/page/development-status |
| 19 | + :alt: Beta |
| 20 | +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png |
| 21 | + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html |
| 22 | + :alt: License: LGPL-3 |
| 23 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdms-lightgray.png?logo=github |
| 24 | + :target: https://github.com/OCA/dms/tree/19.0/dms_libreoffice_preview |
| 25 | + :alt: OCA/dms |
| 26 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 27 | + :target: https://translation.odoo-community.org/projects/dms-19-0/dms-19-0-dms_libreoffice_preview |
| 28 | + :alt: Translate me on Weblate |
| 29 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 30 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/dms&target_branch=19.0 |
| 31 | + :alt: Try me on Runboat |
| 32 | + |
| 33 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 34 | + |
| 35 | +Adds in-browser preview of office file formats (Word, Excel, PowerPoint, |
| 36 | +OpenDocument, RTF) to OCA DMS by converting them to PDF on the server |
| 37 | +with a headless LibreOffice subprocess. The converted PDF is cached as a |
| 38 | +child ``ir.attachment`` of the source ``dms.file`` and served via the |
| 39 | +existing side-pane preview registry (``dms.preview_handlers``), so the |
| 40 | +browser's native PDF viewer renders the result with no new UI code. |
| 41 | + |
| 42 | +Without this module, office files in DMS fall back to a download-only |
| 43 | +card. Install this module on any deployment where LibreOffice can be |
| 44 | +installed system-wide and you don't need full in-browser editing (use |
| 45 | +``dms_onlyoffice`` for that). |
| 46 | + |
| 47 | +**Table of contents** |
| 48 | + |
| 49 | +.. contents:: |
| 50 | + :local: |
| 51 | + |
| 52 | +Installation |
| 53 | +============ |
| 54 | + |
| 55 | +System dependencies |
| 56 | +------------------- |
| 57 | + |
| 58 | +LibreOffice must be installed on the Odoo server. On Debian / Ubuntu: |
| 59 | + |
| 60 | +:: |
| 61 | + |
| 62 | + apt-get install libreoffice fonts-noto fonts-liberation |
| 63 | + |
| 64 | +The ``fonts-noto`` and ``fonts-liberation`` packages are recommended |
| 65 | +even if your container already has a font set — headless LibreOffice |
| 66 | +falls back to ugly substitutes when common fonts are missing, which |
| 67 | +produces unreadable PDFs for typical office documents. |
| 68 | + |
| 69 | +Once LibreOffice is on the ``PATH``, install this module as usual. The |
| 70 | +preview is lazy: nothing converts until the first time a user opens an |
| 71 | +office file in the DMS side-pane. Subsequent opens of the same file |
| 72 | +(same ``write_date``) hit the ``ir.attachment`` cache. |
| 73 | + |
| 74 | +Usage |
| 75 | +===== |
| 76 | + |
| 77 | +No configuration required. With LibreOffice on the server and this |
| 78 | +module installed, opening any office file (``.doc{x}``, ``.odt``, |
| 79 | +``.xls{x}``, ``.ods``, ``.ppt{x}``, ``.odp``, ``.rtf``) from the DMS |
| 80 | +kanban or list view shows the rendered PDF in the side-pane preview. |
| 81 | + |
| 82 | +The first open takes 1–5 seconds (LibreOffice conversion); subsequent |
| 83 | +opens hit the cached attachment and feel instant. If the source file |
| 84 | +changes (new content, new name, etc.), the cache invalidates and the |
| 85 | +next open triggers a fresh conversion. |
| 86 | + |
| 87 | +If LibreOffice fails to convert a file (corrupt source, unusual format |
| 88 | +variation), the side-pane shows a brief error message. The original file |
| 89 | +is always downloadable via the side-pane toolbar's Download button |
| 90 | +regardless of preview success. |
| 91 | + |
| 92 | +Bug Tracker |
| 93 | +=========== |
| 94 | + |
| 95 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/dms/issues>`_. |
| 96 | +In case of trouble, please check there if your issue has already been reported. |
| 97 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 98 | +`feedback <https://github.com/OCA/dms/issues/new?body=module:%20dms_libreoffice_preview%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 99 | + |
| 100 | +Do not contact contributors directly about support or help with technical issues. |
| 101 | + |
| 102 | +Credits |
| 103 | +======= |
| 104 | + |
| 105 | +Authors |
| 106 | +------- |
| 107 | + |
| 108 | +* ledoent |
| 109 | + |
| 110 | +Contributors |
| 111 | +------------ |
| 112 | + |
| 113 | +- Don Kendall <dkendall@ledoweb.com> |
| 114 | + |
| 115 | +Maintainers |
| 116 | +----------- |
| 117 | + |
| 118 | +This module is maintained by the OCA. |
| 119 | + |
| 120 | +.. image:: https://odoo-community.org/logo.png |
| 121 | + :alt: Odoo Community Association |
| 122 | + :target: https://odoo-community.org |
| 123 | + |
| 124 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 125 | +mission is to support the collaborative development of Odoo features and |
| 126 | +promote its widespread use. |
| 127 | + |
| 128 | +.. |maintainer-dnplkndll| image:: https://github.com/dnplkndll.png?size=40px |
| 129 | + :target: https://github.com/dnplkndll |
| 130 | + :alt: dnplkndll |
| 131 | + |
| 132 | +Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: |
| 133 | + |
| 134 | +|maintainer-dnplkndll| |
| 135 | + |
| 136 | +This module is part of the `OCA/dms <https://github.com/OCA/dms/tree/19.0/dms_libreoffice_preview>`_ project on GitHub. |
| 137 | + |
| 138 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments