TQRHotPDFExportFilter походить від TQRExportFilter, тому входить у звичайний workflow MyReport.ExportToFilter(MyExporterInstance) без змін у core QuickReport Оскільки TQRExportFilter не є descendant TComponent (це plain class у дизайні QuickReport), IDE component registration немає - callers створюють TQRHotPDFExportFilter напряму через Create('out.pdf')

QuickReport adapter (Lib\Addons\QuickReport\qrHotPDFExport.pas)

 

FastReport adapter  ReportBuilder device  DevExpress adapter

Export filter QuickReport, який використовує HotPDF як underlying PDF backend замість власного QRPDFFilter QuickReport Призначений для projects, які вже embed HotPDF і хочуть єдиний PDF backend для всього application

 

Delphi declaration:

type

TQRHotPDFExportFilter походить від TQRExportFilter, тому входить у звичайний workflow MyReport.ExportToFilter(MyExporterInstance) без змін у core QuickReport Оскільки TQRExportFilter не є descendant TComponent (це plain class у дизайні QuickReport), IDE component registration немає - callers створюють TQRHotPDFExportFilter напряму через Create('out.pdf')

  public

    constructor Create(Filename: string); override;

    procedure SetOutputStream(AStream: TStream);

    property Title, Author, Subject, Keywords: string;

    property PDFVersion: TPDFVersType;

    property Compressed: Boolean;

    property CompressionLevel: TPDFCompressionLevel;

  end;

 

Опис

TQRHotPDFExportFilter походить від TQRExportFilter, тому входить у звичайний workflow MyReport.ExportToFilter(MyExporterInstance) без змін у core QuickReport Оскільки TQRExportFilter не є descendant TComponent (це plain class у дизайні QuickReport), IDE component registration немає - callers створюють TQRHotPDFExportFilter напряму через Create('out.pdf')

 

QuickReport renderить кожну prepared page у TMetafile, cached у QRPrinter.PageList Замість re-implementing повного callback set TextOut / AcceptGraphic / AcceptBand для кожного component, adapter ігнорує їх (no-op overrides) і забирає per-page metafiles у Finish:

 

1. Start(PaperWidth, PaperHeight, Font) - створює instance THotPDF, задає metadata, викликає BeginDoc і зберігає (PaperWidth, PaperHeight), щоб Finish міг правильно сформувати pages

2. NewPage / EndPage / TextOut / AcceptGraphic - no-op (the metafile already has the rendered content).

3. Finish - для кожного cached metafile QRPrinter.PageList[i] додає (або reuse) HotPDF page розміром PaperWidth / PaperHeight у points і викликає ShowEnhancedMetafile Потім EndDoc і release

 

Властивості

Title / Author / Subject / Keywords - metadata документа Коли Title порожній, adapter fallback до Filename, тому PDF завжди має непорожній title Set before ExportToFilter is called

PDFVersion - PDF specification level the document should target. Defaults to pdf17.

Compressed - HotPDF stream compression on (default True). Set False for diagnostic PDFs.

CompressionLevel - FlateDecode level. Defaults to clDefault.

SetOutputStream(AStream) - направляє PDF bytes у AStream замість запису на disk Викликайте до ExportToFilter Internally використовується temp file, бо HotPDF saves on EndDoc; bytes stream back in Finish

 

Typical workflow

 

Filter := TQRHotPDFExportFilter.Create('Report.pdf');

try

  Filter.Title := 'Monthly Statement';

  Filter.PDFVersion := pdf17;

  QuickRep1.ExportToFilter(Filter);

finally

  Filter.Free;

end;

 

Capabilities preserved

Vector and raster page content rendered by QuickReport's standard preview / printer pipeline. GDI-resolved text strings. Page sizing follows the PaperWidth / PaperHeight handed to Start by QuickReport.

 

Limitations of the metafile bridge

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

 

Packaging note

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

 

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