kooloveme / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

Topmargin is not evaluated during print preview #187

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Although topmargin of the body-element is given with „0“, .PrintPreview() 
of the THtmlViewer object creates the first ExtTextOut record („Hallo“) at 
position ‚16‘ – not as expected at position ‚0‘.

Simple example:
<html><body bgcolor="red" leftmargin="0" topmargin="0" 
rightmargin="0">Hallo<br>1</body></html>

This behaviour can be reproduced by using the precompiled frame demo and the 
sample from above. You can see the unexpected gap between the top and the 
printed text.

Original issue reported on code.google.com by johnb20072@gmail.com on 3 Sep 2012 at 7:44

GoogleCodeExporter commented 9 years ago
John,

I cannot reproduce this issue with HtmlViewer 11.3 (r306) or at least I don't 
see what you mean.

Could please post a commented screenshot or printed pdf?

Thanks
OrphanCat

Original comment by OrphanCat on 12 Sep 2012 at 7:30

GoogleCodeExporter commented 9 years ago
I made some more tests with the given html-code. As I now could see, the 
FrameDemo.exe, Firefox and IE have all the same small gap at the top - see the 
attached screen.

I was irritated, because in the resulting metafile (*.emf) from .PrintPreview() 
the first ExtTextOut-Record starts at top-position 16 (ExtTextOutW(hDC, 
0,16,0,NULL,L"Hallo",5,Dx_1)... But that's probably OK then, so this issue may 
be closed. Sorry for the hassle.

Original comment by johnb20072@gmail.com on 13 Sep 2012 at 8:21

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, let's say the tricky printable area compensation has fooled you.

Original comment by OrphanCat on 13 Sep 2012 at 5:54