EF.FOP
Support for generating documents by FOP (Formatting Objects Processor)
<seealso href="http://xmlgraphics.apache.org/fop/"> Apache FOP Project </seealso>
EFopEngineError class
Exception raised by the FOP report engine on configuration or document-generation errors.
TEFFopReport class
Non-visual component that drives the Apache FOP engine to generate PDF (or PCL/PS/TXT/RTF) documents from an XSL-FO file, or from an XML data file plus an XSL stylesheet, and optionally previews or prints them.
function GetOutpustring: string;Returns the output file name to be generated: the explicit OutputFile if set, otherwise the XSL-FO (or XML) file name with the output extension.
function GetOutputFileExt: string;Returns the output file extension matching the current FOPOutputType (e.g. '.pdf', '.rtf').
procedure Print;Generate file by FOP engine and call OnPrintDocument event.
procedure Preview;Generate file by FOP engine and call OnShowDocument event to open it.
procedure Build;Generate file by FOP engine.
constructor Create(AOwner : TComponent);Creates the component, defaulting FOPBatch to FOP.BAT and the output type to PDF.
property FOPBatch : string read FFOPBatch write FFOPBatch;Name of the FOP batch/command file used to launch the engine (default 'FOP.BAT').
property DebugMode : boolean read FDebugMode write FDebugMode default False;When True, runs the FOP engine with the -d (debug) option.
property FOPPath : string read FFopPath write SetFopPath;Folder that contains the FOP engine batch file. When a file name is assigned at design time, its path is extracted.
property XMLDataFile : string read FXMLDataFile write SetXMLDataFile;XML data file to transform (used together with XSLReportFile). Setting it clears XSL_FOFile.
property XSLReportFile : string read FXSLReportFile write SetXSLReportFile;XSL stylesheet used to transform XMLDataFile into XSL-FO. Setting it clears XSL_FOFile.
property XSL_FOFile : string read FXSL_FOFile write SetXSL_FOFile;Ready-made XSL-FO file to render directly. Setting it clears XMLDataFile and XSLReportFile.
property OutputFile : string read FOutputFile write SetOutputFile;Explicit output file name; its extension also determines FOPOutputType. If empty, the name is derived from the input file.
property BeforeGenerateXML : TNotifyEvent read FBeforeGenerateXML write FBeforeGenerateXML;Fired before XML generation begins.
property OnGenerateXML : TNotifyEvent read FOnGenerateXML write FOnGenerateXML;Fired to let the application generate the XML data file to be transformed.
property BeforePrint : TNotifyEvent read FBeforePrint write FBeforePrint;Fired before the document is printed.
property AfterPrint : TNotifyEvent read FAfterPrint write FAfterPrint;Fired after the document has been printed.
property BeforePreview : TNotifyEvent read FBeforePreview write FBeforePreview;Fired before the document is previewed.
property AfterPreview : TNotifyEvent read FAfterPreview write FAfterPreview;Fired after the document has been previewed.
property OnShowDocument : TDocumentEvent read FOnShowDocument write FOnShowDocument;Fired to display the generated document. If unassigned on Windows, the file is opened with the default associated viewer.
property OnPrintDocument : TDocumentEvent read FOnPrintDocument write FOnPrintDocument;Fired to print the generated document. Must be assigned for Print to work, otherwise an exception is raised.
property ShowCommand : Boolean read FShowCommand write FShowCommand default False;When True, shows the batch command line before executing it.
property DeleteXMLAfterCreate : Boolean read FDeleteXMLAfterCreate write FDeleteXMLAfterCreate default False;When True, deletes the XML data file after the output document has been generated.
property DeleteAfterShow : Boolean read FDeleteAfterShow write FDeleteAfterShow default False;When True, deletes the output file after it has been shown.
property DeleteAfterPrint : Boolean read FDeleteAfterPrint write FDeleteAfterPrint default False;When True, deletes the output file after it has been printed.
property BeforeCreatePDF : TNotifyEvent read FBeforeCreatePDF write FBeforeCreatePDF;Fired before the output document is generated by the engine.
property AfterCreatePDF : TNotifyEvent read FAfterCreatePDF write FAfterCreatePDF;Fired after the output document has been generated by the engine.
property FOPOutputType : TFopOutputType read FFOPOutputType write FFOPOutputType default otPdf;Output document format produced by the engine (default otPdf).
