Publish PDF output
With AEM Guides, you can generate PDFs of individual topics or an entire map file. You can publish your content in a PDF format using one of the three methods below:
- DITA-OT
Use this method to generate a PDF output for a map from the map dashboard. You can set publishing properties before generating the PDF by creating an output preset for the map that is open in the map dashboard. To create or edit an output preset, the Understanding the output presets section in the AEM Guides as a Cloud Service User Guide.
For more information on generating a PDF using the DITA-OT method, see Generate PDF using DITA-OT.
- FrameMaker Publishing Server (FMPS)
Use this method to generate a PDF output from not only the DITA content, but also FrameMaker documents (.book and .fm) available in your AEM repository. The PDF can be created by configuring an output preset and published using FrameMaker Publishing Server (FMPS). You can design and configure the look-and-feel of your output for PDF and other formats and store the same in a setting file (.sts). This setting file is then used by FMPS to generate output for a DITA map or .book file. To create or edit an output preset, see the Understanding the output presets section in the AEM Guides as a Cloud Service User Guide.
For more information on configuring FMPS, see Generate output from FrameMaker documents.
- Native PDF publishing
Use this method to generate a feature-rich PDF output based on W3C CSS3 and CSS paged media standards. With Native PDF publishing, you can use templates to set the layout and styling for your content and apply various settings to fine-tune your PDF. In addition, you can modify and create your own templates with the template editor.
For more information on Native PDF publishing, see Using Native PDF publishing.
Using the Native PDF publishing native-pdf-publishing
When authoring content, it becomes essential to ensure that the content is optimized for viewing, editing, and printing. Using standards such as the W3C CSS3 for content styling and CSS paged media standards for page definition properties such as size, margins, orientation, page breaks, headers, footers, and page numbering, you can set the view and layout for your PDF document ensuring consistency and usability. The Native PDF publishing feature uses these standards to generate a PDF.
With the native PDF publishing, you can use predefined templates to ensure consistency in content layout and structure, apply stylesheets to alter the look-and-feel of your output, optimize PDF, set printer marks, allow screen reader support, set PDF conformance, embed fonts, and much more.
Generating a PDF using Native PDF publishing has two aspects:
-
Use of templates to apply styling to content, set page layouts, and various settings to fine-tune your PDF. Authors can choose to use/modify the sample templates provided or create custom templates and set advanced configuration options used by publishers and developers.
-
Create or configure a PDF output preset to control the PDF settings. Once you create a PDF output preset, you can generate the PDF.
For more information, see Generate a PDF output.
Create a PDF output preset create-output-preset
The first step in generating a PDF output is to create a PDF output preset, which is a collection of publishing properties assigned to a map. You can create an output preset for any map which is open in the Map View panel or configure an existing preset to quickly generate a PDF for the same map.
From the PDF output preset you can select a template, apply conditions, set restrictions to control how a user interacts with your PDF, configure advanced settings like compression, conformance, and more.
To create or configure a PDF output preset:
-
In the Output tab, click Presets in the left sidebar.
The Preset panel opens.
{width="600"} -
In the output Presets panel, do one of the following:
- Double-click a predefined PDF output preset to view it.
- Click the + icon against Presets to add a new output preset of Type: PDF
-
To configure settings of an existing PDF preset:
- Click the Options
icon next to the desired output Preset and select Edit.
You can use the following settings in the General, Metadata, Layout, Security, and Advanced tabs to configure a PDF output preset:
- Click the Options
icon next to the desired output Preset and select Edit.
General
Use to specify basic output settings, such as specify output path, PDF file name, and more.
You can also use the following out-of-box variables to define the Output Path. You can use a single or a combination of variables to define this option.
${map_filename}
: Uses the DITA map files name to create the destination path.${map_title}
: Uses the DITA map title to create the destination path.${preset_name}
: Uses the output preset name to create the destination path.${language_code}
: Uses the language code where the map file is located to create the destination path.${map_parentpath}
: Uses the complete path of the map file to create the destination path.${path_after_langfolder}
: Uses the path of the map file after the language folder to create the destination path.You can also use the following out-of-box variables to define the PDF File. You can use a single or a combination of variables to define this option.
${map_filename}
${map_title}
${preset_name}
${language_code}
.For conditionalized content, choose from the below options to generate a PDF output based on those conditions:
- None Applied Select this option if you do not want to apply any condition on the map and source content.
- Ditaval File Select a DITAVAL file to generate conditionalized content. To select, click against Condition Preset and locate the file.
- Condition Preset Select a condition preset from the drop-down to apply a condition while publishing the output. This option is visible if you have added a condition for the DITA map file. The conditional settings are available in the Condition Presets tab of the DITA map console. To know more about condition preset, see Use condition presets.
Use the following options to create a PDF showing the differences in content between two versions using change bars:
- Baseline of the Previous Version Choose the baseline version which you want to compare with the current version or another baseline. A change bar appears in the PDF to indicate the modified content. A change bar is a vertical line that visually identifies new or revised content. The change bar appears on the left of the content that has been inserted, changed, or deleted.
Note: If you select Use Baseline and choose a baseline to publish, the comparison will be done between the two selected baseline versions. For example, if you choose baseline Version 1.3 under Use Baseline, and Version 1.1 under Baseline of the Previous Version, the comparison will be done between baseline Version 1.1 and baseline Version 1.3. - Show Added Text Select to show the inserted text in green color and underlined. This option is selected by default.
- Show Deleted Text Select to show the deleted text in red color and marked with a strikethrough. This option is selected by default.
Note You can also customize the styling of the change bar, inserted content, or deleted content using the stylesheet.
Metadata
Metadata is the description or definition of your content. Metadata helps in content management and helps in searching files on the internet.
Use the Metadata tab to set the metadata fileds such as the author’s name, document title, keywords, copyright information, and other data fields for the PDF output. You can also add custom metadata for your PDF output.
This metadata is mapped to the metadata in the Description tab within the Document Properties of your output PDF.
{width="600"}
From the Output presets, select PDF > Native-PDF > Metadata to add and customize metadata options.
-
Use Metdata added in topicmeta
This option is selected by default. You can use the metadata that you have added in the topicmeta element of the DITA map to populate the metadata fields of the PDF output.
-
Provide XMP file
You can also directly populate the metadata fields by importing XMP (Extensible Metadata Platform) file. You can download a sample XMP file from here.
Alternatively, you can generate an XMP file using Adobe Acrobat.
- Click File > Properties in Acrobat.
- Under Description, click Additional Metadata.
- From the left panel, select Advanced.
- Click on Save.
XMP file is saved on the device.
-
Provide metadata names and values
- Add name by selecting from the drop-down or add a custom metadata by typing directly in the name field.
- Enter the value for the metadata and click on ‘+’ icon.
The metadata is added to the list of metadata for the PDF.
You can also use variables to define the metadata values. You can use the metadata defined for the DITA map or bookmap file as variables. The metadata can be found under the /jcr:content/metadata
node of the DITA map or bookmap file.
When you use a variable, its value is picked from the metadata properties.
To use a variable, you need to define it in the ${<variable>}
format.
For example, one of the metadata properties defined in the /jcr:content/metadata
node isdc:title
. You can specify ${dc:title}
, and the title value is used in the final output.
You can use a single or a combination of variables to define the metadata. For example, ${dc:title} ${dc:docstate}
. You can also use the combination of a variable and a string. For example, View ${dc:title} in ${dc:language}
.
Use language variables to define the localized value of metadata properties. Depending on your chosen language, the localized value is automatically picked in the PDF output. For example, you can print “Author” as the metadata value in English and “Autorin” in German.
Format: ${lng:<variable name>}
. For example, ${lng:author-label}
where author-label
is a language variable.
Hover over {width="25"} near the option to view more details about it.
Layout
Use to set page layouts and specify page view options for PDF output such as Page Display and set Zoom levels.
You can also select Browse Template {width="25"} to choose a template. In the Select PDF template dialog you can also preview the thumbnail and view the title and description for the selected template.
Use the Page Display for page view that shows how the PDF is displayed when it is opened. Select from the Page Display drop-down options to choose a preferred view.
- Default Displays as per the default setting of the PDF viewer on a user’s machine.
- Single Page View Displays one page at a time.
- Single Page Scrolling Displays a single page in a continuous vertical column.
- Two Page View Displays two-page spread side-by-side at a time. .
- Two Page Scrolling Displays two-page spread side-by-side with continuous scrolling.
Select to resize the page view that shows how the PDF is displayed when it is opened.
- Default Displays as per the default setting of the PDF viewer on a user’s machine
- 100% Makes the page appear in its actual size.
- Fit Page Makes the page width and height to fit within the document pane. .
- Fit Page Width Makes the width of the page fill the width of the document pane.
- Fit Page Height Makes the height of the page fill the height of the document pane.
Security
Protect your PDF by adding restrictions to open and read the file. Use the below options to avoid unauthorized access.
Select to restrict how users can interact with your PDF. Specify a password in the Owner Password field for the below restriction settings to work.
- Printing Select to allow a user to print the PDF.
- Draft quality printing Select to allow a user to print the PDF in a lower resolution.
- Content copying Select to allow a user to copy contents from the PDF.
- Annotations Select to allow a user to add a note or comment in the PDF.
- Content modifications Select to allow a user to alter the contents in the PDF.
- Content copying for accessibility Select to allow screen readers to read and navigate content in PDF.
Document assembly Select to allow users to insert pages in the PDF.
Note: The users need to enter the owner password to change any restrictions from the File > Properties in Adobe Acrobat.
Advanced
Use the following options to specify advanced settings to merge PDFs, use compression, select compliance standard, and more.
Note: A font can be embedded only if it contains a setting by the font vendor that permits it to be embedded. Ensure you have the required setting or license before embedding a font.
Use static text or language variables to publish the localized version of the watermark. Depending on your chosen language, the localized value is automatically picked in the PDF output. For example, you can print ‘Publisher’ as a watermark in English and ‘Auteure’ in French.
Format:
${lng:<variable name>}
. For example, $ {lng:publisher-label}
where publisher-label
is a language variable.Hover over {width="25"} near the option to view more details about it.
dc:description
, dc:language
, dc:title
, and docstate
are the default properties while you can have author
as the custom property. The selected metadata properties are passed to the PDF file generated using Native PDF.These properties are picked from the
metadataList
file available at:/libs/fmdita/config/metadataList
.This file can be overlaid at:
/apps/fmdita/config/metadataList
.Generate a PDF output generate-pdf-output
Once you have configured the output preset you can generate output from the Presets panel, using the Generate Preset feature.
-
Under the Author tab, select the Repository View.
This opens the Repository panel. -
In the Repository panel, open the DITA map file in Map View.
-
In the Output tab, click Presets to view the Preset panel.
To create or configure an output preset, see Create a PDF output preset. -
To save your settings, click the Save All icon in the upper-left corner of the standard toolbar in the Output view.
-
Click the Generate Preset icon on the top bar.
You can view a progress bar next to the selected output preset in the Output Presets panel. -
Once the output generation is complete, click View Output icon on the top bar to view the output.
A Success dialog box is visible at the lower-right corner of the screen.
If an output is not successful, the below error message is displayed.
{width="250"}
To view the error log, click Dismiss, hover over the selected preset tab, and click Options > View Log.
Download temporary files after generating the Native PDF output
If you select the Download temporary files option in the Advanced settings, you can also download the interim HTML files created while generating the Native PDF output. Once you’ve generated the output, you can download the temporary files using the Download temporary files icon on the top bar. This feature helps you view your interim HTML styles and layouts and helps you correct or change your CSS styles according to your requirements.
Use language variables
AEM Guides also provides the support for language variables. Select Language Variables {width="25"} in the left panel to define a localized version of the out-of-the-box labels like Note, Caution, and Warning or static text in the PDF output. For more details, see Support for language variables.
Support for Markdown documents
Experience Manager Guides also provides support for your Markdown documents. Markdown files are easy to author and also
provide a variety of formatting options. Learn how to author Markdown documents from the Web Editor.
You can add the Markdown topics to your DITA map and generate the PDF output using the Native PDF output presets. Learn how to configure or create a PDF output preset.