import schema from '@stencila/schema'; import * as vfile from '../../util/vfile'; import { Codec, CommonEncodeOptions } from '../types'; export declare class PdfCodec extends Codec { /** * The media types that this codec can decode/encode. */ readonly mediaTypes: string[]; /** * Decode a PDF file to a Stencila `Node`. * * Usually the decoded node will be an `Article`. * However, due to the way that this codec embeds * nodes in PDFs, it could be any node type, including a * `Datatable` or even a `number`. * * @param file The PDF file to decode * @returns A promise that resolves to a `Node` */ readonly decode: (file: vfile.VFile) => Promise; /** * Encode a Stencila `Node` to a `VFile` with PDF content. * * @param node The Stencila `Node` to encode * @param filePath The file system path to write the PDF to * @returns A promise that resolves to a `VFile` */ readonly encode: (node: schema.Node, options?: CommonEncodeOptions) => Promise; }