# PDF Document Viewer

**URL:** <https://discuss.tryton.org/t/pdf-document-viewer/2743>\
**Category:** Developer\
**Created:** [May 20, 2020, 3:16pm UTC](https://discuss.tryton.org/t/pdf-document-viewer/2743 "2020-05-20T15:16:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prak](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/prak/32/321_2.png) [@prak](https://discuss.tryton.org/u/prak)\
**Post date:** [May 20, 2020, 3:16pm UTC](https://discuss.tryton.org/t/pdf-document-viewer/2743/1 "2020-05-20T15:16:03Z")

</div>

Is there any way to add a PDF viewer or any doc viewer to web interface. (Version 5.0) ?

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [May 20, 2020, 3:19pm UTC](https://discuss.tryton.org/t/pdf-document-viewer/2743/2 "2020-05-20T15:19:44Z")

</div>

Most browsers can display PDF by default, I do not see the point to add one in sao.

---

<div class="post-metadata">

**Author:** ![prak](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/prak/32/321_2.png) [@prak](https://discuss.tryton.org/u/prak)\
**Post date:** [May 20, 2020, 3:22pm UTC](https://discuss.tryton.org/t/pdf-document-viewer/2743/3 "2020-05-20T15:22:34Z")

</div>

I added a binary field which will get PDF reports from a different system. By default, Sao shows a button to download the reports. So a user will have to download the report to view it. If the report can be made visible there itself, then it will be of help.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [May 20, 2020, 3:28pm UTC](https://discuss.tryton.org/t/pdf-document-viewer/2743/4 "2020-05-20T15:28:07Z")

</div>

In any case the PDF will need to be downloaded to be seen. But if you set a proper file name (ending with `.pdf`), most browser will open it instead of asking for saving.

But if you really want, it should be possible to create your own widget for binary-pdf, that render the content with pdf.js.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [May 20, 2020, 3:59pm UTC](https://discuss.tryton.org/t/pdf-document-viewer/2743/5 "2020-05-20T15:59:33Z")

</div>

Indeed I think we could create an `Embed` widget based on the [`<embed/>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed) element. It will be quiet similar to the `Image` widget. It should have a download link as fallback.  
For the desktop client, the widget would just display an open button.
