On Mar 29, 12:22 pm, Eli Friedman <[EMAIL PROTECTED]> wrote:
> There's some code that does some stuff similar to what you're asking in
> nsPrintEngine::GetPageRangeForSelection.  You can use
> nsIPresShell::GetPrimaryFrameFor to get the primary frame for a content
> node, and nsIFrame::GetContent to get the content for a frame.  Note
> that one piece of content may correspond to multiple frames, so things
> can get a bit complicated in some cases.
>
> -Eli


Hi,

Iam still not clear.Can you clarify the following for me?

1. Do you mean to say I should not be doing stuff in nsDocumentViewer
printpreviewnavigate method?If yes where exactly will I get the
presShell corresponding to printpreview page contents.
2. The problem in the code I presented is that if I do a rootFrame
GetContent() it is null.GetPrimaryFrame requires content.

>From your ealier mail I was hoping to get the page starting element
easily.

Iam clueless please help.

regards,
Krithika





_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to