PDA

View Full Version : How printing articles ?



lpasseb
1 Oct 2006, 9:48 AM
Hi,

As I don"t know where asking this, I post here

I'd like to print articles but I can't. When I try to print an article, it just print the beginning of the page.

Thanx for these great things (article and grid ;) )

jack.slocum
1 Oct 2006, 1:22 PM
This is a known issue because of the layout. I need to add a stylesheet for printing. It's been on the agenda and I will be making it soon.

Jack

lpasseb
1 Oct 2006, 11:19 PM
Great news

Thanx you for all

Laurent

valc
17 Jan 2007, 9:21 AM
Jack, did you ever create the stylesheet for printing ?

brian.moeskau
17 Jan 2007, 12:33 PM
I don't remember when Jack added the "printer-friendly" link to the top of each doc page, but that seems to work perfectly for me. Are you having issues with the view rendered by that link? There's not a print-specific css file, but it prints fine without that if you use the link.

valc
17 Jan 2007, 2:30 PM
I want to print the content from tabs. For example if someone clicks print I want each tab to be printed on a new page (without tabs).

tryanDLS
17 Jan 2007, 2:36 PM
I'm not sure how you'd accomplish this without opening a popup, copying the tab content to that popup, and telling the user print that page. It would be pretty difficult to come up with css to disable all the other elements, just to print the contents of a tab.

brian.moeskau
17 Jan 2007, 2:47 PM
Just playing around with the doc center tab samples in Firebug's css editor, I was able to get a reasonably clean print view by doing the following:

- Override the class 'ytab-wrap' and set display:none -- this removes the tab bar (this also removes the top border from the surrounding box -- you could add it back manually or remove the entire border)

- Each tab (class = 'tab-content') that is not the active tab gets the following styles set programmatically to make them not display: 'display: block; position: absolute; left: -20000px; top: -20000px; visibility: hidden;' You can either override those styles by adding higher priority styles or remove them programmatically in your print view and then all tabs will display sequentially in a single container. You could even get fancy and add a bottom border on the 'tab-content' class if you wanted to keep some kind of visual separation between each section for printing.

brian.moeskau
17 Jan 2007, 2:50 PM
One note -- this should work fine for static content. It might not work for dynamic content (like ajax-loaded data) unless you programmatically ensured that the data was loaded for the print view if it wasn't already requested by the user.

valc
18 Jan 2007, 3:38 AM
I'll give it a try. Do I need to disable the js too that builds the tabs ?