Setting Styles for Print Output in a Regular Stylesheet

A regular stylesheet lets you single-source formatting by setting the properties in one place and reusing them throughout your project. But what if you want your online output to look one way and your printed output to look another way? Rather than creating a style for online output and another style for printed output, you can use a single style and provide it with two sets of properties—one set to use for online output and another set to use with printed output. You can accomplish this through the use of a medium in your stylesheet.

For more information see Styles and Stylesheets and Mediums and Media Queries.

How to Set Styles for Print Output in a Regular Stylesheet

  1. From the Content Explorer, open the stylesheet that you want to modify.
  2. Set the style properties to be used for your online output as follows:
    1. In the local toolbar of the Stylesheet Editor, click in the Medium field and make sure the medium for your online output is selected.
    2. Select a style and set the properties for it. Do this for each style that you want to use in your online output. See Editing Styles in a Regular Stylesheet.
  3. Set the style properties to be used for your printed output as follows:
    1. In the local toolbar of the Stylesheet Editor, click the down arrow in the Medium field and select Medium: print or Medium: [name of print medium].

      Note You can also create a new medium if necessary. You actually might find it preferable to do this. For example, if you want page breaks before a particular heading for print output, but not when users send online topics to the printer, it is a good idea to create a custom print medium. The reason for this is that browsers respect the settings in the "print" medium provided by Flare. Therefore, even though your online output style medium does not have page breaks set before that heading, the application will see that you do have a page break specified in the print medium. And when a user tries to print a topic from your online Help, the printer will start a new page at that heading. The solution is to create a custom print medium (perhaps calling it "PDF"), specifying page breaks in that medium, and using it for your print output (instead of using the "print" medium provided by Flare). See Creating Mediums.

    2. Select the same styles that you edited for the online output, and set different properties for them (for the purpose of printed output).
    3. Click Save the active file. to save your work.
  4. Apply the styles to the content throughout your project.

    See Applying Styles to Content.

  5. Associate the online medium with your online target as follows:
    1. Open the target to be used for online output (HTML5, Clean XHTML, Eclipse Help, Microsoft HTML Help, WebHelp, WebHelp Plus).
    2. In the Target Editor, select the Advanced tab.
    3. In the Stylesheet Medium section, select the medium that you used for online output.
  6. Associate the print medium with your print target as follows:
    1. Open the target to be used for print output (Adobe PDF, Microsoft Word).

    2. In the Target Editor, select the Advanced tab.
    3. In the Stylesheet Medium section, select the medium that you used for printed output (e.g., print).
  7. Click Save all files. to save all files.

Note You can also create special print versions of styles for tables. See Setting Table Styles for Print Output.