Use article link markers for PDF indexing
This commit is contained in:
1 parent
09af3bd8c0
commit
33f15d9ce0
20 files changed
+1137
-293
No files matched your search
@@ -1,4 +1,7 @@
|
||||
import { type GPConfig, processPdfConfig } from "./pipeline.ts";
|
||||
import { type GPConfig } from "./pipeline.ts";
|
||||
import { PublicationInput } from "../document/inputs.ts";
|
||||
import { PdfOutput } from "../document/outputs.ts";
|
||||
import { convertDocument } from "../document/types.ts";
|
||||
import type { TemplateVariables } from "../template/engine.ts";
|
||||
|
||||
type WorkerRequest = {
|
||||
@@ -26,7 +29,10 @@ const workerGlobal = self as unknown as {
|
||||
workerGlobal.onmessage = async (event: MessageEvent<WorkerRequest>) => {
|
||||
const { id, config, options } = event.data;
|
||||
try {
|
||||
await processPdfConfig(config, options);
|
||||
await convertDocument(
|
||||
new PublicationInput(config, options.variables),
|
||||
new PdfOutput(config, options),
|
||||
);
|
||||
workerGlobal.postMessage({ id, ok: true } satisfies WorkerResponse);
|
||||
} catch (error) {
|
||||
workerGlobal.postMessage(
|
||||
|
||||
Reference in new issue
Block a user