[Whatwg] Request for HTML-only print link
Křištof Želechovski
giecrilj at stegny.2a.pl
Sat Jul 28 12:58:58 PDT 2007
Of course, both the host name and the printer name can be empty, which means
the browser should let the user select the printer taking into account the
capabilities required and the local policies. The browser can give the user
a hint about the best matches.
Cheers
Chris
-----Original Message-----
From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Stijn Peeters
Sent: Saturday, July 28, 2007 9:54 PM
To: Křištof Želechovski
Cc: WHATWG
Subject: Re: [Whatwg] Request for HTML-only print link
Křištof Želechovski schreef:
>
> href="print://www.whatwg.org/specs/web-apps/current-work/" is no good;
> it asks the browser to find the resource using the print protocol. But
> the print protocol is for printing, not for finding resources; I
> imagine it could be used for finding out some printer configuration
> parameters (similar to the way printers with a network interface only
> can be configured) and to submit documents for printing, nothing more.
>
> How about
>
> <form
>
> action="print://host_name/printer_name/?
>
> href=&quo;http://www.whatwg.org/specs/web-apps/current-work/&quo;&
>
> palette=mono&
>
> copies=3&
>
> mode=draft,booklet&
>
> stapled=top" method="post" ><input type="submit" value="Print
> me"></form >? It feels better to me. Of course, the arguments would be
> interpreted by the browser, not by the printer, contrary to what the
> syntax suggests, but I think this problem is much smaller and I can
> swallow it in spite of being a purist.
>
> The idea that a fragment can address a block element is quite
> interesting; in the old days a reference to #name would usually
> correspond to an anchor with the same name-and you cannot embrace a
> block-level element with an anchor. I think it is still common
> practice to put the named anchor around the section header and not
> around the whole section, which would require a division, not an anchor.
>
> I did not want to say that printing is obsolete; I wanted to say that
> asking the customer to print is obsolete. Sorry for the
> misunderstanding. Your site should not lose functionality because your
> customer does not have a printer.
>
> Cheers
>
> Chris
>
A link of the format print://host_name/printer_name would never be
feasible because on the server side it can not be properly guessed what
the name of the printer and the server it is on (if any) on the client
side would be. A theoretical solution would be somehow finding the
printer's location via Javascript (though this is fundamentally
impossible, as far as I know), in which case you could as well use
javascript:print().
Besides, no such protocol exists, and defining it is as I pointed out
earlier not in the scope of the specs the WHATWG is working on.
Regards,
Stijn
More information about the whatwg
mailing list