Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article is meant to help you creating create a page to page including embedded links with page numbers for PDF export.

Table of Contents

Step-by-step guide

I use Use the following page hierarchy:

...

You can find all related documentation at the bottom of this page.

Creating a Custom Stylesheet

...

  1. Create or modify a Custom stylesheet using the following CSS code:

    Code Block
    languagecss
    a.embedded-page-link::after{
        content: "("target-counter(attr(href), page, decimal)")";
    }


  2. Create a user macro with the following settings (image for example, use the code below):


    Image Removed



    Image Added

    Code Block
    ## @noparams
    #if ( $renderContext.getOutputType().toLowerCase() =="pdf" )
      #set($outputHtml= $body.replaceAll(">.*</a>","></a>").replaceAll("<a href=", "<a class='embedded-page-link' href="))
    #else
      #set($outputHtml = $body)
    #end
    $outputHtml


To create a link on the "Embedded link Home" page that links a table at the "Another page in the export" page, do the following steps:

...