مرجع HotPDF

يفك ترميز stream PDF محمَّل عبر سلسلة الفلاتر الكاملة الخاصة به، ويكتب المرحلة الأخيرة مباشرة إلى stream مملوك للمستدعي

التصريح

function DecodeLoadedStreamToStream(AStream: THPDFStreamObject;
  Output: TStream; out Info: THPDFDecodePipelineInfo): Boolean; overload;
function DecodeLoadedStreamToStream(AStream: THPDFStreamObject;
  Output: TStream; CancellationToken: THPDFCancellationToken;
  out Info: THPDFDecodePipelineInfo): Boolean; overload;

الوحدة

HPDFDoc

الوحدة

المرجعالمرجع
AStreamالمرجعTHPDFStreamObjectالمرجع/Filterالمرجع
Outputالمرجع
CancellationTokenالمرجع
Infoالمرجع

الوحدة

يُعيد True فقط عندما تنجح كل مرحلة مطلوبة

الوحدة

الوحدة

THPDFDecodePipelineInfo = record
  Status: THPDFDecodePipelineStatus;
  InputBytes: Int64;
  OutputBytes: Int64;
  FilterCount: Integer;
  AppliedFilterCount: Integer;
  CustomFilterCount: Integer;
  CustomFilterFailureCount: Integer;
  PipelineDepth: Integer;
  StopBeforeLast: Boolean;
  FailedFilter: AnsiString;
  Diagnostic: AnsiString;
end;

يميّز Status بين الـ streams والفلاتر غير الصالحة، وحدود عدد الفلاتر والعمق، والمراجع الدائرية، والـ streams التكرارية (recursive)، والفلاتر غير المدعومة، وفشل الميزانية، وفشل مفكّك الترميز، والفشل المخصَّص، والإلغاء، وانتهاكات عقد الـ seek

الوحدة

Output := TFileStream.Create('payload.bin', fmCreate);
try
  if not PDF.DecodeLoadedStreamToStream(StreamObject, Output, Info) then
    raise Exception.Create(String(Info.Diagnostic));
finally
  Output.Free;
end;

الوحدة