1

I need to open a PDF from an action in QGis. The PDF rests on a server, not local.

So far I tried this (as Python):

from PyQt4.QtCore import QUrl; 
from PyQt4.QtWebKit import QWebView;  
myWV = QWebView(None); 
myWV.load(QUrl(('https://myserver.com/[% "path" %])); 
myWV.show()

This just opens an empty window. It works with a png.

Can anybody tell me how to do that. Thanks!

  • You are missing a single quote in your string for a start. myWV.load(QUrl('https://myserver.com/[% "path" %]')); – Nathan W Aug 21 '13 at 10:41
1

It seems that QWebView does support PDF though the systems PDF web plugin however it seems a bit hit and miss for me.

You can open the report in the default web browser using the Open command

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.