Global PDF settings in CSS

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
Matze
Sr. Propeller Head
Posts: 166
Joined: Mon Jun 20, 2016 10:35 pm

Global PDF settings in CSS

Post by Matze »

I´ve 2 output targets, HTML and PDF
In the HTML I´ve a general html block for all classes, e.g. for attributes like the hypernate for my english language.

Code: Select all

html
{
	mc-hyphenate: never;
	text-align: left;
}
How can I put these global settings in my @media print section? I guess the same html section for PDF does not work, right?

Thx a lot.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Global PDF settings in CSS

Post by ChoccieMuffin »

If that definition is in the DEFAULT (rather than in a separate medium you use for online output) then you don't need to add anything in your print medium section. Mediums take what's defined in the default and also any default settings for the browser, so you ONLY need to include settings that you want to be different from the default. Does that make sense? So if in your default setting you've defined the font for headings as Arial, but you want to produce a PDF that uses Calibri for headings, your stylesheet would contain something like this:

Code: Select all

html
{
   mc-hyphenate: never;
   text-align: left;
}

h1
{
	font-family: Arial;
}

@media PDF
{
 h1
 {
	font-family: Calibri;
 }
}
I have to say though, I'd probably assign those attributes to "body" rather than to "html" in the default, but others may say different, or would say it doesn't matter. I'm not a CSS expert so I'll defer to those who are, if they respond in the thread.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Matze
Sr. Propeller Head
Posts: 166
Joined: Mon Jun 20, 2016 10:35 pm

Re: Global PDF settings in CSS

Post by Matze »

thx a lot, I will check this...

Explaination to my CSS:
In the past I´d 3 sections, default, @media print and @media non-print.

Now I work with 2 sections, default (=HTML) and @media print.
Post Reply