Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Customize the print setting

55 views
Skip to first unread message

SndRox

unread,
Sep 29, 2006, 4:27:55 AM9/29/06
to
Hi all,
I'm finalizing an application in xul (standalone application) and need
to insert some printing in it.

The best solution I found is to have a hidden browser to store html to
be printed, this html is created from the xul document I want to print.

Everything went well but I would like to remove the file location
header included in the default printing setting.

I've been browsing in reference with no luck,
anybody here with a hint?

Thanks in advance,
Sandro

Igor Tandetnik

unread,
Sep 29, 2006, 10:50:39 AM9/29/06
to
SndRox <sandro....@gmail.com> wrote:
> I'm finalizing an application in xul (standalone application) and need
> to insert some printing in it.
>
> The best solution I found is to have a hidden browser to store html to
> be printed, this html is created from the xul document I want to
> print.
>
> Everything went well but I would like to remove the file location
> header included in the default printing setting.

See http://www.xulplanet.com/references/elemref/ref_iframe.html, the
first user note at the bottom. Change this line

var settings = PrintUtils.getPrintSettings();

to this

var settings = PrintUtils.getPrintSettings().clone();
settings.docURL = " "; // suppress URL on printout

Other options you can modify are documented here:

http://www.xulplanet.com/references/xpcomref/ifaces/nsIPrintSettings.html

Igor Tandetnik


SndRox

unread,
Sep 29, 2006, 2:36:18 PM9/29/06
to
Great, that worked!
I'm curious as well about the way to display the application
preferences as others do, see Celtx that insert a print menu options in
the Mozilla default print dialog.

Sandro Rossetti
> Igor Tandetnik

0 new messages