# View pdf file from both vision and perspective

**URL:** <https://forum.inductiveautomation.com/t/view-pdf-file-from-both-vision-and-perspective/53921>\
**Category:** Ignition\
**Created:** [December 9, 2021, 3:30am UTC](https://forum.inductiveautomation.com/t/view-pdf-file-from-both-vision-and-perspective/53921 "2021-12-09T03:30:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 9, 2021, 3:30am UTC](https://forum.inductiveautomation.com/t/view-pdf-file-from-both-vision-and-perspective/53921/1 "2021-12-09T03:30:14Z")

</div>

Hi, I would like the operator to view some pdf files from both vision and perspective.

These files can either be saved on the gateway, or share drives (google drive, dropbox).

What’s the easiest way to realize this function?

My understanding that the vision file explorer and pdf viewer looks for the files at the local vision client station, and perspective app looks at gateway URL.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 9, 2021, 6:16am UTC](https://forum.inductiveautomation.com/t/view-pdf-file-from-both-vision-and-perspective/53921/2 "2021-12-09T06:16:00Z")

</div>

I just tried to upload pdf files to SQLServer, then download&display it on pdf viewer.  
I can manage to upload the pdf file.  
But when download and display in pdf viewer, it should following error:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/f/4fd18382ae363ca9c2703495f40babb385ffd6a3.png)  
The SQL Server data table structure is as followed:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/3/43054e1b9738fddfcd1db250d40465984ab3b0d7.png)  
I used the following script to upload the pdf to the database:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/70be7b8039a16335f99957e6899b98fabb0a5b8c.png)  
The following script is used to display the data on pdf viewer:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/5/0554b7dae7efe86687584232011e708b3400b546.png)  
I followed the video below. I found the only difference is the database, in the video mysql is used, here I use sqlserver.  
Could it be the data type causing the issue? I used varbinary(max).

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 9, 2021, 7:24am UTC](https://forum.inductiveautomation.com/t/view-pdf-file-from-both-vision-and-perspective/53921/3 "2021-12-09T07:24:58Z")

</div>

I think it should be of type ‘blob’

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 9, 2021, 10:22am UTC](https://forum.inductiveautomation.com/t/view-pdf-file-from-both-vision-and-perspective/53921/4 "2021-12-09T10:22:03Z")

</div>

Just sorted it out. The data type is fine with varbinary(max), it was the wrong table name used.

---

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [July 2, 2024, 7:13am UTC](https://forum.inductiveautomation.com/t/view-pdf-file-from-both-vision-and-perspective/53921/5 "2024-07-02T07:13:43Z")

</div>

I am facing the same error with mySQL where i have used datatype as blob, what could be the mistake?  
EDIT:  
Instead of uploading directly from db, i tried uploading from application and it worked properly.
