TfrxHotPDFExport

Export filter PDF для FastReport 4 / FastReport VCL, який використовує HotPDF як underlying PDF backend замість власного built-in PDF writer FastReport Призначений для projects, які вже embed HotPDF і хочуть єдиний PDF backend для всього application

 

QuickReport adapter  ReportBuilder device  DevExpress adapter

Export filter PDF для FastReport 4 / FastReport VCL, який використовує HotPDF як underlying PDF backend замість власного built-in PDF writer FastReport Призначений для projects, які вже embed HotPDF і хочуть єдиний PDF backend для всього application

 

Delphi declaration:

type

  TfrxHotPDFExport = class(TfrxCustomExportFilter)

  published

    property Compressed: Boolean default True;

    property Title, Author, Subject, Keywords: string;

    property PDFVersion: TPDFVersType default pdf17;

    property CompressionLevel: TPDFCompressionLevel default clDefault;

    property RenderDPI: Integer default 200;

  end;

 

Опис

TfrxHotPDFExport походить від TfrxCustomExportFilter, тому входить у звичайний workflow MyReport.Export(MyExportInstance) без змін у core FastReport Unit викликає RegisterComponents('FastReport 4.0 Export Filters', [TfrxHotPDFExport]), тому filter з'являється в IDE component palette після додавання unit до package

 

Замість re-implementing повного per-object PDF emitter FastReport, adapter routes кожну prepared page через enhanced-metafile importer HotPDF:

 

1. Start creates a fresh THotPDF instance and sets the document metadata (Title / Author / Subject / Keywords / PDFVersion / Compression).

2. StartPage sizes the new HotPDF page in points to match the FastReport report page's millimeter dimensions.

3. ExportObject is a no-op (the whole page is captured at FinishPage time, not per-object).

4. FinishPage renderить prepared FastReport page у TMetafile через Report.PreviewPages.DrawPage, потім програє metafile через importer HotPDF ShowEnhancedMetafile з auto-scaling

5. Finish викликає EndDoc і копіює temp PDF у caller-supplied Stream, якщо потрібно

 

Властивості

Compressed - HotPDF stream compression on (default True). Set False for diagnostic PDFs (~5x larger files).

Title / Author / Subject / Keywords - metadata документа Коли Title порожній, adapter fallback до Report.Name, тому PDF завжди має непорожній title

PDFVersion - рівень PDF specification, на який має орієнтуватися документ За замовчуванням pdf17

CompressionLevel - FlateDecode level. Defaults to clDefault.

RenderDPI - pixel density, що використовується під час rasterising FastReport page через TMetafileCanvas Вище значення дає чіткіший text і lines, але більший metafile і PDF 96 є native screen DPI FastReport; 200 (default) дає print-quality results без надмірних файлів

 

Typical workflow

 

Exp := TfrxHotPDFExport.Create(nil);

try

  Exp.FileName := 'Report.pdf';

  Exp.Title := 'Monthly Statement';

  Exp.PDFVersion := pdf17;

  Exp.RenderDPI := 200;

  frxReport1.Export(Exp);

finally

  Exp.Free;

end;

 

Capabilities preserved

Vector і raster page content (text, lines, rectangles, fills, bitmaps), rendered стандартним layout engine FastReport GDI-resolved text strings (HotPDF embeds Windows-resolved fonts через regular HotPDF font subset path) Document-level metadata

 

Limitations of the metafile bridge

Оскільки pages capture як enhanced metafiles, PDF features, специфічні для FastReport і залежні від structural information (AcroForm fields, named destinations, document outlines, PDF/A або PDF/X conformance gates), не переносяться Output є точним visual reproduction того, що FastReport renderить на screen / printer, а не structured PDF Projects, яким потрібен AcroForm output або PDF/A conformance, мають використовувати native API HotPDF напряму

 

Packaging note

Adapter знаходиться в Lib\Addons\FastReport4\ і не входить до основних packages HotPDF*.dpk, тому dependency FastReport підтягується лише projects, які opt in до adapter Smoke test (smoke_frx_hotpdf.dpr) лежить поруч з unit

 

See also: TQRHotPDFExportFilter, TppHotPDFDevice, dxHotPDFExportReportLink, THPDFPage.ShowMetafile, Enhanced EMF/WMF Support