printpdf icon indicating copy to clipboard operation
printpdf copied to clipboard

Reusing SVG on few pages. Is it possible to make Svg cloneable?

Open beling opened this issue 3 years ago • 3 comments

I try to reuse the same SVG object on few pages. But I cannot find any better solution than just parse the same SVG file for each page. I found that all fields of Svg struct are clonable. Maybe it is save to just make Svg cloneable too?

BTW. Thank You for your great work on printpdf!

beling avatar Jan 12 '22 09:01 beling

Right now the SVG is stored on the pages /Resources dictionary, but you'd need it to be stored on the document (so that it is visible to multiple pages).

fschutt avatar Jan 16 '22 17:01 fschutt

Thank You. Is it possible to store SVG on the document in the current printpdf version?

beling avatar Jan 16 '22 18:01 beling

Currently no. Right now only per-page resources are allowed, I think I have to rework the API regarding that anyways.

fschutt avatar Jan 23 '22 17:01 fschutt