Skip to content

Automatically determine output width #816

Open
@Zannick

Description

@Zannick

My flowchart is very wide, but when mmdc outputs to png, it expects me to supply my own value for width. If I don't, it defaults to something so small that the result is illegible (--help says width default is 800; the file actually produced is 784x52). However, when I output to svg, the svg document includes a calculated max-width of 19769.9px, so I know it's possible to calculate.

Proposed solution
Either mmdc on its own should default to max-width, or there should be a flag to force it, such as: mmdc -w auto or mmdc -w max or mmdc --maxwidth.

Alternatives tried
My workaround is to output to svg, take the max-width from that, and output again as png with -w <max-width>.
I've not found any other easy way to create the max-width png on the live editor.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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