Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot print image in html file #2

Closed
babman92 opened this issue Sep 6, 2017 · 5 comments
Closed

Cannot print image in html file #2

babman92 opened this issue Sep 6, 2017 · 5 comments

Comments

@babman92
Copy link

babman92 commented Sep 6, 2017

I have an image in html page. I print this html page with PrintHtml, printer just print text, image not printed on paper.
My folder html page:
https://www.dropbox.com/s/bwxejll11934v0r/PrintHtmlDemo.rar?dl=0

Please help me, thanks in advance.

@babman92
Copy link
Author

babman92 commented Sep 6, 2017

Hi everyone, instead of using path to image, i use image data base64 and it ok.

@Nineapsofttech
Copy link

Hi babman92 I have got this issue when I first use.
My solution is change the way images render from url to base64 data and everything work perfect.

@colin-grierson
Copy link

I too do not have images printing. The text is rendered correctly and a faint outline, with a '?' at the center, shows where the image ought to be.

  • I tried converting the image to inline base64 data, but it made no difference
  • I tried converting my images from .gif to .png and .jpg - which made the question marks vanish, but no image printed.
  • At each test I opened the document in a browser and the images displayed correctly.
    Is there a fix or work around for this?
    Thanks for your help
    Colin

@kendallb
Copy link
Owner

Images are printing fine for us, but we are no longer using this utility as we have gone paperless in our DC. However the program is build using Qt so the first thing would be to get the Qt code for the release we used and see if the internal browser is able to render properly. Since it prints using the internal QtWeb browser, if that is having issues loading your images that would explain the problem.

I believe since I wrote this code there has been movement on improving the web browser printing support in the latest releases of Qt, so someone should consider porting it to the latest version of Qt to see if it works better. I took a quick look at it a couple of months ago, but the API's are completely different so I didn't have any time to work on it :(

@colin-grierson
Copy link

colin-grierson commented Jul 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants