PdfCompressionTask class abstract

A single optimisation job. The source bytes remain owned by the caller.

Web jobs use a dedicated instance of the configured PDF render-worker script, so cancelling a job never interrupts the viewer's workers. Hosts must bundle the current worker and configure pdfRenderWorkerScriptUrl (normally through registerBundledEditorAssets). Worker failures are reported through result; optimisation never falls back to the UI thread.

Constructors

PdfCompressionTask()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasStarted bool
Whether the worker has acknowledged starting the optimisation. Remains true after completion if work started successfully.
no setter
result Future<PdfCompressionResult>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → void
Terminates the worker and completes result with PdfCompressionCancelledException. Harmless after completion.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

start(Uint8List bytes, {PdfCompressionOptions options = const PdfCompressionOptions()}) PdfCompressionTask