HTML based custom reports
To adjust PDF-reports easily, HTML-based custom reports can be used. The visual appearance is controlled by a HTML-Template and Custom Style Sheets (CSS), while the reported details are directly requested from pdfaP-ilot or (optionally) parsed from an internally created XML-report.
Structure of related files
A predefined HTML-template is contained in all installer packages for Desktop and Server/CLI.
This predefined template can be found in:
- Server/CLI: ../cli/var/Reports/Templates
- Desktop/PlugIn: User Preferences/callas software/pdfaPilot version/Reports/Templates (using Desktop/PlugIn, a HTML-based report must have been generated at least once, in order to have these these files created)
The predefined template contains several folders and files
- index.html the template in HTML format
- manifest.xml a XML file which defines information needed as content for the report, to be delievered by the pdfaPilot engine
- /css contains a style sheet
- /fonts contains used fonts
- /img contains used images
Note: It is highly recommended to create a copy of the original template in a separate folder when starting to adjust a HTML-template based report.
Note: The HTML converter is using WebKit, so it is recommended to use Safari (or Chrome, which is based on a spin-off of WebKit) as a browser.
Request basic informations about PDF
If contained, document information and results of the performed profile will be available for using them in the HTML template.
Preview images of pages
x:results x:preview resolution=150 page=1/ /x:results
Rendering of images of one or more pages for visual represenation of the PDF in the report.
Visual comparision of original and processed file
x:compare x:document_a resolution=20/ x:document_b resolution=20/ x:diffresult resolution=20/ /x:compare
Include compare tree if comparison resources are used inside index.html.
resolution resolution used in ppi for rendering the comparision
Keep the temporarily generated files
x:settings x:keeptemptrue/x:keeptemp /x:settings
false files become deleted (default)
true files will not become deleted
Creating a XML report for additional content
x:results x:xmlreport path=xml/report.xml inkcovres=72 inkcovbox=TrimBox/ /x:results
inkcovres resolution in ppi, used for determining the effective ink coverage of each page in the PDF (optional, default: 300)
inkcovbox page geometry box of which the effective ink coverage will be determined (optional, default: CropBox)
The HTML template
The HTML template can easily be modified using an appropriate code-editor or enhanced text-editor.
The provided HTML-template already contains some dummy data, which is automatically replaced by actual content when a new report is gener-ated. So, when doing adjustments to the template with custom profiles and PDF files, it is recommended to keep the temporarily generated files for debugging, as a basis for modifications and their review in a browser.
- Note: It is possible to use image formats (like JPEG or PNG) as well as PDFs for positioning visual content like logos. If you want to debug your HTML in an HTML Browser you may want to display an image instead of the PDF reference. You can do this by putting identically named files for images and PDF next to each other. The PDF file must be referenced in the img tag in the HTML-template. The usage of PDF files allows for higher quality of logos in the resulting PDF report.
How the HTML-template works
The provided HTML-template contains already all document and process-ing information which can be supplied directly from the application.
Examples for template modification
callas software is providing a number of sample templates, which can be downloaded as tewo ZIP archives from the links below.