PDF Viewer in VL Web

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

PDF Viewer in VL Web

Post by caseywhite »

I see that someone asked about showing PDFs in VL web. The response seemed to indicate that you can't download the PDF and show it.

In looking at this from the help it shows that you can show a PDF if you can provide a URL.
http://docs.lansa.com/14/EN/lansa016/PRIM_WEB.Page.htm

The issue is that these would be secure documents that will only display if the SRVROUTINE returns the PDF so I would have to have a special URL. But I am guessing it still won't work because the URL response would be a document which won't necessarily show in the web browser control on my page. I suspect it may just try to download it.

Just wondering if anyone has come up with anything since? Would a widget the implements some other PDF viewer for the web work?

Trying to determine options and which one might be best. The simplest option would seem to be the user clicks on the button to save and we simply let the browser download it. The browser will then do what it wants. But then the user doesn't get the nice experience of having the PDF simply framed in for them them to view with an option to save.

Thoughts?
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: PDF Viewer in VL Web

Post by MarkD »

The VLF-ONE shipped Upload/Download demo, in example 3, shows loading various files as a BLOBs and then sending them as a response.
The client side code ins in DF_T68H3O and the server module is in DF_T68DSO.
It's interesting that the example notes that this way of delivering a file and then imbedding it into your VL-Web page does not work in IE or Edge.
Is that the type of problem you are referring to?
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: PDF Viewer in VL Web

Post by caseywhite »

Thanks Mark. That is what I am looking for but the problem is that IE is not supported. Web site will be public so it won't be possible to tell users not to use IE. Most sites just seem to have you click on the PDF and it gets downloaded though but I do like the idea of being able to view the PDF inline. Just doing some research to see what the best options might be.
dhnaigles
Posts: 56
Joined: Wed Feb 03, 2016 1:34 am
Location: Marlborough, MA, USA

Re: PDF Viewer in VL Web

Post by dhnaigles »

Casey
I received an idea from Paul Odle regarding displaying PDFs in a PRIM_WEB control using google docs. This does not initially download the pdf to the device, but uses the URL to display the PDF and allow it to be manipulated.

#path_including_http_of_document := "http://www.mywebserver.com/documents/pdfdocument.pdf"
#web_page_control.source := ( ("https://docs.google.com/gview?embedded=true&url=" + #path_including_http_of_document) )
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: PDF Viewer in VL Web

Post by caseywhite »

Thanks David.
Post Reply