Page breaks and single sourcing

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
raikeswood
Propeller Head
Posts: 30
Joined: Tue Feb 05, 2008 9:29 am
Location: Harrogate, North Yorkshire, UK

Page breaks and single sourcing

Post by raikeswood »

I'm having some difficulty with H1 page breaks when single sourcing. The problem is that for my PDF print output I want H1 headings to start on a new page. I've managed this by using the page-break-before = always property in the @media print section of my help.css. But when I do this, when a user prints a help topic from the WebHelp toolbar, it 'prints' a blank page first. Can you ignore the @media print section when printing Webhelp topics from the toolbar?

I'm probably missing something obvious, but what? Any help appreciated.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Page breaks and single sourcing

Post by LTinker68 »

I think you need to go another step in the stylesheet and create a third medium. The @print medium is the one used by default for printing off a web page. If you want different settings for a print output (PDF, Word, etc.), then create a third medium (e.g., printHardCopy), set the print output target to use that print medium, then set all the styles for that medium as you want. The new medium will still cascade from the default medium, not the main print medium, so if you want a different font for print output and printing online, then you'd need to change the font in both the print and printHardCopy mediums.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
raikeswood
Propeller Head
Posts: 30
Joined: Tue Feb 05, 2008 9:29 am
Location: Harrogate, North Yorkshire, UK

Re: Page breaks and single sourcing

Post by raikeswood »

Ah. (sound of penny dropping) Thanks Lisa. I undertand now. So, if I copy my print medium to a third medium, tweak that one, and apply the new medium to my PDF target all will be well? Printing online will use @medium print; PDF will use new third medium? Is that right?

Thank you very much for your time :D
raikeswood
Propeller Head
Posts: 30
Joined: Tue Feb 05, 2008 9:29 am
Location: Harrogate, North Yorkshire, UK

Re: Page breaks and single sourcing

Post by raikeswood »

It works! Thanks Lisa.
Post Reply