kendallb / PrintHtml

Open source command line program to print HTML pages using QtWebKit
MIT License
50 stars 19 forks source link

Only base64 png picture #5

Closed SaskoJA closed 4 years ago

SaskoJA commented 6 years ago

Hello, is there any possible way print some other picture formats than base64 png? Javascript doesnt work too. ts there any way to get it work?

kendallb commented 6 years ago

Printing of images works fine for me as we already use that? We print both PNG and JPG files when loading a page from the internet. Perhaps you have an example of a page that is not working?

As for Javascript, I am not sure that will ever work as I don't think Javascript runs even if you print in a browser?

SaskoJA commented 6 years ago

Im not able print any jpg picture, it doesnt matter if its on Internet or local. Example: http://update.8u.cz/sample.pdf Yes, Javascript work in browsers when printing (e.g. generating QR codes). In this case Javascript work very strange, some do, some doesnt. Another one question, it is possible control orientation of printed document (Portrait/Landscape)?

Nineapsofttech commented 6 years ago

I think the best way to use or to print something you need to render every with html code so the library can handle it with http status code . Sometimes if your server response the image too slow you would see the white space instead of images. so if it possible I suggest to use base64 image data as I uses it in my production for long time it work great and never have any problem

khalidchawtany commented 5 years ago

Another one question, it is possible control orientation of printed document (Portrait/Landscape)?

@SaskoJA now it is possible to specify orientation using -o flag.