You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Lars Geldner <ge...@gmx.net> on 2006/05/10 14:58:17 UTC

print current page

Hi all,

my publication pages are containing "static content", e.g. the menu,
generated with XSLT stylesheets and "dynamic content" thats within the
different XML documents of the publication. The dynamic content is included
in the XSLT stylesheet page2xhtml.xsl using the line

<xsl:apply-templates select="xhtml:div[@id = 'body']"/>.

My question is: Is Lenya providing some prepared functions (usecases??) for
printing the dynamic content/XML documents? Or do I have to write an XSL-FO
stylesheet for generating PDF based on the XML documents on my own?

TIA,

Lars Geldner

-- 
Echte DSL-Flatrate dauerhaft f�r 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: print current page

Posted by so...@apache.org.
On 5/10/06, Lars Geldner <ge...@gmx.net> wrote:
> my publication pages are containing "static content", e.g. the menu,
> generated with XSLT stylesheets and "dynamic content" thats within the
> different XML documents of the publication. The dynamic content is included
> in the XSLT stylesheet page2xhtml.xsl using the line
>
> <xsl:apply-templates select="xhtml:div[@id = 'body']"/>.
>
> My question is: Is Lenya providing some prepared functions (usecases??) for
> printing the dynamic content/XML documents? Or do I have to write an XSL-FO
> stylesheet for generating PDF based on the XML documents on my own?

Disclaimer: I work with Lenya 1.2.2, and there may be better methods
with later versions.

If you want PDFs, you need additional code, but the link below may
still be useful reading.

If you want HTML without the navigation, there are several
possibilities.  Add a pipeline that does not aggregate the Navigation
Elements.  If they do not exist in the XML, they will not be added to
the HTML in the "page2xhtml.xsl" transformation.  "page2xhtml.xsl"
usually adds static headers and footers that are not wanted for the
"printable" version.

It may be better to create a new stylesheet for the "printable"
version.  The "printable" version just contains the Body (and maybe
the Title and Author), and a "Back" link to return to the regular
website.

Check out "Using Multiple Stylesheets for the Same Content":
http://solprovider.com/lenya/multiple

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: print current page

Posted by Bob Harner <bo...@gmail.com>.
On 5/10/06, solprovider@apache.org <so...@apache.org> wrote:
> On 5/10/06, Doug Chestnut <dh...@virginia.edu> wrote:
> > Hi Lars,
> > You could just add a css stylesheet with a media type of print:
> > http://www.alistapart.com/stories/goingtoprint/
>
> I like alternate stylesheets for different media.  They are extremely
> useful for screen readers for the blind, but using the suggested
> technique violates WYSIWYG.  The (sighted) visitor sees the page
> formatted for the screen.  They print it, and it magically changes to
> the printable version.  The problem is they were expecting to print
> the page they were seeing.  They could be upset that it did not print
> what they saw, because they wanted to show what the website looked
> like.  And they may still use the workaround  of copying the body and
> pasting it into a different program to print, because that is what
> most websites require.  A warning like "This page may be formatted
> differently when printing" may help if the visitor notices it, but you
> want it obvious without distracting from the content: difficult to
> find the happy medium.  The common practice is to provide a link in
> the top right right corner for "Printable Version".  Visitors have
> been trained to look for that link if they want a clean version,
> whether for printing or just to read a multiple-paged article as a
> single page without annoying advertisements.  And it does not violate
> WYSIWYG when they print it.
>
> I like your suggestion, but until it becomes common practice, it may
> cause more confusion more than it helps.
>
> solprovider
>

In my experience, site users (as opposed to developers) rarely care
whether the printed page appear exactly like the on-screen page.
Instead, most people just want a nicely-formatted paper version of the
significant text on the page.  (If they really want to see what the
printed version will look like, they'll do a File -> Print Preview.)
I find it best to use the simple approach in the A List Apart article
cited.  Then users don't have to search around on the page for a
"printer-friendly version" link that may or may not be there.  I've
never heard a complaint from users on this.

Opinions may vary, as usual.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: print current page

Posted by so...@apache.org.
On 5/10/06, Doug Chestnut <dh...@virginia.edu> wrote:
> Hi Lars,
> You could just add a css stylesheet with a media type of print:
> http://www.alistapart.com/stories/goingtoprint/

I like alternate stylesheets for different media.  They are extremely
useful for screen readers for the blind, but using the suggested
technique violates WYSIWYG.  The (sighted) visitor sees the page
formatted for the screen.  They print it, and it magically changes to
the printable version.  The problem is they were expecting to print
the page they were seeing.  They could be upset that it did not print
what they saw, because they wanted to show what the website looked
like.  And they may still use the workaround  of copying the body and
pasting it into a different program to print, because that is what
most websites require.  A warning like "This page may be formatted
differently when printing" may help if the visitor notices it, but you
want it obvious without distracting from the content: difficult to
find the happy medium.  The common practice is to provide a link in
the top right right corner for "Printable Version".  Visitors have
been trained to look for that link if they want a clean version,
whether for printing or just to read a multiple-paged article as a
single page without annoying advertisements.  And it does not violate
WYSIWYG when they print it.

I like your suggestion, but until it becomes common practice, it may
cause more confusion more than it helps.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: print current page

Posted by Doug Chestnut <dh...@virginia.edu>.
Hi Lars,
You could just add a css stylesheet with a media type of print:
http://www.alistapart.com/stories/goingtoprint/

HTH,
--Doug

Lars Geldner wrote:
> Hi all,
> 
> my publication pages are containing "static content", e.g. the menu,
> generated with XSLT stylesheets and "dynamic content" thats within the
> different XML documents of the publication. The dynamic content is included
> in the XSLT stylesheet page2xhtml.xsl using the line
> 
> <xsl:apply-templates select="xhtml:div[@id = 'body']"/>.
> 
> My question is: Is Lenya providing some prepared functions (usecases??) for
> printing the dynamic content/XML documents? Or do I have to write an XSL-FO
> stylesheet for generating PDF based on the XML documents on my own?
> 
> TIA,
> 
> Lars Geldner
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: print current page

Posted by Maurizio Mollicone <mo...@ittig.cnr.it>.
> My question is: Is Lenya providing some prepared functions (usecases??) for
> printing the dynamic content/XML documents? Or do I have to write an XSL-FO
> stylesheet for generating PDF based on the XML documents on my own?
> 


Hi!
I've just solved adding a print css in my page2xhtml.xsl:

<link rel="stylesheet" href="{$root}/css/print.css" type="text/css"
media="print"/>

Bye,

-- 
Maurizio Mollicone
Istituto di Teoria e Tecniche dell'Informazione Giuridica - CNR
Via dei Barucci 20 - 50127 Firenze | Tel: 055 4399627 
E-mail: mollicone@ittig.cnr.it | Web: http://www.ittig.cnr.it


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org