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

Fail to render dashed lifelines in sequence diagrams in PDF exports in v1.2025.0 #348

Open
tobiasfrejo opened this issue Jan 9, 2025 · 4 comments

Comments

@tobiasfrejo
Copy link

Describe the bug
Using the 2025.0 version Docker images (both tomcat and jetty), exporting to PDF gives black bars in sequence diagrams. This does not happen when using version 2024.8. I have not verified if it is a problem outside Docker.

It seems to be a problem in the SVG to PDF conversion not recognizing "transparent" as a valid CSS color for the fill property, even though it should be.

To Reproduce
Steps to reproduce the behavior:

  1. Run the docker container (either jetty or tomcat): docker run --rm -d --name plantuml -p 8080:8080 plantuml/plantuml-server:jetty-v1.2025.0
  2. Open the frontend in any browser http://localhost:8080
  3. Create a simple sequence diagram:
@startuml
Bob --> Alice : hello
@enduml
  1. Export as PDF
  2. See black bars in resulting file
  3. See errors in docker logs plantuml:
[ERROR] Transcoder - null
Enclosed Exception:
file:/tmp/pdf16504147914529593112.svf:
The attribute "fill" represents an invalid CSS value ("transparent").
Original message:
The "transparent" identifier is not a valid value for the "fill" property.

Expected behavior
The exported PDF looks like the preview and what was

Screenshots
Expected layout of exported PDF (as shown in the preview)
Screenshot from 2025-01-09 17-16-47

Actual exported PDF (here opened in Firefox. Looks the same in other PDF viewers)
Screenshot from 2025-01-09 17-17-11

Desktop (please complete the following information):

  • OS: Ubuntu 24.04 LTS
  • Browser Firefox 134.0
@arnaudroques
Copy link
Contributor

Thanks for the feedback!

This issue is likely caused by the following change: plantuml/plantuml#2024

@michaelomichael Since "transparent" isn’t being recognized (even though it should be), do you think we could use #00000000 as an alternative?

@michaelomichael
Copy link

@arnaudroques There was some translation going on in one of the layers which would automatically convert the magic string "#00000000" to "none". The latter was incompatible with hit targets, hence I avoided using "#00000000" and went with "transparent" instead. (I thought that transparent would be the cleanest way to indicate that we genuinely wanted the shapes to be filled-but-transparent, but obviously it's not as well supported as I thought it would be! 😢)

I would guess that using a different zero-alpha value (e.g. "#FFFFFF00"), instead of "transparent", would satisfy all the functional requirements. That seems a bit unnatural from a coding perspective, though, so you might have some other ideas on how to communicate the concepts of "don't fill this" vs "fill it but make it completely transparent" between the different layers of the sequence diagram code?

@arnaudroques
Copy link
Contributor

@michaelomichael Thanks for the idea! I've made a test using #FFFFFF00 and just committed the modification.

Could you check if it's still working for you?

@michaelomichael
Copy link

@arnaudroques Yes, the tooltips still work as expected with this change.

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

No branches or pull requests

3 participants