Bug 143563

Summary: Print under windows is scaled down on top of page, very small font
Product: WebKit Reporter: Mikkel Kruse Johnsen <mikkel>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: andrej, bugs-noreply
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 10   
Attachments:
Description Flags
Show size on print
none
This patch scales the content so it is correct on Windows.
mikkel: review+
This patch scales the content so it is correct on Windows. mikkel: review+, mikkel: commit-queue?

Description Mikkel Kruse Johnsen 2015-04-09 07:01:44 PDT
When trying to print on Windows I get Microsoft Visual C++ Runtime Error

This is Webkitgtk3 2.2.8 (From Fedora 21 mingw32-webkitgtk3-2.2.8 and with mingw32-gtk-3.14.10)
Comment 1 Mikkel Kruse Johnsen 2015-04-09 07:08:04 PDT
Bugs that may solve the problem on WebKit2

https://bugs.webkit.org/show_bug.cgi?id=129869
https://bugs.webkit.org/show_bug.cgi?id=98497
Comment 2 Mikkel Kruse Johnsen 2015-05-19 02:49:33 PDT
I just read that Webkitgtk 2.8 is not about to come to Windows. So I really need to resolve this bug, so I can print under Windows with 2.2 (2.4), please could someone help.
Comment 3 Mikkel Kruse Johnsen 2015-05-21 03:35:32 PDT
Created attachment 253516 [details]
Show size on print

Just updated to Gtk 3.16 and that seems to have resolved the problem with Runtime Error, when printing under Windows. 

My problem is now that the page is scaled down to very small size in the top of the page. See attached screenshot.
Comment 4 Mikkel Kruse Johnsen 2015-05-21 06:32:02 PDT
Just update to Webkitgtk-2.4.9 (Gtk3)  on Windows 8.1. It's the same problem.
Comment 5 Mikkel Kruse Johnsen 2016-07-19 08:16:06 PDT
Created attachment 284006 [details]
This patch scales the content so it is correct on Windows.

I finally found a way to scale the output.

I am not 100% sure why I need to divide by 100. But it works.
Comment 6 Mikkel Kruse Johnsen 2016-07-19 09:39:39 PDT
Not complete yet.
Comment 7 Mikkel Kruse Johnsen 2016-07-19 23:21:47 PDT
Created attachment 284087 [details]
This patch scales the content so it is correct on Windows.

This is the right patch. It needs to scale the page down to the size of the paper.

It now makes sense, dividing with 96 which is the standard DPI, but not on windows.