You are viewing limited content. For full access, please sign in.

Question

Question

weblink not displaying pdf correctly

asked on January 4, 2016 Show version history

Hi,

I am trying to display a pdf document using weblink, on an iframe but it doesn't display it correctly. If document is an image file, it shows it correctly but in case of a pdf document webaccess downloads it immediately whereas weblink displays only text portion of it. 

 Any help would be greatly appreciated.

Thanks

 

0 0

Answer

SELECTED ANSWER
replied on January 5, 2016

It is not possible to convert electronic document to pages from workflow as workflow cannot communicate with LF Client.

https://answers.laserfiche.com/questions/81145/ClientAutomationClientManagerGetAllClientWindows-does-not-find-main-window-of-already-opened-client

2 0

Replies

replied on January 6, 2016

Hi Junaid,

 

To verify, you are displaying a PDF from Weblink into an iFrame and it's giving you the File Download message instead of just displaying it?

 

This is possible and I confirmed it with the following HTML:

 

<html>
<head>
<title> Test </title>
</head>

<body>
<div>
<iframe id="fred" style="border:1px solid #666CCC" title="PDF in an i-Frame" src="https://lf.rochestermn.gov/Documents/0/doc/3420/Electronic.aspx" 

frameborder="1" scrolling="auto" height="1100" width="850" ></iframe>
</div>
</body>
</html>

 

Be sure to verify the mime-type of the document. If it is "application/octet" it will not be executable from the web browser due to enhancements in security in WebLink 9.

 

If it is "application/pdf" then it will tell the browser it's a pdf and the browser will check the local settings to determine if it should be downloaded or opened. Firefox and IE have different settings for this so be sure to verify each browser and the following instructions. https://helpx.adobe.com/acrobat/using/display-pdf-in-browser.html

 

The last spot to check would be any cross-site scripting (XSS) issues.

 

Regards,

Carl

1 0
replied on January 7, 2016

I am talking about webaccess. this is what i am seeing when i embed webaccess in an iframe and try to open pdf file. if i select view electronic file from options i can easily see pdf in new window but why not in webaccess?

0 0
replied on January 7, 2016

Have you tried using the link going direct to the electronic file?

 

https://www.laserfiche.com/support/webhelp/webaccess/9.1/en-us/WA/WebAccess.htm#electronicURLs.htm%3FTocPath%3DURLs|_____2

 

 

The DocView url you're using above will take you to the generated images or pages of a Laserfiche entry. Not the actual pdf.

1 0
replied on January 8, 2016

Thanks. This is exactly what i was looking for. One thing i would like to mention here is that links structure mentioned above didn't work for me.

 http://servername/laserfiche/ElectronicFile.aspx?db=repositoryname&id=id

Instead i had to use something like this 

http://servername/laserfiche/edoc/repositoryname/id/name.pdf

Also, if you send above mentioned url from workflow it doesnt work as /%(id) in workflow token are considered part of url, hence you have to use //%(id) to make it work.

 

 

0 0
replied on January 8, 2016

Hi Junaid,

We're working on being able to natively display PDFs directly in the Web Access document viewer and plan to include it in the upcoming Laserfiche 10 service pack 1 release, currently targeted for March. I'm showing it in the Coming Attractions course at Empower 2016 if you're attending. 

1 0
replied on July 13, 2017

Super helpful thanks! The generated URL pattern was not displaying PDF files in the browser. Seems all the support articles on Weblink URLs point to using the generation activity in workflow now. It seems like years ago there was a more detailed description of how to construct these URLs

0 0
replied on April 3, 2018

Justin,

Is this now built into Weblink?

0 0
replied on January 5, 2016

Does the PDF have any pages associated with it?  I found that in order to correctly display PDFs in WebLink I had to "generate pages" for each PDF in client before they would display in WebLink.

0 0
replied on January 5, 2016

Is there a way to generate pages for specific electronic document from workflow. I am looking into sdk and i have found something but not sure it will work.  

 

sdk generate pages.png
0 0
replied on January 5, 2016

I have not found a way in workflow but have been able to do it in quick fields.  I am guessing that you are talking about a number of documents and it would not be timely to do it manually in client?

0 0
replied on January 5, 2016

Yes. Converting electronic document Manually to pages is not an option since files are created dynamically and could be in large numbers. 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.