Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

pennetzdorfer
Contributor III

Launch application: Open PDF from URL

I'm trying to create a button that opens a PDF file from an URL.

How can I force Qlikview to show the file in Adobe Reader rather than Internet Explorer?

I tested 2 approaches:

  • Action "Open URL" --> opens the URL in browser
  • Action "Launch" --> opens Adobe Reader but cannot open the URL

But generally, Adobe Reader is able to open URLs (File > Open > Insert URL works)

Please see the attached qvw (URL = dummy PDF file)

Regards,

Florian

8 Replies
mov
Esteemed Contributor III

Re: Launch application: Open PDF from URL

Florian,

This works for me:

Action - Launch

Application - iexplore.exe

Filename - "C:\...\file.pdf"

Regards,

Michael

pennetzdorfer
Contributor III

Re: Launch application: Open PDF from URL

Thank you Michael, but actually I'm trying to open a PDF via URL (e.g. http://www.terna.com/fileadmin/user_upload/Partner/Dokumente/terna_QV11_Whats_new_in_QV_11_de.pdf)

And: the PDF should be opened in Adobe Reader, rather than browser.

Any ideas?

Regards,

Florian

mov
Esteemed Contributor III

Re: Launch application: Open PDF from URL

I see now what you mean...  But, what's wrong with opening the file in browser???

pennetzdorfer
Contributor III

Re: Launch application: Open PDF from URL

The main reason is: we have disabled all Internet Explorer toolbars (tabs, adress bar etc.) for our Qlikview environment. So, if the user opens a QV application, he just sees the IE title bar + the QV application itself.

Linking to a pdf via "Open URL" action opens the file in a new IE tab and now the user has no evident way to switch between the "QV tab" and "pdf tab" (due to the missing tab bar) ... You see what I mean?

Regards,

Florian

yfe
Contributor III

Re: Launch application: Open PDF from URL

Hi Florian

did you find a solution? I am facing the same problem

Thanks

Yaniv

Not applicable

Re: Launch application: Open PDF from URL

Hello,


There is a way to do that in a macro where the pdf will be downloaded then opened with adobe.

But I did not test on server, just on qv desktop.

Here's the sample macro in vbscript where you'll change the paths accordingly, hope it'll be helpful:


sub openPDFfromURL

pdfurl = "weburl/yourpdffile.pdf"

savepath = "C:\Users\Test\Desktop\QVW\File.pdf"

adobepath = "C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe"

set objHTTP = CreateObject("Microsoft.XMLHTTP")

set objPDF = CreateObject("Adodb.Stream")

objHTTP.Open "GET", pdfurl, False

objHTTP.Send

objPDF.Type = 1 'binary

objPDF.Open

objPDF.Write objHTTP.responseBody

objPDF.SaveToFile savepath, 2 'overwrite

objPDF.Close

'below can be set from launch trigger

set app = ActiveDocument.GetApplication

app.Launch adobepath, savepath

end sub

Make sure to change the security flag to "Allow system access".

pennetzdorfer
Contributor III

Re: Launch application: Open PDF from URL

Unfortunately not

Not applicable

Re: Launch application: Open PDF from URL

Hi Florian,

Were you able to check my suggestion above with the macro ?

Or you tried it on the server and it didn't work ?

Community Browser