Show pdf with qtwebkit
-
I have a project in which we use custom built software, that is not developed by us. The application is developed in qt 4.7.0 and is running on Ubuntu 10.04 LTS.
It uses html pages to provide the "online help" to the user. My task is to write the initial help content. The pages are rendered using qtwebkit.
Our customer would also like to display pdf-documents. When I asked the developers, I was told to convert the pdfs to html and add the converted files to the online help.
This would cause quite a bit of additional work and results in html-output that won't look exactly like the pdf-files... and it would prevent the simple addition of new pdf-files by the customer.
So I ask the community here: is there a way to display pdf-files with qtwebkit? Are there any plugins?
Cheers,
10.6um
-
[quote author="10.6um" date="1329289033"]So I ask the community here: is there a way to display pdf-files with qtwebkit? Are there any plugins?
[/quote]In my opinion you should detect that it is actually a pdf by the MIME type using "MimeType::fileExtensions":http://developer.qt.nokia.com/doc/qt-4.8/qwebpluginfactory-mimetype.html#fileExtensions-var Please have a look at "QWebPluginFactory":http://developer.qt.nokia.com/doc/qt-4.8/qwebpluginfactory.html documentation as it may give you further hints how to load the pdf.
-
Thanks a lot for your reply. I am not a qt dev... so digging to deep into the stuff is not really to way to go for me... I am looking for info to pass on to the devs...
I found "this post":http://developer.qt.nokia.com/forums/viewthread/14055/ and it looks like it simply does not work. As I've written in reply, I get the same results as tomleitner: it works in WinXP but doesn't in Ubuntu 10.04.
And "here":http://www.qtforum.de/forum/viewtopic.php?t=12009 (sorry in German) they say it just works with the Gecko rendering engine...