PDF is generated as jpg instead of text. - winnovative

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

Related

"ErrorMessage":"Failed to find ABCGeckoWP.exe."

I have been beating my head for the last 7 hours on this. Full disclosure, I am a PHP guy and not the strongest at ASP.net. So I am coming to you experts.
The issue is that when we run the code below it will product a valid PDF if we use the MSHtmlEngine function (which sets EngineType to MSHtml), but it won't work with the GeckoEngineOptions (which sets EngineType to Gekco). The problem is that the MSHtml won't generate the SVG graphics, so we need to run the Gecko method. When we run the Gecko method, it produces this error:
"ErrorMessage":"Failed to find ABCGeckoWP.exe."
However the file is in the output directory ("bin/"), as well as the project directory. The XULRunner38_0 also appears to be right as well in both the project and bin/.
I am including some screenshots in case it helps / show what has already been tried (sorry for the sizes being all over the place).
You might want to reinstall Abcpdf, from Nuget or reinstall the correct version on the server depending on how it's set up.
ABCGecko cannot function without the XULRunner38_0 folder in the same directory as ABCGeckoWP.exe.
On x64 Windows, even if ABCGeckoWP.exe is found only in %SystemRoot%\System32 (though it should be placed only in %SystemRoot%\SysWOW64 for being 32-bit), it never looks up XULRunner38_0 folder in %SystemRoot%\System32 (but in %SystemRoot%\SysWOW64) because of File System Redirection.
So maybe check the file location as stated above.
This error looks like the version of ABCPdf that you are using and the version installed on the server are not the same.
I would also recommend upgrading the version to the latest one and using the Chrome render engine.

QT WebKit - Protocol "" is unknown

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.

Font and icons not appearing on Windows phones only

I'm using phonegap 3.0 for create a application on android, iOS, and Windows phone. I use a custom font-face for my text and for icons. But when viewed in Windows Phone 8, the font and the icons won't appear on the application.
I have tried loading the fonts after the device ready event; using a .woff font; loading from an external source - nothing works. How could I solve this?
I heard about this problem before, apparently there is an issue present in Windows Phone 8 that prevents custom font-faces from working when html/css are hosted locally. Could you try and host the html/css files externally? Just to see if it makes a difference. I think this is a bug in the current WebBrowser control that's used on WP8
EDIT: See this StackOverflow questions and answers about a similar problem
you can transform the file to base64, using one of the services around (e.g. this one,
and add url like this:
src: url(data:application/x-font-woff;charset=utf-8;base64, AAEAAAALAIAAAwAwT1MvMg6SAy8AAAC8AAAAYGNtYXAa.....)

Qt: Background video in QtWebKit

While HTML5 media tags aren't working in QtWebKit 2.2.2 and it's a known issue, but I still need to get this demo done on time. I need the media tags to display a video behind some HTML, which I don't mind doing without the media tags if its possible. I'm running Windows XP using MinGW. I was able to compile the latest webkit. I'm trying to integreate QtMultimedia from the QtMoblity package as some said it fixes the issues.
I've just write a code with QT version 4.8, nothing went wrong. Did you provide the media plugin to play the video? There is a nice example in this link, you can look at its source code, you don't have to include phonon or mobility for such a job.

Qt: QWebview not displaying jpg, gif, png images on another machines

Today I came across a very strange error with QWebView which I cannot resolve myself.
I included a QWebView widget in my application. When I set a URL or a piece of HTML code to display (with QWebView::setUrl() or QWebView::setHtml()), it works very well on my machine. It also works on all machines that have Qt installed, but not on those without it. I compiled a release build and included all necessary libraries as shared (QtWebKit4.dll, QtNetwork4.dll etc.), so I guess my error lies in that I forgot to include some libraries.
If anybody has already had such an error, I would be very grateful for help!
You might need to include the relevant Qt image processing plugin libraries, which are located in qt/plugins/imageformats (and maybe also qt/plugins/iconengines ). I haven't deployed any webkit apps, so I'm not certain about this.
See my answer to this question: Qt dll deployment on windows

Resources