• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Print Conditional tag from an Online Manual

New Here ,
Feb 09, 2011 Feb 09, 2011

Copy link to clipboard

Copied

Hello-

I am wondering if it is possible to build a conditional tag that can applied to an online manual, that only shows up if someone should print something from that manual.

Example: I have a certain set of instructions that are updated regularly and if someone should print those instructions they run the risk of using outdated material by referring to the printed instructions. I would like to have a disclaimer print on ever topic they print out that reads something like: "Do not use this printed material. Please refer to online version for updated instructions." But I only want this to show up should the user print the material.

Is that a possibility?

Thanks in advance!

BrianCCD

RoboHelp HTML 9

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 09, 2011 Feb 09, 2011

Copy link to clipboard

Copied

Hi Brian.

You can't do this inside RoboHelp. Maybe you'd be able to do this programmatically with a script that interacts with the user's print driver but I wouldn't have a clue where to start.


  The RoboColum(n)   @robocolumn   Colum McAndrew

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Feb 09, 2011 Feb 09, 2011

Copy link to clipboard

Copied

CSS Media rules would normally be used for this type of issue, but RH used to ignore them (at least in RH X5). I don't know if they've fixed it in RH8 or RH9. I would say try and see.

See the W3C web site for more help.

Good luck,

Leon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 10, 2011 Feb 10, 2011

Copy link to clipboard

Copied

Hi Leon,

RoboHelp leaves @media blocks (and @import rules with media) in you css. As far as I could find, the WYSIWYG editor ignores the media and uses the styles. It doesn't seem to adhere the !important rule, but it works like a charm in output.

For example:

@media print {

     div.droptext {
        display: block !important;    /*Always show dropdowns on print.*/
    }

}

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Feb 10, 2011 Feb 10, 2011

Copy link to clipboard

Copied

Yes, Willam, the external css file is the way to go, because even in RH 8 (tested this morning) placing the @media inside the HEAD section of a source topic:

@media screen
  {
  p {font-family:verdana,sans-serif;font-size:24px;}
}
@media print
  {
  p {font-family:times,serif;font-size:10px;font-weight:bold;}
  }

results in this stripped-down version in the output topic:

<style type="text/css">
<!--
-->
</style>

I remember now that when I looked at this, years ago, I was not interested enough in the end result to spend any time playing with the css file (I was a novice in css at the time, so zero knowledge = zero interest), and adding it to the output files post-production was no less odious.

So:

@media in RH source files: NO

@media in RH output files: YES

@media in css file: YES

Good luck,

Leon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 10, 2011 Feb 10, 2011

Copy link to clipboard

Copied

Thanks for the overview Leon.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2011 Feb 10, 2011

Copy link to clipboard

Copied

Thanks everyone for your responses.

MergeThis - I happen to be where you were years ago...a novice in regards to CSS style sheets (also RoboHelp and coding for that matter).

So, just to clarify, I will need to alter the CSS style sheet after the project has been generated.

At the risk of looking like a fool - What do I need to add to the CSS style sheet? Is it the code previously mentioned?

@media screen
  {
  p {font-family:verdana,sans-serif;font-size:24px;}
}
@media print
  {
  p {font-family:times,serif;font-size:10px;font-weight:bold;}
  }

Or am I way off base? Thank you guys so much for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Feb 10, 2011 Feb 10, 2011

Copy link to clipboard

Copied

No, Brian, that code I provided was goofy stuff just to show you an example of something. And if you configure the .css file in your project source folder, the settings will carry over to the output.

You might not even need to have the "screen" media element, just the "print" one. You'd want something like:

@media print

     {

     p.notprint {font-size: 1.5em}

     }

(The 1.5em means that the text will be 150% of the default <p> tag size.)

Then, the HTML code for your disclaimer inside the topic would be:

<p class="notprint">MyDisclaimerText</p>

See the web site I suggested for help on customizing the text (font type, color, background color, etc.).

Good luck,

Leon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 11, 2011 Feb 11, 2011

Copy link to clipboard

Copied

Thanks Leon-

I wasn't able to get this to work. This is most likely because of my lack of programming ability. I do not know how to code. I will have to do some extra research to learn how and where to put this code.

I might have done this completely wrong, but I tried to put:

@media print

     {

     p.notprint {font-size: 1.5em}

     }

inside the header of the topic, but RoboHelp automatically moves that to the <body> portion of the code, and then that shows up in my output. I also tried putting that code in the CSS style sheet, but then the:

<p class="notprint">MyDisclaimerText</p>

still showed up in my output, instead of remaining hidden on screen and showing up on print.

Thanks for the help! I will let you know what I find out. If you have any more suggestions, or corrections, please let me know.

BrianCCD

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 06, 2011 Mar 06, 2011

Copy link to clipboard

Copied

Brian

If you are still looking for a solution, I came across a solution posted by Pete Lees who used to be a frequent contributor to these forums.

I have posted it in Snippets on my site. http://www.grainge.org/pages/snippets/snippets.htm


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2011 Mar 16, 2011

Copy link to clipboard

Copied

Thank you Mr. Grainge-

This solution did not work for me. I must be doing something incorrect.

First, I appended the very end of my CSS style sheet using notepad with:

@media screen

{

p.copyright {display:none:}

}

@media print

{

p.copyright {display:block;}

}

Then I create a topic and pasted in the code:

<p class="copyright">Copyright <?rh-symbol_start name="Copyright" ?>©<?rh-symbol_end ?> 2011 My Company Name</p>

And it still displays on my monitor when publishing WebHelp files. What am I doing incorrectly?

RoboHelp HTML 9

Thanks,

BrianCCD

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2011 Mar 16, 2011

Copy link to clipboard

Copied

LATEST

You did create a style called Copyright? If you did, send me the CSS file. It will be a couple of days before I reply as I will be travelling. See the contact page on my site.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp