@effortlessmotion/pdf-to-md
    Preparing search index...

    Type Alias PdfToMdErrorCode

    PdfToMdErrorCode:
        | "PDF_OPEN"
        | "PAGE_RANGE"
        | "PAGE_RENDER"
        | "OCR_PAGE_FAILED"
        | "WORDS_INPUT"
        | "ANALYSIS_INPUT"

    The closed set of error codes every PdfToMdError carries — switch on code instead of parsing message.

    Type Declaration

    • "PDF_OPEN"

      input missing/unreadable/not a PDF

    • "PAGE_RANGE"

      malformed page selection (validated before any work)

    • "PAGE_RENDER"

      rendering an opened, in-range page to PNG failed

    • "OCR_PAGE_FAILED"

      the OCR engine crashed twice on one page (message names it)

    • "WORDS_INPUT"

      malformed word-dump input (--words-json / extractOcr words)

    • "ANALYSIS_INPUT"

      malformed Analysis handed to toMarkdown/toText (e.g. an out-of-range wordIndexes entry) — validated fail-fast, whole object checked before any output.