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

Question

Question

Can you set Weblink to open PDFs by default rather than Tiffs?

asked on August 26, 2021

I'd like to know if it's possible to set the default view for documents in Weblink to be PDF rather than tiff images.

 

Pages are generated for these documents for OCRing, but i'd prefer the unedited PDF to be the one that displays for users in Weblink.

1 0

Replies

replied on November 23, 2022

Hi Frank, 

I'm curious to know if you were able to accomplish this? We have a client that is on version 9 of weblink still because of this issue with weblink 10 and 11. 

The customer has PDF files with TIFF images, so when users open the file using Weblink 9, it opens the PDF and they can click the hyperlinks within. 

In Weblink version 10 and 11, if a TIFF exists, it displays the tiff. The hyperlinks are not available, nor are the bookmarks and email 'mailto' links. 

Laserfiche has mentioned that this is a feature request that has not been released yet. We have brought this to their attention almost a year ago without any update. I would think that a lot of public facing organizations are having this issue with Agendas and Minutes specifically. 

We had a look into the viewer to determine what's different when opening a PDF without a tiff vs. a PDF with a tiff. It appears that when their is NO tiff, it displays the PDF in an iframe. When there is a tiff associated with the PDF, the tiff is displayed in the 'document viewer' window. 

Has anyone successfully accomplished this by changing a config file or something? 

 

Thanks

2 0
replied on January 17, 2023

We're having this exact issue, I can't believe there isn't a fix yet from LF.  Seems like it should be fairly simple to put a configuration option in for.

 

0 0
replied on January 19, 2023

I just wanted to update that I've got a bit of a workaround for now - I renamed the DocView9.aspx file in the WebFiles folder on our weblink server and over-wrote the DocView.aspx file with it.  The viewer goes back to the version 9 one which still shows the pages view but at least when you click the Download button, you get the original PDF rather than a newly generated PDF from the pages.  

It's not perfect but it's better than nothing considering LF shows no interest in fixing this.

1 0
replied on June 14, 2024

This worked for me on WebLink 11 Update 3 ( 11.0.2307.136 ). The links in the pdf were "clickable".

Our WebLink is accessed with the user "PublicUser". Using Management in Web Client, add to the user the attribute "[Settings]PreferEdocOnPDFDownload" with the value of "True". The value of the attribute "[Settings]OpenEdocAsDoc" needs to be "False".

2 0
replied on August 27, 2021

Each user can select how they want to view documents in the Options area.  

1 0
replied on August 27, 2021

Bryan, I appreciate the answer but that is for Web Client.

I'm looking for recommendations for Weblink. That setting is actually why I believed that it should be possible in Weblink as well.

0 0
replied on August 27, 2021

Ah, my mistake.  I'm more familiar with the cloud public portal, which does have the ability to make documents present as PDF.  I'm not as familiar with self hosted WebLink, but would assume it has to be there.  Hope someone posts the answer for you.

0 0
replied on August 27, 2021

Interesting, I'll have to check our Cloud Public Portal. I was under the impression it worked the same way as on-prem, where the Tiff images took precedence if there are generated pages.

 

I appreciate your time Bryan! Enjoy your weekend.

0 0
replied on May 21, 2024

Has there been any update on this issue. We have quarterly meetings that are always fire drills because people cannot get to the documents. They need to see a document in PDF with working links. Last meeting, we decided to "page" documents but not "OCR". If the thumbnails only displayed text, then it meant they could open in PDF. However, a download is still necessary and they want to be able to click on a link and just see the doc and/or print.

Thanks,

Caroline

0 0
replied on July 23 • Show version history

While I know this is an old thread, hopefully this will help someone who may be having the same problem with WebLink 11.x. We tackled this same issue years ago with the following JavaScript code that opens PDF files (wether they have a TIFF file associated with them or not) into the ElectronicFile.aspx file which bypasses any viewer.

// Title: Direct File for Laserfiche WebLink
// About: Converts Document links to Electronic File links
// Version: 1.0
// Date: 01/13/2023
// Compatibility: Laserfiche WebLink 11.x
// Install: Place direct_file.js file in the Laserfiche WebLink javascript folder. Open up
//          the Browse.aspx file in an editor and add the following code before the </body> element:
//
//          <script type="text/javascript" src="<%= Page.ResolveUrl("./javascript/direct_file.js")%>"></script>
//
//          Save Browse.aspx and refresh the page


(function() {
    var proxied = window.XMLHttpRequest.prototype.send;
	var sent = false;
    window.XMLHttpRequest.prototype.send = function() {
		sent = true;
        var pointer = this
        var intervalId = window.setInterval(function(){
			console.log('Ready State: ' + pointer.readyState);
                if(pointer.readyState != 4){
                        return;
                }
                clearInterval(intervalId);
				if(sent)
					transform_links();
				sent = false;			

        }, 1);
        return proxied.apply(this, [].slice.call(arguments));
    };
	
	// After initial load, observe the table that contains the links for any additions due to scrolling
	var t = document.getElementsByClassName('p-datatable-table')[0];
	var observer = new MutationObserver(entryname_column_changes);
	observer.observe(t, {
		attributes: false,
		childList: true, // report added/removed nodes
		subtree: true,   // observe any descendant elements
	});	

})();

function entryname_column_changes(mutations){
  for (let mutation of mutations) {
    if (mutation.type === 'childList') {
      transform_links();
    }
  }
}

function transform_links() {

    //Obtain the EntryNameColumn cells in the browse table and loop through them after a slight delay
    $(".EntryNameColumn").delay(500).each(function () {
		// console.log($(this).text());
        // Find all A elements
		$(this).find("a").each(function() {
			// Get all a elements that have a class value of ElectronicFileIcon
			var ef = $(this).find("div.ElectronicFileIcon");
			// console.log($(this).attr("href"));
			// console.log(ef.length);
			if(ef.length == 1){
				// Get the existing URL
				var old_url = $(this).attr("href");
				// Transform links that have not already been processed
				if(old_url.includes('DocView')){
					// Create a new URL based upon the old one
					var new_url = old_url.replace("DocView","ElectronicFile").replace("?id=","?docid=");
					// Replace old URL with our new one
					$(this).attr("href",new_url);
					// Clone the content which removes all existing event handlers
					var b = $(this).clone();
					// Replace existing content with the clone content which will allow the ElectronicFile link to work.
					$(this).replaceWith(b);
				}
				}
			});
        
    });
};

 

Working example: https://edoc.cityofaikensc.gov/WebLink/Browse.aspx?id=225386&dbid=0&repo=City-of-Aiken-LF

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

Sign in to reply to this post.