Closed GoogleCodeExporter closed 8 years ago
Thanks for the detailed issue report. I will do my best to fix this as soon as
possible but the problem is that I don't own a printer. Maybe it is a problem
inside the PrintManager.cs class. I will look into it further.
Original comment by tsumalis96@gmail.com
on 17 Nov 2011 at 10:03
Hi,
The easiest way to test is to download the bullzip pdf printer or attempt to
print the page to a microsoft xps file which both reproduce the error without a
printer.
Cheers,
Ben
Original comment by ben.war...@gmail.com
on 17 Nov 2011 at 11:21
Thanks for the advice!
Original comment by tsumalis96@gmail.com
on 17 Nov 2011 at 1:11
Hi,
I have tried your latest build Version 2.1(r55) and unfortunately it is still
generating and exception when attempting to print or generate a print preview.
This seems to be due to a divide by zero exception in the
_webFramePrivate.setInPrintingMode(1, ref hdc); on line 70 of PrintManager.cs.
Original comment by ben.war...@gmail.com
on 25 Nov 2011 at 9:06
I applied a patch to fix this issue but I am not sure that it is going to work.
I modified this file:
http://code.google.com/p/open-webkit-sharp/source/browse/Source/OpenWebKitSharp/
PrintManager.cs
Download the above and add it to your source. Then build the library and update
it in your project. Please when you debug, if the same error occurs tell me
what the values of _RemotableHandle hdc are (the int values inside the object)
Original comment by tsumalis96@gmail.com
on 26 Nov 2011 at 11:14
I have tried applying the patch to the latest version but the same divide by
zero exception still occurs.
Some example values of the hdc are as follows:
fcontext = -1558111167
u:
hInproc = 40
hRemote = 40
fcontext, hInproc, and hRemote change with each execution
hInproc always seems to be equal to hRemote
Original comment by ben.war...@gmail.com
on 26 Nov 2011 at 3:03
I need to find a way to convert the _remotableHandle to a IntPtr and opposite
in order to make printing operations work but _remotableHandle is a bit strange
and although it is a handle, the conversion fails. Maybe I can find a way to
convert the _remotableHandle to int within the interop library.
Original comment by tsumalis96@gmail.com
on 26 Nov 2011 at 3:53
I made another change for you to test it. Please download PrintManager.cs again
if you want and rebuild.
Original comment by tsumalis96@gmail.com
on 26 Nov 2011 at 6:33
The latest version unfortunately still gives the same divide by zero error with
the latest version of PrintManager.cs
Some example values of the hdc are as follows:
fcontext = 0
u:
hInproc = -1574886399
hRemote = -1574886399
fcontext is now always zero
hInproc always seems to be equal to hRemote
Original comment by ben.war...@gmail.com
on 27 Nov 2011 at 12:21
OK Now I went deeper into WebKit and changed some interfaces on the Type
Library. I changed all HDCs to ints so that it does not ask for
_remotableHandle. I will commit the revision in a minute from now
Original comment by tsumalis96@gmail.com
on 27 Nov 2011 at 9:10
New revision is available
Original comment by tsumalis96@gmail.com
on 27 Nov 2011 at 9:15
Ok I have just checked out and compiled the new version. I have a slightly
different error now.
When I attempt to print I get an exception on line 75 with all the public
elements of "_printGfx" giving an "InvalidOperationException - Object is
currently in use elsewhere."
Original comment by ben.war...@gmail.com
on 27 Nov 2011 at 11:32
Thanks for the info. I will inform you if I find anything else that I can do.
Original comment by tsumalis96@gmail.com
on 28 Nov 2011 at 3:11
In the latest revision I fixed this problem but the Print Preview shows blank
pages and I don't know if printing works. The dialogs now show up without
exceptions.
Original comment by tsumalis96@gmail.com
on 29 Nov 2011 at 5:15
Thanks for the update I have just checked the it and it appears to be giving me
some exceptions in the WebUIDelegate.cs folder due to
webViewHeaderHeight(WebView WebView) and webViewFooterHeight(WebView WebView)
not being implemented.
As these functions are supposed to return a float I tried changing them
slightly just to return an arbitrary number (I used 100 for both). The print
and print preview pages then display without exceptions but all the pages are
blank without any content but it seems like a good step in the right direction.
Original comment by ben.war...@gmail.com
on 30 Nov 2011 at 12:41
Maybe these functions are the key to success then. I will try to do this.
Original comment by tsumalis96@gmail.com
on 30 Nov 2011 at 3:35
Hackish printing is now used
Original comment by tsumalis96@gmail.com
on 30 Dec 2011 at 11:24
Original issue reported on code.google.com by
ben.war...@gmail.com
on 17 Nov 2011 at 9:57