FastReport .NET supports exporting reports to many popular formats, such as PDF, Excel, Word, and others. However, professional printing, plotters, and specialized printing equipment often require the PostScript (.ps) format.
PostScript is a page description language developed by Adobe Systems. It provides highly accurate rendering of vector graphics and text, making it a standard in the printing and industrial publishing industries. Unlike PDF, PostScript consists of a set of instructions for the output device, allowing precise control over every element of the page layout.
In this article, we will look at exporting a FastReport .NET report to the PostScript format, using a practical example to examine parameter configuration and programmatic implementation.
Â
Â
As an example, let's use the "Employee List" report:
On the toolbar, click the "Save" button. Then, in the drop-down menu, point to "Print" and select "PostScript file...".
The export settings include:
Â
Â
The same result can also be achieved programmatically. The following example demonstrates how to configure and export the "Employee List" report using code:
// Create a new report instance Report report = new Report(); // Load the report report.Load(@"C:\Reports\MainReport.frx"); // Prepare the report report.Prepare(); // Create a PostScript export object PSExport psExport = new PSExport(); // Text as Curves psExport.TextInCurves = true; // Separate Files for Pages psExport.PagesInDiffFiles = false; // Save Pictures Separately psExport.SaveImagesSeparately = false; // JPEG Quality psExport.Quality = 100; // Export All Tabs psExport.ExportAllTabs = false; // Open After Export psExport.OpenAfterExport = true; // Export the report to a file using the specified settings report.Export(psExport, "ResultReport.ps");
As shown in the screenshot, the file created programmatically is identical to the one produced through the interactive export process.
Â
Â
We have explored two ways to export reports to PostScript: through the user interface for one-time tasks and through code for automation. The PostScript format remains an essential tool for professional printing, and FastReport .NET makes it easy to integrate PostScript export into your applications.