document.convert

Emit plain text or markdown from a PDF, text, or markdown input. PDFs use the embedded text layer only (no OCR).

Config

type DocumentConvertConfig = {
  format: 'txt' | 'md'; // default 'txt'
};

Example

// pipeline
{
  id: 'convert',
  type: 'document.convert',
  config: { format: { value: 'md' } },
}

// queue
tk.runQueue(files, 'document').convert({ format: 'md' });