|
|
|
date: Mon, 25 Aug 2008 09:36:02 -0700,
group: microsoft.public.inetsdk.programming.webbrowser_ctl
back
Re: How to Scroll without cropping visibility of elements ??
WHoit wrote:
> However, since the scroll is pixel-based, I frequently see that text
> and other elements are cropped. Sometimes, lines of text are only
> half visible at the bottom of the window.
>
> Is it possible to scroll and be sure that elements are not cropped ?
In general, this is physically impossible. If the height of the client
area is not the exact multiple of the height of a line of text (ignoring
for the moment things like images that could make the latter uneven),
then you'll necessarily have partial lines either at the top or at the
bottom (or both).
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
date: Mon, 25 Aug 2008 12:52:54 -0400
author: Igor Tandetnik
Re: How to Scroll without cropping visibility of elements ??
So, when I print the same web browser to a PDF using Acrobat, how does
Acrobat ensure that:
1) There are no horizontally cropped lines and
2) The page size is what I requested when printing ?
"Igor Tandetnik" wrote:
> WHoit wrote:
> > However, since the scroll is pixel-based, I frequently see that text
> > and other elements are cropped. Sometimes, lines of text are only
> > half visible at the bottom of the window.
> >
> > Is it possible to scroll and be sure that elements are not cropped ?
>
> In general, this is physically impossible. If the height of the client
> area is not the exact multiple of the height of a line of text (ignoring
> for the moment things like images that could make the latter uneven),
> then you'll necessarily have partial lines either at the top or at the
> bottom (or both).
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>
>
date: Mon, 25 Aug 2008 10:06:02 -0700
author: WHoit
Re: How to Scroll without cropping visibility of elements ??
WHoit wrote:
> So, when I print the same web browser to a PDF using Acrobat, how does
> Acrobat ensure that:
> 1) There are no horizontally cropped lines and
> 2) The page size is what I requested when printing ?
It's not Acrobat that's doing this, but the browser itself. You would
get the same results if you print to paper on a physical printer. The
printer driver (whether Acrobat or physical printer) tells the browser
what the dimensions of the page are, and the browser lays out HTML so it
fits on the page.
You, on the other hand, are dealing with HTML laid out for the screen,
which the browser essentially treats as one infinitely long page.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
date: Mon, 25 Aug 2008 13:21:58 -0400
author: Igor Tandetnik
Re: How to Scroll without cropping visibility of elements ??
So, then is it possible to tell the browser to lay out the HTML for a printer,
but display it on scrren so I can grab it?
"Igor Tandetnik" wrote:
> WHoit wrote:
> > So, when I print the same web browser to a PDF using Acrobat, how does
> > Acrobat ensure that:
> > 1) There are no horizontally cropped lines and
> > 2) The page size is what I requested when printing ?
>
> It's not Acrobat that's doing this, but the browser itself. You would
> get the same results if you print to paper on a physical printer. The
> printer driver (whether Acrobat or physical printer) tells the browser
> what the dimensions of the page are, and the browser lays out HTML so it
> fits on the page.
>
> You, on the other hand, are dealing with HTML laid out for the screen,
> which the browser essentially treats as one infinitely long page.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>
>
date: Mon, 25 Aug 2008 10:36:02 -0700
author: WHoit
Re: How to Scroll without cropping visibility of elements ??
Igor Tandetnik wrote:
> WHoit wrote:
>> So, then is it possible to tell the browser to lay out the HTML for a
>> printer, but display it on scrren so I can grab it?
>
> There's Print Preview, but I don't know how or whether one can drive
> it programmatically.
Also, you'll have problems with screen resolution being too low. Your
whole screen is probably something around 1280x1024 pixels, whereas a
typical modern printer would print 600x600 dots per inch.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
date: Mon, 25 Aug 2008 13:59:38 -0400
author: Igor Tandetnik
Re: How to Scroll without cropping visibility of elements ??
Well, actually, I'm using CreateEnhMetaFile and OleDraw to create an EMF.
So I don't take a screenshot - I 'draw' the window into an EMF. (I only said
screenshot in my original post, 'cause as soon as I mention EMF, no one
replies)
:)
"Igor Tandetnik" wrote:
> Igor Tandetnik wrote:
> > WHoit wrote:
> >> So, then is it possible to tell the browser to lay out the HTML for a
> >> printer, but display it on scrren so I can grab it?
> >
> > There's Print Preview, but I don't know how or whether one can drive
> > it programmatically.
>
> Also, you'll have problems with screen resolution being too low. Your
> whole screen is probably something around 1280x1024 pixels, whereas a
> typical modern printer would print 600x600 dots per inch.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>
>
date: Mon, 25 Aug 2008 11:20:16 -0700
author: WHoit
|
|