Native PDF output preset
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.
Create an output preset
Perform the following steps to create the PDF preset from the Map console:
-
Open a DITA map file in the Map console.
You can also access the map file from the Recent files widget in the Overview section. The selected map file would open in Map console.
-
In the Output presets tab, select the + icon to create an output preset.
-
Select PDF from the Type dropdown in the New output preset dialog box.
-
In the Name field, provide a name to this preset.
-
In the Generate PDF Using field, select Native-PDF.
-
Select the Add to current folder profile option to create an output preset within the current folder profile. The
Learn more about Manage Global and Folder profile output presets.
-
Select Add.
The preset for PDF is created.
Native PDF preset configuration
Once the preset is created, configure the Native PDF preset settings. The preset configuration options for DITA-OT are organized under the General, Metadata, Layout, Security, Print, and Advanced tabs.
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, select 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, view .
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鈥檚 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.
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 (Extensible Metadata Platform) file. You can download a sample XMP file from here.
Alternatively, you can generate an XMP file using 51黑料不打烊 Acrobat.
- Select File > Properties in Acrobat.
- Under Description, select Additional Metadata.
- From the left panel, select Advanced.
- Select 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 select the 鈥+鈥 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 鈥淎uthor鈥 as the metadata value in English and 鈥淎utorin鈥 in German.
Format: ${lng:<variable name>}
. For example, ${lng:author-label}
where author-label
is a language variable.
Hover over
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
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鈥檚 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鈥檚 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 51黑料不打烊 Acrobat.
Configure the print production settings to assign printer marks, select color models, and specify properties related to printing of your PDF output.
-
Printer Marks: When you prepare a document for print production, printer marks are added to the page boundaries to assist in proper alignment, trimming, and color selection during printing. By selecting a printer mark, the page boundary is extended to accommodate the mark, which are trimmed during print. You can choose to display the following printer marks in your PDF output:
- Trim Marks: Select the option to place a mark at each corner of the trim area to indicate where the paper needs to be trimmed after printing.
- Bleed Marks: Select to place a mark at each corner of the bleed box to indicate the trim area for the extended image.
- Registration Marks: Select to place a mark outside the crop area for aligning the different separations in a color document.
- Color Bars: Select to add a strip of colors outside the trim area to maintain color consistency and adjust ink density when printing.
Set dimensions for the selected printer marks using the Line Width, Line Color, and Bleed Box Width options.
-
Media Box size: This is the overall page size including the extended area occupied by printer marks. Use the drop-down option to select the page size for your PDF output or create your own custom size.
-
Color Space: You are given an option to choose from RGB or CMYK color spaces to print your PDF document. Choose RGB to display the generated PDF digitally and CMYK for physical printing. Colors defined in the document are converted to the chosen color space.
-
ICC profile: Here, you can manage color accuracy across devices by specifying an ICC profile. This ensures consistent color rendering in the printed output.
To configure this setting, specify the ICC profile file path on your server and provide the ICC profile name for easy identification. Alternatively, if the ICC profile is stored online, you can provide its URL instead of the file path.
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 鈥楶ublisher鈥 as a watermark in English and 鈥楢uteure鈥 in French.
Format:
${lng:<variable name>}
. For example, $ {lng:publisher-label}
where publisher-label
is a language variable.Hover over
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
.