asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
330 stars 97 forks source link

"Asciidoc: Export as pdf" can't export mermaid diagram properly #339

Open edl7878 opened 4 years ago

edl7878 commented 4 years ago

Mermaid diagrams can preview properly.

But when export to pdf, some of them can't export properly, as blanks.

preview in vs code:

image

export as pdf:

image

the test file is attached: test.zip

danyill commented 4 years ago

Try setting data-uri and/or kroki-fetch-diagram in the document header. Does that help?

On Sun, 28 Jun 2020, 09:47 edl7878, notifications@github.com wrote:

Mermaid diagrams can preview properly.

But when export to pdf, some of them can't export properly, as blanks.

preview in vs code:

[image: image] https://user-images.githubusercontent.com/1988479/85932849-d8820f80-b89d-11ea-9b5d-7f443aa6956f.png

export as pdf:

[image: image] https://user-images.githubusercontent.com/1988479/85932864-036c6380-b89e-11ea-886c-503ed2dd5e53.png

the test file is attached: test.zip https://github.com/asciidoctor/asciidoctor-vscode/files/4841291/test.zip

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/asciidoctor/asciidoctor-vscode/issues/339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFEXXZAINVCFPQDLWNBSB3RYZSHRANCNFSM4OKGVZ5A .

edl7878 commented 4 years ago

3 diagrams are all mermaid created.

The first one is OK, the latter 2 are blank.

Do I still need to set data-uri and/or kroki-fetch-diagram?

ggrossetie commented 3 years ago

It might be because Mermaid used to generate diagrams without explicit height/width. It was fixed in: https://github.com/mermaid-js/mermaid/commit/184fcab0b78bfa0dea84432245663c5ccbb692b6

@edl7878 Do you still reproduce this issue?