Correct html/xml code for print only?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Grant Hogarth
Jr. Propeller Head
Posts: 5
Joined: Tue Nov 22, 2011 11:39 am

Correct html/xml code for print only?

Post by Grant Hogarth »

What I'm looking for I've seen before in Flare projects, and looks something like

Code: Select all

<MadCap:@print style="margin-top 0pt;">
Unfortunately, there is little code in the help, and searching this forum fails because "the terms are too common". *SIGH*

What I"m trying to do is put in a local override to a para so that it rises to the top of the page in print/pdf, but does not do so in WebHelp.
I *could* create a whole new class, but that is overkill for a single paragraph!
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Correct html/xml code for print only?

Post by i-tietz »

??? I've never seen that ...

Do you want to make outoput look different when printed or published to what Flare calls "print formats" like PDF or Word? Then you will have to look at the stylesheet editor, find the list of "media" and chose 'print'.
Inge____________________________
"I need input! - Have you got input?"
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Correct html/xml code for print only?

Post by NorthEast »

I don't know either, I can't remember seeing anything in Flare or CSS that allows you to apply mediums to tags (only when defining styles).
(The only code I've seen that looked vaguely similar was how table stylesheet options were set for the print medium, in versions of Flare prior to v7.)

Also, I'm not sure what you would do to make content "rise to the top" of a page in a PDF.
wbrisett
Sr. Propeller Head
Posts: 216
Joined: Mon Oct 05, 2009 3:29 pm
Location: Austin, TX

Re: Correct html/xml code for print only?

Post by wbrisett »

Garth:

You don't want margin-top 0pt; since that only sets the box margin. If you goal is to always float a paragraph to the top of a new page, then you want:

Code: Select all

<p MadCap:mediastyle="@media print { page-break-before: always; }">
You can play around other options in the braces if you want to get what you want, but the previous code will always force an individual paragraph to the top of a page.

Wayne
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: Correct html/xml code for print only?

Post by lacastle »

Grant Hogarth wrote:Unfortunately, there is little code in the help, and searching this forum fails because "the terms are too common". *SIGH*
use google to search the forums - you'll find much better results => http://forums.madcapsoftware.com/viewto ... 114#p45836
Post Reply