Results 1 to 2 of 2

Thread: QWebView PDF.JS loading File From URL

  1. #1
    Join Date
    Jul 2015
    Location
    Austria
    Posts
    20
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default QWebView PDF.JS loading File From URL

    Hey

    i use pdf.js to display PDF-Files. I want to load the files from a URL. The scipt files are in my resource file.
    Qt Code:
    1. page()->mainFrame()->evaluateJavaScript("init();");//Initialize the pdf.js
    2. page()->mainFrame()->evaluateJavaScript("getPDFFileNameFromURL('http://www.mobile.de/magazin/_pdf/kaufvertrag.pdf')");//An example of loading, but nothing happens
    To copy to clipboard, switch view to plain text mode 

    Ciao

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QWebView PDF.JS loading File From URL

    This is a Javascript/PDF.js question, not Qt.

    getPDFFileNameFromURL() does not load a PDF file. It suggests a name to save the file under during a download... and you are ignoring that return value. I suggest you start with the PDF.js examples and other resources on the project web site
    https://mozilla.github.io/pdf.js/examples/
    https://mozilla.github.io/pdf.js/web/viewer.html

Similar Threads

  1. QWebView loading problem
    By zgulser in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2012, 12:27
  2. Replies: 3
    Last Post: 2nd August 2012, 13:46
  3. QWebView page loading fails after file downloading
    By mentalmushroom in forum Qt Programming
    Replies: 1
    Last Post: 18th August 2011, 14:57
  4. Replies: 6
    Last Post: 8th May 2011, 19:00
  5. Qwebview is not loading url on device
    By vijaydandur in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 6th March 2011, 18:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.