Skip to content

Commit 1b749ca

Browse files
committed
Refactor PdfEngine to use queued task orchestration
Refactors PdfEngine and related orchestrator code to enqueue all PDF operations through a WorkerTaskQueue, ensuring serialized and prioritized execution. Removes legacy encoder pool logic and introduces CompoundTask for aggregating multi-page operations such as annotation and search. Updates type signatures and progress reporting for improved consistency and extensibility. Adds CompoundTask utility to models for advanced task composition.
1 parent c9b5045 commit 1b749ca

9 files changed

Lines changed: 739 additions & 392 deletions

File tree

packages/engines/src/lib/orchestrator/pdf-engine.ts

Lines changed: 292 additions & 189 deletions
Large diffs are not rendered by default.

packages/engines/src/lib/orchestrator/remote-executor.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ type MessageType =
4747
| 'initialize'
4848
| 'destroy'
4949
| 'openDocumentBuffer'
50-
| 'openDocumentFromLoader'
5150
| 'getMetadata'
5251
| 'setMetadata'
5352
| 'getDocPermissions'
@@ -226,10 +225,6 @@ export class RemoteExecutor implements IPdfExecutor {
226225
return this.send<PdfDocumentObject>('openDocumentBuffer', [file, options]);
227226
}
228227

229-
openDocumentFromLoader(fileLoader: any, password?: string): PdfTask<PdfDocumentObject> {
230-
return this.send<PdfDocumentObject>('openDocumentFromLoader', [fileLoader, password]);
231-
}
232-
233228
getMetadata(doc: PdfDocumentObject): PdfTask<PdfMetadataObject> {
234229
return this.send<PdfMetadataObject>('getMetadata', [doc]);
235230
}

0 commit comments

Comments
 (0)