Place any content: Basics (“Place Content” via HTML templates)
Settings options for Fixups of type “Place content on page”
In the “Edit Fixup” window, you can see the following options.
- The Fixup type in this case is “Place content on page”
- Under Folders, you can select the folder containing all HTML files, styles and scripts required to use HTML templates. The folders shown in the image below are supplied as standard. Click on Open folder with configuration files to view the corresponding location within the file system. The orange triangle allows you to use variables here and for all other relevant settings.
- In this field you can specify a horizontal offset (relative to the point specified under 6.) Negative values move the element to be placed downward.
- This field is used to specify a vertical offset (relative to the point specified under 6.) Negative values move the element to be placed to the left.
- Under Unit, you can choose between pt, mm and inches.
- The Relative to option lets you set the reference point or reference area: Bottom left corner, left side of page, upper left corner, top of page, right side of page, bottom right corner, bottom of page and center of page.
- Of relates to page geometry spaces to be used as the starting point (CropBox, TrimBox, BleedBox, MediaBox, ArtBox.)
- If you want to rotate the placed content, you can enter a figure under Rotation (degrees).
- Activate the “Create on layer” checkbox to place the content on a new, separate layer.
- You can also enter the layer name here.
- The Place option lets you specify whether the content should be placed in the foreground or the background.
- Apply to relates to page areas such as “All”, “Page is an even page,” “Page is an odd page,” and many others.
- You can specify scripts and variables under Variables.
- The List view provides an overview, even when the available settings are very extensive.
- Apply this fixup to: This can be limited to “Current file” and/or “Embedded files”.
- This setting lets you lock the Fixup to protect it against changes.
- The Name of the fixup should reflect its intended purpose.
- The Comment field allows you to describe the Fixup in greater detail.
Folder and file structure for HTML, styles and scripts
For the use of HTML templates to place content, in this example we see folders and files for the fonts, scripts and styles used (each of which is optional), as well as the obligatory index.html. The content in the Temp files folder is updated every run:
- The HTMLTemplates folder will be created by the pdfToolbox in the folder for the callas pdfToolbox version currently in use, under Repositories/Custom/Folder with a time stamp.
- This will include - depending on the library - a number of predefined examples such as “Add colorbar - cmyk”. It will include the following folders and files:
- The fonts folder, containing all fonts required for the HTML template,
- The index.html file which is required in all cases,
- The styles folder for CSS files.
Naturally, the folder names for “fonts”, “scripts” and “styles” can be changed depending on the template.
After the first run using a given HTML template, pdfToolbox will create the callas_temp folder.
This folder contains temporary files and will be recreated each time the Fixup is run.
The following files will be included here: “calsDocInfo.js” (contains information regarding the running of the “Place content” Fixup; see Use information about the PDF document); the index.pdf file (the PDF content generated using the HTML template); and pdfChip.log (a log file).
Important: The user can create folders for their own Place Content Fixups using any name, such as an “images” folder for images. These folders must be referenced within index.html to allow pdfToolbox to access them.
Supplied examples for “Place content on page” using HTML templates
callas software supplies a number of “Place content on page”-type Fixups with the standard version of pdfToolbox which use HTML templates.
This includes three Fixups for adding color bars in CMYK, grayscale and spot colors, as well as Fixups for dimension arrows, document names, fold marks (letter), job ID and registration marks.