Project

General

Profile

Feature #4559

Add standard/default/centralized print media css style sheet layout link to all generated pages

Added by Andreas Mohr over 6 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
11/10/2015
Due date:
% Done:

0%

Estimated time:

Description

Hi,

there is https://developer.mozilla.org/en-US/docs/Printing

This page mentions the following line:

I asked colleagues whether all generated Wt page content includes such a line by default, and seems it doesn't (yet?).

A short search for "Wt print style sheet" did not come up with any pointers about this topic either.

I think probably ideally such a print feature in the form of a standard, common, clean

implementation (good CSS content, sensible behaviour, ...)

should be default-provided by all generated pages

(to ensure that all web pages as served by Wt do provide such an "accessibility" feature unless in fact not wanted),

with a simple and accessible API to have it turned off (and back on) wherever desired

(some people would not want printing support on their pages).

Anyway, even if having this feature default-enabled (== opt-out) is not desirable, I think such a feature should in general be accessible via (wrapped by) a simple "switch"-type API

which when invoked implicitly and conveniently takes care of having a standard/elegant print-type line inserted in the document.

Related API:

"Wt::WApplication::addMetaLink()" http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WApplication.html#a976f8a7f160fefc9d3f24a2b482f5c9a

A related item seems to be: #416.

Disclaimer: I don't have any specific interest in this at all - I merely saw this feature mentioned at the Mozilla page,

so I thought that Wt likely ought to have this provided in an elegant ready-to-use manner (and likely also by default), thus I'm submitting this wishlist item here.

Thanks!

#1

Updated by Andreas Mohr over 6 years ago

Design of such a print API should also encompass thinking about the features that the existing HTML-side print media link interface supports and that Wt should fully support as well (i.e., avoid offering an overly restricted/inflexible API), thus offer appropriately matching method parameterization on the Wt API side, too.

Perhaps API design could be made even more generic, e.g. with a mechanism supporting something like:

object->EnableMediaLink(GetDefaultMediaLinkSetup());

which would enable both supplying the "standard one" and where needed custom media link setups.

Also available in: Atom PDF