I have a HTML5 site which makes use of a watermark for ‘Pending approval’ topics via a background image in an internal stylesheet.
So that the watermark has visibility when the topic is printed, the internal stylesheet also calls it with:
@media print {body:before { content: url(image.png) ;}
Which puts it at the top of the page when the topic is printed from the browser, which is good enough.
But this doesn’t come through when the topic is included as one of the chapters in a PDF target.
I could use an alternative method for flagging these topics in the PDF, such as a conditionally-called snippet, but since they are relatively few, I’d rather make two techniques work than have to use three.
Any suggested mods to the @media print code? I’ve tried '!important'….?
Watermark in PDF output
-
AlanKearns
- Sr. Propeller Head
- Posts: 103
- Joined: Thu Sep 11, 2014 2:06 am
-
kwag_myers
- Propellus Maximus
- Posts: 810
- Joined: Wed Jul 25, 2012 11:36 am
- Location: Ann Arbor, MI
Re: Watermark in PDF output
I wonder if you'd be better off using a separate MasterPage for these topics? There's an article on how to set this up here and set the Show menu of the Stylesheet Editor to Show: Property Groups. The mc-master-page property is listed under Unclassified. In the Master Page, set the background-image property of the html style to have the image.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
-
AlanKearns
- Sr. Propeller Head
- Posts: 103
- Joined: Thu Sep 11, 2014 2:06 am
Re: Watermark in PDF output
Being relatively new to Flare and with no old Flare content to maintain, I understood that Master Pages were a 'legacy' sort of thing, so I haven't been involved with them. Also, the Printed Output Guide says they are for Word and Framemaker output and not PDF. But I'll have a look into them, thank you. Perhaps you mean I should use Word as an intermediate stage to making my PDFs.
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Watermark in PDF output
I can understand why it doesn't work. If you have four little topics that all appear on a single page in your PDF output, how would determine where the watermark goes? You might have other topics that cover more than one page. Same question.
Would it be a stupid thing to suggest you add some specific content to your new topics saying the topic is new?
Create a new style, e.g. "p.NEW" (make it bright red text, so it stands out) and a new condition "local.NEW". Add an extra paragraph to your topic that says "New, this needs to be reviewed" formatted with p.NEW and conditioned with "local.NEW". Your reviewers can flick through the PDF and look at anything that has bright red text in it. If you want to produce a version that doesn't have any of these extra comments in it, in your target EXCLUDE the local.NEW condition.
When you've finished, search in your code for your extra paragraph, with <p class="NEW" at the start and </p> as the end.
Would it be a stupid thing to suggest you add some specific content to your new topics saying the topic is new?
Create a new style, e.g. "p.NEW" (make it bright red text, so it stands out) and a new condition "local.NEW". Add an extra paragraph to your topic that says "New, this needs to be reviewed" formatted with p.NEW and conditioned with "local.NEW". Your reviewers can flick through the PDF and look at anything that has bright red text in it. If you want to produce a version that doesn't have any of these extra comments in it, in your target EXCLUDE the local.NEW condition.
When you've finished, search in your code for your extra paragraph, with <p class="NEW" at the start and </p> as the end.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: Watermark in PDF output
MasterPages are useful for word output and also for HTML5 output. But in general, yes, you could accomplish the same thing using a pagelayout, with the possible issues that Choccie points out.
Personally, I'd do something similar to what Choccie was describing, but use a Div with a "New" class instead and mark it with a "New" condition. That way, you can wrap it around whatever is new (including all the text in a single target).
I would set the background image of the Div.New in the master style sheet to be your background image, and do anything else you want like make the text red or what have you. It should work in PDF and HTML5 (and printed versions of your HTML5) just fine, allowing you to use one method. When it is approved, just unbind the div, and you're set.
The one issue with this method is that I don't think it'll work for Word output, which is a bit of a bummer, but it doesn't sound like that is an issue for you.
Personally, I'd do something similar to what Choccie was describing, but use a Div with a "New" class instead and mark it with a "New" condition. That way, you can wrap it around whatever is new (including all the text in a single target).
I would set the background image of the Div.New in the master style sheet to be your background image, and do anything else you want like make the text red or what have you. It should work in PDF and HTML5 (and printed versions of your HTML5) just fine, allowing you to use one method. When it is approved, just unbind the div, and you're set.
The one issue with this method is that I don't think it'll work for Word output, which is a bit of a bummer, but it doesn't sound like that is an issue for you.
-Dan, Propellerhead-in-training
-
AlanKearns
- Sr. Propeller Head
- Posts: 103
- Joined: Thu Sep 11, 2014 2:06 am
Re: Watermark in PDF output
Thanks everyone - I had arrived simultaneously at something like Choccie's idea, but dorcutt's refinement seems to me to have the potential to replace the watermark that I'd set up for HTML5 output too, and that would be a benefit; to have a single way to flag topics that would cover both types of target. Thanks!
-
kwag_myers
- Propellus Maximus
- Posts: 810
- Joined: Wed Jul 25, 2012 11:36 am
- Location: Ann Arbor, MI
Re: Watermark in PDF output
As much as I appreciate Flare's ability to give me just about everything I've needed so far, its Word output is a challenge you don't want to undertake unless someone is holding a gun to your head.AlanKearns wrote:Perhaps you mean I should use Word as an intermediate stage to making my PDFs.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard