Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pamelabremer
Partner - Contributor III
Partner - Contributor III

PDF Localhost URL link in QlikSense Table

I have a very large selection of pdf files that I need to create URLs for and display in a table. I am working on a Qlik Sense server environment. The question is, what does the format of the URL have to be? I have tried

localhost:80//sharedfolder\mydoc.pdf

https://hostname/sharedfolder\mydoc.pdf

file:///C:\Documents\mydoc.pdf

and wide variaty of variations

The results are file not found, site not available or URL is unkown

I would be very grateful for some help on this.

Many thanks,

Pam

1 Reply
pamelabremer
Partner - Contributor III
Partner - Contributor III
Author

I received some help and was able to solve the problem

Displaying PDF Files in a Qlik Sense Application

1)Open Windows ITT (Internet Information Services)

2)Under Hostname, right click on «sites» and select «Add Website»

3)In the Add Website dialog box, specify the full physical pathname tot he PDF Files:

4) In the righthand menu panel, click on Site Bindings and specify the port number that the new website should use. Make sure to use a port that is not being used by QlikSense

5) In your datasource application, create a data connetion (lib) that points to the directory where the files are located

6) In the script, load all the PDF File names into a table using a loop statement. Extract the information from the filename that you need, such as name and timestamp. Make certain to pay close attention to the direction of the slashes / and \

FOR Each File in filelist('lib://MyPDFFilesDataConnection\*. pdf')

PDFFilestmp:

LOAD

'$(File)' as FileName,

Filetime('$(File)') as FileTime,

       autogenerate 1;

NEXT File

7) In your refinement script, load all the filenames and generate the URLs. In the URL, make certain to use the correct hostname and portnumber.

PDFFiles:

LOAD *,

'http://Hostname:85/ '& FileName as PDFURL

Resident PDFFilestmp ;

😎 Display the URLs in a table along with any other information you need to associate with them. Make sure to select « URL » in the sidebar, data element, as the display method.