Is there a way to load a PDF with Weblink for a Laserfiche document with no PDF associated with it? The example is if the user clicks on a link a for Weblink and there is no PDF and only a TIFF can it convert the TIFF to a PDF in the browser?
Question
Question
Answer
Hi Cristobal,
It turns out there is actually a feature in WebLink to do this --- it's been around so long, seems several of us forgot about it!
If you add &openpdf=true to the end of the link, it will open the document as PDF.
Example:
http://webdemo.laserfiche.com/weblink/DocView.aspx?id=524108&openpdf=true
Sorry for the earlier incorrect information! Hope this helps.
Replies
I'm not quite sure what you're asking, but you can print any TIFF to PDF:
If you are using WebLink 9, this will open a PDF version of the document in a new tab. If you are using WebLink 8, this will download a PDF of the document.
Is there anyway to cause a force print so that it opens the file as a PDF. So instead of clicking the print function on the page could the page automatically run the command when they go to the page, or just have the document viewer with no other information such as metadata or log out buttons appear on the page. This is for public use and the public should not be able to see any of the additional data nor be able to browse the repository. The customer would only like them to view the document as a PDF. If this is not possible I know we can alter the document viewer file to just display the document using css or altering the .aspx file. Though the customer would prefer to just have the document open as a PDF.
Are there other reasons aside from not wanting to show metadata etc. that the customer wants to view the document as a PDF? The customizations for that functionality are very minor:
As mentioned here, you add the following to DocView.aspx at the bottom (make a backup first!):
<script type="text/javascript"> $(document).ready(function(){ document.getElementById("FullScreenButton").click()}); </script>
You can also comment out (or remove) the "normal screen" link from the same file:
<a class="PageToolbarLink" id="NormalScreenLink" href="javascript:void(0)" runat="server"> <div class="ToolbarIconWrapper"> <div class="DocumentRightPanelToolbarIcon NormalScreenIcon" id="NormalScreenButton" runat="server" title="" /> </div> </a>
Another option is to hid that in the CSS file using the id NormalScreenLink.
Once you've made the changes, just save the file and refresh the page in WebLink, and all end users will only see the fullscreen docviewer (no metadata, no logout button, etc.)
I attempted to replace the FullScreenButton id with PDFDialog_PDFDownloadLink though it only brought up the dialog box for the page range. I then attempted to add another line to do a click for the page by though it had stated that the page was out of range. Please confirm if it would be possible to only load the PDF or not by puppeteering the button clicking on the page. If it is not I will go with the alternative of using CSS to hide all the metadata panes and other panes for the document view page.
This is not a customization we've ever attempted (because there hasn't been any requests for it before now), so I can't confirm either way. Is there something that's wrong with the fullscreen mode idea? I'm still unclear why the customer wants to implement hiding metadata etc. by always automatically downloading a PDF, even when there is no PDF associated with the document.
The customer was using a different system before that would convert the TIFF into a PDF when it was loaded in the browser. They wanted to mock this with Weblink so that the public was not thrown off by the different interface. Since this has not been requested or tested I will suggest what you recommended to them and block out the other items such as metadata through CSS. Thank you for the help!
Hi Cristobal,
It turns out there is actually a feature in WebLink to do this --- it's been around so long, seems several of us forgot about it!
If you add &openpdf=true to the end of the link, it will open the document as PDF.
Example:
http://webdemo.laserfiche.com/weblink/DocView.aspx?id=524108&openpdf=true
Sorry for the earlier incorrect information! Hope this helps.
Hi,
Is it possible to embed a certain page range to the weblink URL?