adutzu89
29th March 2014, 11:12
I am using QWebView for printing html generated content but I find myself a bit stuck, because when I compile the application on Windows and trying to print, the resolution messes up the page, though on Linux the page prints fine.
Example: If the printer is set with HighResolution the text becomes too small, if the printer is set with ScreenResolution the text goes outside the page.
I found out,through web searches, this is because of the resolution, though I do not if this is actually a bug, also the printer settings are set by QPrintDialog.
Also I've managed to find 2 possible workarounds:
1. I should scale the text to fit the page
2. I should set the resolution myself using setResolution(int dpi)
I need to use something that can be used on multiple machines without me interfeering(recompiling) on every machine I install the application.
Which is better from those workarounds(which I mentioned above) for my pourpose?
Or are there any other methods I can use?
I also tried setting the document using QWebPage but I had the same issue.
Example: If the printer is set with HighResolution the text becomes too small, if the printer is set with ScreenResolution the text goes outside the page.
I found out,through web searches, this is because of the resolution, though I do not if this is actually a bug, also the printer settings are set by QPrintDialog.
Also I've managed to find 2 possible workarounds:
1. I should scale the text to fit the page
2. I should set the resolution myself using setResolution(int dpi)
I need to use something that can be used on multiple machines without me interfeering(recompiling) on every machine I install the application.
Which is better from those workarounds(which I mentioned above) for my pourpose?
Or are there any other methods I can use?
I also tried setting the document using QWebPage but I had the same issue.