Huge SVG border for blur effect

0 votes
asked Jul 1, 2021 in Question / help by barryr (120 points)
I'm trying to display only selected packages from a UML by hiding the packages I don't want to show. The output SVG page is still the same page size but with empty space, so I used "inkscape" to try and convert to PDF with "inkscape -D" which should crop the output to the elements in the drawing.

This worked except the object is now centred in a huge empty space - about three times the size of the visible object itself. Looking at the generated SVG I tracked this down to the "filter" section which specifies a 300% x 300% at (-1,-1) area for the feGaussianBlur filter. 120% is sufficient to show all the drop shadow with default styling, and for drop shadow below and on the right an x,y of (0,0). This should be calculable from the offset and blur of the Gaussian blur process (although a true Gaussian process goes to +Inf, its all over after a few standard deviations...).

There's other solutions to my original problem - Instead of hiding parts I could break my big UML down into parts and render each separately to SVG (which results in a page of the right size when converted to PDF), or I could switch the shadows off. Thanks for making PlantUML so flexible that I keep finding ways to do thing that I want to do!

FYI I need well-cropped PDF because the next stage is inclusion into LaTeX as a figure (and I tried the -tpdf option and its not as beautiful as the SVG output).

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...