Skip to content

New document from SVG not supported #178

@Downchuck

Description

@Downchuck

SVG Read-in support does not appear to be working.

In PyMuPDF, this works fine:

doc = pymupdf.Document(stream=bytearray(svg_str, "utf-8"))

In MuPDF.js, it fails:

doc = mupdf.Document.openDocument(new TextEncoder().encode(svg), "svg");
Error: cannot find document handler for file type: 'svg'
doc = mupdf.Document.openDocument(new TextEncoder().encode(svg));
warning: ... repeated 6 times...
format error: cannot find version marker
warning: trying to repair broken xref
warning: repairing PDF document
... 
Error: no objects found
const doc = mupdf.Document.openDocument("./please.svg");
Error: cannot find document handler for file type: './please.svg'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions