Giter Club home page Giter Club logo

Comments (5)

mojavelinux avatar mojavelinux commented on September 27, 2024

This appears to be a limitation of prawn-svg. If I use Prawn and feed the image directly to the svg function provided by prawn-svg, the arrows are missing there too. Unless the feature of SVG that is required to draw the errors is supported by prawn-svg, they will not work in Asciidoctor PDF.

from asciidoctor-pdf.

mojavelinux avatar mojavelinux commented on September 27, 2024

Feel free to reopen once this issue is resolved upstream and we'll upgrade prawn-svg.

from asciidoctor-pdf.

janwesterkamp avatar janwesterkamp commented on September 27, 2024

Hi @mojavelinux, thanks for your analysis! I will create an issue upstream in prawn-svg to have it fixed there.

I am a little bit surprised that there are completely separate workflows for rendering and integrating BPMNs in the different output formats like PDF and HTML.
May be it could make sense to have this as a configuration option, so deviations could be limited and behaviour could be under user control. What you think about it?

In my current use case, I need to document the (arc42) software architecture and this error came up late, as it shows up on the PDF version in BPMN diagrams only.
For the deployment diagrams having hyperlink support would be my next challenge in the PDF version (opposed to the buggy marker functionality, this is not supported at all in prawn-svg yet, according to the documentation). However, the HTML workflow requires JavaScript tooling (bpmn-js-cmd, bpmn-js etc. with node), which will be not my first choice in every case...
The other use case for using these diagrams in EF Specification Working Groups, reviewers need to be aware of these separate workflows and check both versions of the documents (PDF and HTML).
With a configurable workflow/toolchain, this could help to choose the best (and single) one for a use case.

from asciidoctor-pdf.

mojavelinux avatar mojavelinux commented on September 27, 2024

Thanks for filing the issue upstream.

I'm not really sure how your additional commentary pertains to Asciidoctor PDF in any way. It sounds more like you're talking about the diagram extensions for Asciidoctor. Diagrams are not a core part of the AsciiDoc language and are thus served by extensions. Those extensions then use various diagramming tools to convert text-oriented diagrams into images. When the diagram extension feeds the generated images back into the processor (Asciidoctor), the converter will include them in the rendered document (regardless of whether that is HTML or PDF, the process is the same).

While it's true that there are lots of different diagram input formats, and lots of different tools to convert those inputs to images, that has absolutely nothing to do with Asciidoctor PDF and how it works. If the image is valid, it will be included. If the image library can't handle some part of it, that has to be dealt with upstream (as in this case).

If you are concerned about how much software is required to process diagrams, perhaps you might consider trying Asciidoctor Kroki, which provides a diagram server to alleviate those installation requirements. If you have questions about the diagram extensions, please direct them to the project chat at https://chat.asciidoctor.org. This issue tracker is not the place for this discussion.

from asciidoctor-pdf.

janwesterkamp avatar janwesterkamp commented on September 27, 2024

Oh, this was my misunderstanding and confusion, sorry: I thought asciidoctor-pdf does not make use of the SVG image files generated by the asciidoctor-diagram extension and used by the HTML version. But when it does and the rendering (which is done by the browser in the HTML version) by the prawn-svg is the issue because of limited functionality, this make sense.

My further analysis of the SVG source turned out, that the marker-element, may be in combination with the url is the root cause, because this is only used in the BPMN originated SVG, not in the ones like from other diagram sources as ditaa or PlantUML (because low level functionality as polygon-elements are used to draw arrows only), so let's see the outcome on the prawn-svg project.

from asciidoctor-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.