How To Display PDF within a form in a VP

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

How To Display PDF within a form in a VP

Post by rbross »

Hello,

I have tried several things but PDF just displays as popup and not part of the VP.
My view consists of a query showing Invoice Header records in the top part of the VP. When an invoice header records is clicked on I need to display the PDF for that invoice in the area below the invoice header query. The view of the PDF should also be able to be resized. Has anyone done this or is this something that would requires a Java Plug-in?
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
chris29
Posts: 173
Joined: Sat Feb 06, 2010 1:45 am
Location: Australia

Re: How To Display PDF within a form in a VP

Post by chris29 »

Try exporting the document to a directory and the place html on your form.

<iframe id="pdf" src="<<SystemSettings.InstallPath>>/temp/<<BO.FileName>>" height="800px" width="750px"></iframe>

I have only done this in chrome IE doesn't work very well as it doesn't have its own pdf viewer, not sure about edge. Remove the file once the user has finished.
Version 8.5 - Windows using MySql 8 and SQL Server - 64bit
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: How To Display PDF within a form in a VP

Post by rbross »

Using Chrome for the browser.
All I get is the form displayed below the query but no PDF display just the Save and Close buttons.
For testing purposed I hard coded the path to the PDF. This is the HTML I added:
<iframe id="pdf" src="C:\00000\1543078\RogerPF4.pdf" height="800px" width="750px"></iframe>
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: How To Display PDF within a form in a VP

Post by rbross »

I found this site online that looks promising for displaying a PDF zoom and other features. need to try it.
https://codepen.io/alxfyv/pen/WxeLve/
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
chris29
Posts: 173
Joined: Sat Feb 06, 2010 1:45 am
Location: Australia

Re: How To Display PDF within a form in a VP

Post by chris29 »

<iframe id="pdf" src="C:\00000\1543078\RogerPF4.pdf" height="800px" width="750px"></iframe>
C:\ should be something like yourdomain.com/YourBusinessSpace

the directory should be under Tomcat/YourBusinessSpace
Version 8.5 - Windows using MySql 8 and SQL Server - 64bit
Post Reply