zopefoundation / z3c.rml

An alternative implementation of RML
Other
100 stars 51 forks source link

SVG as vectorial graphics #65

Open rapto opened 5 years ago

rapto commented 5 years ago

SVG images are parsed and translated into rlg (reportlab graphics). It is a pity that the result is then rasterized instead of embedded in the PDF result. I have used a trivial plugin to achieve this result by pre-processing the rml file, but someone more experienced would find it easy to get this result "in the core". I would happily help in the coding and testing.

strichter commented 3 years ago

@rapto I will happily accept a pull request.

strichter commented 3 years ago

I just looked at the code and trying to make that happen in the <image> tag is probably not the right solution. I think that a new <vectorImage> or <vImage> tag should be implemented that knows how to draw a graphic.

rapto commented 3 years ago

It is a common case using the <image> to insert user logos, that can be png, jpeg or svg... Why would not it be the right solution? Maybe the detection could be made early in order to create the object with a different factory. I have not had time to understand the source code, sorry. Are there some docs I can look at?