Content Exporter
📈 Marketplace❓ Support❤️ Feedback🏠 META-INF Apps
  • General Product Information
    • 🤓Overview
    • 🏗️Installing Content Exporter
      • Installation Notes
      • Cloud Platform security
  • User Guides
    • 👷‍♂️Before exporting
      • General settings
      • Remote API (Cloud only)
      • Export profiles
        • General formatting
        • Custom Stylesheets (CSS)
        • Cover pages
        • Page size and the margins
        • Headers & Footers
        • Table of Contents
          • Generating a Table of Contents
          • Formatting Table of Contents
          • Examples for customized Table of Contents
      • Custom stylesheets
        • Stylesheet administration
        • Exporting specific CSS classes
        • Custom Stylesheet Examples
        • Adding a watermark
      • Macros
      • PDF Custom fonts
      • Embedded links with page number
    • 👨‍🏫During export
      • Exporting Confluence pages
      • Customizing the profile
  • Additional Information
    • ▶️Release notes
    • ❓Frequently Asked Questions
    • 3️⃣Supported 3rd party apps
  • Dependency license guide
Powered by GitBook
On this page
  • Formatting headers
  • Formatting text
  • Formatting bold text
  • Setting the page size (PDF only)
  • Using the page-bottom macro
  • Using the code block macro

Was this helpful?

  1. User Guides
  2. Before exporting
  3. Custom stylesheets

Custom Stylesheet Examples

Here you can find some example stylesheets that can be used for formatting the document.

Important: Do not set the body and HTML height to 100% in the stylesheet if you are using cover pages. Set it to 99% instead.

Formatting headers

With the below example you can change the color of header1 to red and header2 to blue:

.wiki-content h1{ 
    color:red;
}
.wiki-content h2{ 
    color:blue;
}

If you want to change the style of the document title, you have to use another CSS class on header1:

.wiki-title h1{
    font-style: italic;
}

Formatting text

You can format bold texts by referring to the paragraph HTML element.

To change the text align to justify, include this in the stylesheet:

p{
    text-align:justify;
}

To strike through a text, use this:

p{
    text-decoration:line-through
}

Formatting bold text

You can format bold texts by referring to the strong HTML element.

For example, this code sets the color of the bold texts to blue:

strong{
    color:blue
}

Setting the page size (PDF only)

You can use the '@page' rule to set the page size.

You can use absolute values:

@page{
    size: <width> <height>;
}

Or you can use the paper size name:

@page{
    size: A4;
}

Using the page-bottom macro

Use the the page-bottom CSS class to format the page bottom macro.

.page-bottom{
  border: 1px solid red;
}

Using the code block macro

To have line breaks in code block macro, add the following:

pre{
  white-space: pre-wrap;
}
PreviousExporting specific CSS classesNextAdding a watermark

Last updated 9 months ago

Was this helpful?

👷‍♂️
Page cover image