Exporting to Adobe PDF
The Adobe Portable Document Format (PDF) is a well-established file format standard and a widely-accepted method of distributing reports.
The following topics discuss how to export Logi reports to Adobe PDF:
- Exporting a Report Manually
- Exporting a Report Automatically
- Adding Exported Headers and Footers
- Forcing Page Breaks in Exports
- Special Considerations for Java Apps
- Hiding Elements When Exporting
- Exporting More Info Rows
- Cascading Style Sheet Support
- Debugging Exports
- Export Considerations
- Export Errors
About Exporting Reports to PDF
The PDF format is useful because of its ability to faithfully reproduce the appearance of a document, including graphics, images, and text, so that it can be easily viewed using the Adobe Reader program or browser plug-in. Notice the emphasis on "document" - PDF was not initially designed as a format for reproducing browser content and it doesn't always do so very well. Even though PDFs can be viewed within a browser, the two technologies are quite different.
For example, recent browser versions and Logi products support doctype declarations, which serve to tell the browser how to handle content layout, how to apply style, and more. Report pages can look quite different with different doctype selections. However, the PDF format does not support doctype declarations, and therefore can't represent everything exactly as the browser does. So, exported report pages may not look exactly like they do in the browser if a doctype has been applied.
What does this mean? It means developers and users should be realistic in their expectations about just how faithfully a Logi report can be reproduced when exported as a PDF document.
Chart Canvas charts are exported as SVG objects rather than as images. This results in Chart Canvas charts exported to PDF having extremely high resolution - they can be zoomed or printed with high-quality at any resolution.
Logi Studio provides the Action.Export PDF element so that Logi reports can be exported to PDF files.
Developers can give users the ability to export a report in two ways: manually (to a PDF viewed in their own browser) or automatically (to a PDF file) based on an event or schedule. Manual exports are configured within report definitions and automated exports are configured within process definitions.
The PDF export engine uses the Gecko-based rendering technology developed by Mozilla and found in the Firefox browser, resulting in Chart Canvas charts being exported as SVG objects rather than as images. This means that Chart Canvas charts exported to PDF have extremely high resolution - they can be zoomed or printed with high quality at any resolution.
Exporting Links
By default, links in reports are not enabled when they're exported to PDF. However, "live links", which are those that do not use Action.Link, can be enabled in the PDF output. To enable them, set the Target.PDF element's Show Links attribute to True.
Live links are created by using a Label element, with its Format attribute set to HTML, and adding <a> tags around the text in its Caption. Here's an example of a valid Caption attribute value for this purpose:
<a href="https://www.logianalytics.com">Visit the Logi Analytics web site</a>
A complete URL must be specified, as shown, not a relative URL.
Exporting Report Titles and Filter Information
By default, report titles and filter information are not included in PDF exports. To enable this functionality, set the global constants rdIncludeReportTitleInExport and rdIncludeFilterInfoInExport to True.
Specifying a Custom Temp File Location
In .NET Info applications, the PDF rendering engine used during exports writes temporary files to the C:\Windows\Temp folder by default. However, some anti-virus tools will flag multiple file-writing operations to this folder as potentially dangerous behavior and block them. Developers who encounter this situation can tell the
PDF rendering engine
to write temporary files elsewhere by adding a section to the Info application's web.config file:
<configSections>
<section name="ABCpdf9.Section" type="WebSupergoo.ABCpdf9.ConfigSection, ABCpdf" allowLocation="true" allowDefinition="Everywhere" allowExeDefinition="MachineToLocalUser" overrideModeDefault="Allow"
restartOnExternalChanges="true" requirePermission="true" />
</configSections>
<ABCpdf9.Section>
<Preferences>
<clear />
<add Key="TempDirectory" Value="C:\my_PDF_Temp_Folder" />
</Preferences>
</ABCpdf9.Section>
Add the code above that starts with <ABCpdf9.Section> just after the </configSections> section closing tag, as shown. Provide your own custom folder value for the TempDirectory key.
Ensure that your custom temp folder already exists - the rendering engine will not create it.
Comments
0 comments
Please sign in to leave a comment.