-
Notifications
You must be signed in to change notification settings - Fork 58
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
<mask> element not supported #148
Comments
Hi @Alwinator, thanks for the report. prawn-svg doesn't handle The SVG you have there is very strange, though. It has two 2048x2048 PNG images in it, one of them being the icon you see above in the prawn-svg output (the blue icon with a black background), and the other being identical but using white instead of blue and used as a mask on the first image so that it doesn't draw its black background. Given that it could be expressed as a simple path that is not terribly good! I would like to implement |
@mogest Thank you! I have just analysed the SVG file and, as you mentioned, it is really weird. Especially, because the original PDF is vector graphic only and does not include a PNG. I will take a more detailed look at the other parts of my pipeline. |
@mogest I have tried many other PDF to SVG converters and unfortunately, all other converters are generating SVGs with |
I've made an implementation of in the mask branch. It works with the example in the SVG spec, but does not appear to be working with the above SVG—perhaps because it uses an image to create the mask. Will require more investigation. |
I am using a pipeline that generates a PDF using asciidoctor-pdf. It looks roughly like this:
Many PDF documents > PDF to SVG converter > AsciiDoc with included SVG images > PDF file
On the last step, when asciidoctor-pdf generates the PDF I am getting the following error. Since asciidoctor-pdf is based on prawn-svg I think the error is referred to this repository.
The error in the logs:
This is the SVG that is included in the asciidoctor file. On GitHub, it is rendered as it should. Download SVG
Input SVG / Expected output
This is a screenshot of the final PDF. As you can see, it has a weird black background that it should not have:
Actual Output
I am not sure what the problem is, but I thought maybe the converter generates "newer" PDFs than prawn-pdf supports, what do you think?
The text was updated successfully, but these errors were encountered: