Important: Please read the Qt Code of Conduct -

Display or download PDF documents from a WebView?

  • I'm writing a QtQuick Controls 2 app, and have a WebView on one of my screens.

    When a user clicks on a linked PDF document in my WebView, nothing happens. The PDF isn't shown in the WebView, and the document isn't downloaded so the user can use another app to view the content.

    Even if the user tries to right click on the link, there's no option to download the linked file.

    How are others handling this issue? Is there a simple way to add PDF viewing capabilities to a WebView? Is there a way to configure a WebView so that it will download linked PDF documents by default?

  • I'm not trying your steps, but, I recall that, there is an existing example demonstrating conversion from html to PDF document.

  • I'm not trying to convert an HTML document into a PDF.

    I'm trying to either display or download a PDF that is linked to a webpage and viewed in a qt quick controls 2 WebView.

Log in to reply