QT WebKit - Protocol "" is unknown - qt

I'm using simple browser made with Qt WebKit.
On a page (running local rails server) I have a link that opens Pdf Previewer (pdf.js). In this .js script I try to open local (rails) url with path as parameter. Path can be local file path or some public url.
example:
http://localhost/documents/preview_file?path=http%3A%2F%2Fmy-domain.s3.amazonaws.com%2F4533902%2Ftest.pdf%3FAWSAccessKeyId%3DAKIAJWDKNPWPFJYREP6Q%26Expires%3D1480381051%26Signature%3DCqfAmGCm7S5lTpQ7pP0U25BqYpE%253D
In case parameter path is public url rails only redirects to this url.
But problem is, that in this browser I get an error (in console):
GET
http://localhost/documents/preview_file?path=http%3A%2F%2Fmy-domain.s3.amazonaws.com%2F4533902%2Ftest.pdf%3FAWSAccessKeyId%3DAKIAJWDKNPWPFJYREP6Q%26Expires%3D1480381051%26Signature%3DCqfAmGCm7S5lTpQ7pP0U25BqYpE%253D
Protocol "" is unknown
I get this error only in this QtWebKit browser, Chrome and Firefox open this link without problem.
Any help appreciated
10x

QtWebKit released with Qt is based on outdated WebKit engine, that does not implement all Web features available in modern browsers. So it is possible that your page is using some of JavaScript features that are not supported.
Please try your page with latest QtWebKit from https://github.com/annulen/webkit/releases/tag/qtwebkit-tp5. It is based on fresh WebKit and may work better with your content. See http://qtwebkit.blogspot.com/2016/08/qtwebkit-im-back.html for more details about what is happening with QtWebKit now.

Related

Cannot load pepper flash plugin in QtWebEngine with Qt5.6

I made a simple web browser but when I access to
https://get.adobe.com/jp/flashplayer/
It says
Adobe Flash Player is already installed, but disabled
However as I read http://doc.qt.io/qt-5/qtwebengine-platform-notes.html
It says that pepper flash plugin should be automatically loaded if there is a proper dll file. I checked my C:\Windows\System32\Macromed\Flash\ and I'm sure that I have a pepflashplayer32_21_0_0_213.dll there.
Then I also set
QWebEngineSettings *websetting = QWebEngineSettings::defaultSettings();
websetting->setAttribute(QWebEngineSettings::PluginsEnabled, true);
but still no hopes.
Anyone knows how to enable flash with QtWebEngine?
OK I got a working answer here:
https://forum.qt.io/topic/66187/cannot-load-pepper-flash-plugin-in-qtwebengine-with-qt5-6/3
For me I have to copy pepflashplayer.dll from chrome. It seems that installed pepflashplayer*.dll from adobe does not work.
After installing PepFlashPlayer, you need to enable PPAPI in your application manually (it is disabled by default). Use following code before showing the page:
QWebEngineSettings::globalSettings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
Maybe do it manually with this command line argument:
--ppapi-flash-path=./libpepflashplayer.so
See also the different bug reports relative to this problem : 51774 and
49625.

PDF is generated as jpg instead of text.

Using Winnovative html to pdf converter v. 6 over .net 4, usually the pdf is rendered as text, with embedded images. But sometimes the entire document is rendered as single jpeg. There is no selectable text at all. How can this behavior be controlled? It seem so vary with the server. We were unable to reproduce it.
I found a fix for this, and it was to change to the following settings on the application pool.
I also upgraded to version 8 of the component, but that did not automatically fix the problem.
Winnovative HTML to PDF converter does not use anymore IE as rendering engine and the problem described here is not present anymore in the latest version of the software available on our website for download. The converter doesn't depend anymore on any other tool for redenring. It uses its own new rendering engine compatible with WebKit.
We had this same problem, it happens when the servers are upgraded. To reproduce this on your local if you upgrade to IE9 you will see this problem.
What we had to do is upgrade to the current version(version 8) and this seemed to resolve our problem.
A bit old but simply fixe :
for winnovative V8 just install IE9Config.exe from config/WnvHtmlToPDF-v8.0.zip
Works for me on local and on server

QT Webview url loading

Mine is a somple application,I am just loading a url page(loading from server) in the widget window.
Ex:
QWebView->load(QUrl("xxxxx"));
QWebView->show();
this url contains some jpeg image and javascript.
The problem here is my application is able to page correctly in some machines but in some machines jpeg image is not able to load.
Please help me to resolve this issue. I am just surprised what could be the reason.
If you're working with an SDK build of Qt, the ability to view JPEGs in a Qt application is based on the JPEG plugin.
Please see one of the following links:
http://developer.qt.nokia.com/doc/qt-4.8/deployment.html
http://developer.qt.nokia.com/doc/qt-4.8/deployment-plugins.html
Alternatively, if you are building from source, you can compile JPEG support into Qt itself.

Xrefresh alternative

i am using Netbeans PHP + Firefox 4 on Windows for my web development.
I've used a common firebug extension called Xrefresh. It was automaticlly refreshing my opened firefox tab everytime change in my projects directory occured, so pressing ctrl+s in netbeans was triggering auto-refresh in the browser. Very comfort way to work with css, almost live preview.
But now since new Firefox and Firebug versions Xrefresh doesn't work anymore and the question is - are therey any good alternatives, or does someone know how to configure Xrefresh now?
Without live preview my development is somehow slower.
https://github.com/NV/auto_update_stylesheets
This could help you. It refreshes the page via ajax on css save.
There's an automatic refresh-on-change tool for IE. It's called ReloadIt, and is available at http://reloadit.codeplex.com . Free.
Not an add-on to IE, but more of an "adjunct". It does not change the IE install, does not install a BHO or anything like that. So very low-impact installation.
You choose a URL that you'd like to auto-reload, and specify one or more directory paths to monitor for changes. Press F12 to start monitoring.
After you set it, minimize it. Then edit your content files. When you save, the page gets reloaded. like this:
I've managed to keep using xrefresh up until Firefox 9 however I'm not having any luck with version 10.
I've now switched to livereload, they've had a decent Mac version out for a while and a very experimental Windows version has recently been released.

Get javascript version from browser !=IE in asp.net

In my current logging class I log the browser, browser version and javascript version.
The Javascript version I get through
HttpContext.Request.Browser.JScriptVersion
This works fine for IE, but not for any other browser.
Is there another way (not javascript based) to detect the installed javascript version?
There's no standard for transmitting javascript version over HTTP, so unless a browser coincidentally conforms to IE's User-Agent header format, you won't be able to get that info

Resources