SmythOS SDK
    Preparing search index...

    Namespace Doc

    Doc provides an easy way to parse documents of different types. It can automatically choose the best parser for the file based on the file MIME type or file extension. Or let you explicitly choose a parser.

    const doc = await Doc.auto.parse('path/to/file.pdf');
    const doc = await Doc.pdf.parse('path/to/file.pdf');
    const doc = await Doc.docx.parse('path/to/file.docx');
    const doc = await Doc.md.parse('path/to/file.md');
    const doc = await Doc.text.parse('path/to/file.txt');

    Doc

    Variables

    auto
    docx
    md
    pdf
    text