pdfextract API
    Preparing search index...

    Function toMarkdown

    • Render structured text as Markdown: headings as # lines by level, detected tables as pipe tables with the first row as header (as HTML tables where cells merge, which pipe tables cannot show; tables chooses), other blocks as paragraphs on one line each (words hyphenated at a line end rejoined; lines: 'preserve' keeps the page's lines). Running headers and footers are kept unless furniture is false. Works on any StructuredText, including one restored from JSON. Structure is inferred from the layout, not read from tagged PDF.

      Parameters

      Returns string

      const markdown = toMarkdown(await pdf.getStructuredText());