THotPDF.LinearizeOutput 属性

控制是否将新生成的文档以按依赖排序的线性化布局写入,以便在 HTTP 字节范围传输上快速显示首页

声明

// Delphi
property LinearizeOutput: Boolean;

// C++Builder
__property bool LinearizeOutput;

默认值

False

输出布局

当在 BeginDoc 和 EndDoc 之前启用时,HotPDF 执行一次有界的布局遍历,然后以线性化顺序直接写入目标流

兼容性和限制

Delphi 示例

PDF := THotPDF.Create(nil);
try
  PDF.FileName := 'fast-view.pdf';
  PDF.Version := pdf17;
  PDF.LinearizeOutput := True;
  PDF.BeginDoc;
  PDF.Canvas.TextOut(72, 72, 'First page');
  PDF.EndDoc;
finally
  PDF.Free;
end;

C++Builder 示例

std::unique_ptr<THotPDF> pdf(new THotPDF(nullptr));
pdf->FileName = L"fast-view.pdf";
pdf->Version = pdf17;
pdf->LinearizeOutput = true;
pdf->BeginDoc();
pdf->Canvas->TextOut(72, 72, L"First page");
pdf->EndDoc();

相关 API