PrintPreview DOMWindow

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PrintPreview DOMWindow

Gecko Embedding
Hi,

After having embedded mozilla and obtaining the DOM Document I need to
insert pagebreaks( equivalent of what printpreview does).


What is the best approach to identify the page size and insert breaks

Thanks in Advance,
Krith

_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding
Reply | Threaded
Open this post in threaded view
|

Re: PrintPreview DOMWindow

Eli Friedman
krithika wrote:

> Hi,
>
> After having embedded mozilla and obtaining the DOM Document I need to
> insert pagebreaks( equivalent of what printpreview does).
>
>
> What is the best approach to identify the page size and insert breaks
>
> Thanks in Advance,
> Krith
>

That stuff really isn't exposed to external code.  You might be able to
get what you want by messing with nsIPrintSettings, nsIPrintOptions, and
maybe nsIPrinterEnumerator, but that stuff's all internal and completely
unfrozen. Use at your own risk.

The only frozen API for dealing with printing is nsIWebBrowserPrint.

I don't understand what you're trying to do... there might be a better
way of dealing with your problem.  (Of course, it's not unlikely there
isn't a better way of dealing with it, but I thought I'd check.)

-Eli
_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding
Reply | Threaded
Open this post in threaded view
|

Re: PrintPreview DOMWindow

Gecko Embedding
On Mar 16, 5:02 pm, Eli Friedman <[hidden email]> wrote:

> krithika wrote:
> > Hi,
>
> > After having embeddedmozillaand obtaining the DOM Document I need to
> > insertpagebreaks( equivalent of what printpreview does).
>
> > What is the best approach to identify the page size and insert breaks
>
> > Thanks in Advance,
> > Krith
>
> That stuff really isn't exposed to external code.  You might be able to
> get what you want by messing with nsIPrintSettings, nsIPrintOptions, and
> maybe nsIPrinterEnumerator, but that stuff's all internal and completely
> unfrozen. Use at your own risk.
>
> The only frozen API for dealing with printing is nsIWebBrowserPrint.
>
> I don't understand what you're trying to do... there might be a better
> way of dealing with your problem.  (Of course, it's not unlikely there
> isn't a better way of dealing with it, but I thought I'd check.)
>
> -Eli

Thanks for the quick response.

We are trying insert page breaks exactly where printpreview inserts.We
have got number of previewpages from nsIWebBrowserPrint. But
getCurrentChildDOMWindow() which is supposed to give the dom window of
each page in preview is unimplemented.

How to get child dom window (every page) after previewnavigate is
done?.

We are doing this to bring pagination feature in very large documents?

regards,
Krith

_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding