# I need to display some PDF docs

**URL:** <https://forum.inductiveautomation.com/t/i-need-to-display-some-pdf-docs/32781>\
**Category:** Ignition\
**Created:** [March 3, 2020, 7:32pm UTC](https://forum.inductiveautomation.com/t/i-need-to-display-some-pdf-docs/32781 "2020-03-03T19:32:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [March 3, 2020, 7:32pm UTC](https://forum.inductiveautomation.com/t/i-need-to-display-some-pdf-docs/32781/1 "2020-03-03T19:32:34Z")

</div>

I would like to have something like this, but if anyone has any better Ideas I am open to all.

I would like to have a SQL database table that just holds the location(FilePath) and name of all my PDF files.  
(I can create this myself)

Then I want to give the user the ability to display/sort this table and click on the FilePath/Name of the document they need to view and that file will open in a window?

Help?

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [March 3, 2020, 8:22pm UTC](https://forum.inductiveautomation.com/t/i-need-to-display-some-pdf-docs/32781/2 "2020-03-03T20:22:39Z")

</div>

Bind a tables data property to your SQL query

Add custom property “path” to a table component. Bind this path property to your table’s selected row file path

```auto
try({Root Container.Table.data}[{Root Container.Table.selectedRow}, "FilePath"], '')

```

On your table component on the mouseClicked event script

```auto
if event.clickCount == 2:
	system.nav.openWindow('Preview Popup', {'FilePath' : event.source.path})
	system.nav.centerWindow('Preview Popup')

```

On your viewing window create custom property “FilePath” in the root container and bind the PDF viewer component’s File Path property to it.

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [March 4, 2020, 2:29am UTC](https://forum.inductiveautomation.com/t/i-need-to-display-some-pdf-docs/32781/3 "2020-03-04T02:29:53Z")

</div>

Thank you so much, I will work on this over the weekend and keep you posted.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [March 4, 2020, 8:24am UTC](https://forum.inductiveautomation.com/t/i-need-to-display-some-pdf-docs/32781/4 "2020-03-04T08:24:05Z")

</div>

Rather than just storing the filepath in the DB, I would go a step further and load the PDF into the DB itself.

As long as they are not colossal files.

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [March 4, 2020, 10:37pm UTC](https://forum.inductiveautomation.com/t/i-need-to-display-some-pdf-docs/32781/5 "2020-03-04T22:37:25Z")

</div>

Thanks I already do this but I don’t want to store the file in my SQL Database.

This new way all of our doc’s will be on a separate server just for documents. And broke down into location/site folders.
