Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plantuml diagram is not correctly rendered #102

Closed
gembin opened this issue Apr 2, 2015 · 9 comments
Closed

Plantuml diagram is not correctly rendered #102

gembin opened this issue Apr 2, 2015 · 9 comments
Assignees
Labels

Comments

@gembin
Copy link

gembin commented Apr 2, 2015

<dependency>
    <groupId>rubygems</groupId>
    <artifactId>asciidoctor-diagram</artifactId>
    <version>1.2.1</version>
    <type>gem</type>
    <scope>provided</scope>
    <exclusions>
        <exclusion>
            <groupId>rubygems</groupId>
            <artifactId>asciidoctor</artifactId>
        </exclusion>
    </exclusions>
</dependency> 

rendered:

screen shot 2015-04-02 at 6 28 08 pm

should be:

screen shot 2015-04-02 at 6 28 25 pm

@mojavelinux
Copy link
Member

Could you provide the source of the diagram? There's a chance this has to do with a bug in the Prawn SVG support (see https://github.com/mogest/prawn-svg). We've seen similar rendering problems in the past (which have always been addressed in a timely manner with a proper example). I'll verify on my end that it's a problem embedding the diagram, then we can proceed by filing an issue upstream.

@gembin
Copy link
Author

gembin commented Apr 2, 2015

Oh, sorry, I forgot to paste the source.

[plantuml, seq-diagram-1, svg]
-----

Alice->Bob : hello
note left: this is a first note

Bob->Alice : ok
note right: this is another note

Bob->Bob : I am thinking
note left
    a note
    can also be defined
    on several lines
end note
-----

@mojavelinux
Copy link
Member

I generated the SVG of the diagram and then used Prawn + Prawn SVG alone to embed the SVG using the following code:

require 'prawn'
require 'prawn-svg'

Prawn::Document.generate 'test.pdf' do
  svg IO.read('seq-diagram-1.svg'), at: [0, cursor]
end

I can confirm that this is an issue with Prawn SVG because that produces the same result you are seeing. If that doesn't work, it won't work in Asciidoctor PDF. It seems like the problem is with the polygon fills. This is a great test case for Prawn SVG and it should be possible to get it resolved there.

@mojavelinux
Copy link
Member

When you fill the issue at https://github.com/mogest/prawn-svg, be sure to link to it here so we can track the progress.

@gembin
Copy link
Author

gembin commented May 4, 2015

Resolved by Prawn SVG in in version 0.17.0.

@gembin gembin closed this as completed May 4, 2015
@mojavelinux
Copy link
Member

Great news!

Does this mean we need to upgrade prawn-svg in Asciidoctor PDF? (See https://github.com/asciidoctor/asciidoctor-pdf/blob/master/asciidoctor-pdf.gemspec#L43).

@mojavelinux
Copy link
Member

I'm going to assume the answer is yes. I'll update.

@mojavelinux mojavelinux added this to the v1.5.0 milestone May 4, 2015
@mojavelinux mojavelinux self-assigned this May 4, 2015
@gembin
Copy link
Author

gembin commented May 6, 2015

Yes need to upgrade prawn-svg.

@mojavelinux
Copy link
Member

mojavelinux commented May 6, 2015 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants