ebook-convert pdf plugin does not render dasharray
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Version: 3.21
Platform: Ubuntu
Problem: Attempting to convert an epub to PDF using ebook-convert. The epub file contains inline SVG with <line> elements that have a stroke-dasharray attribute. The example SVG on MDN's stroke-dasharray page exhibits the problem[1].
Root cause: in calibre/
Solution: Add a check for Qt.CustomDashLine and if present, use the pen.dashPattern() and pen.dashOffset() values for the dashArray and dashPhase parameters to the 'd' operator respectively.
Caveat: Once you make this change, you'll also need to make sure to reset the dash style for the next path. I've found that always setting the dash style solves this problem.
[1] https:/
[2] https:/
Created PR 951 to fix this issue. https:/ /github. com/kovidgoyal/ calibre/ pull/951