Skip to content
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

Some parts that exist in PDF are missing in SVG #106

Closed
pstricks-fans opened this issue May 5, 2019 · 6 comments

Comments

@pstricks-fans
Copy link

commented May 5, 2019

It is not so convenient to attach the test project here, so let me give you the link to my repository. Here is https://github.com/pstricks-fans/dvisvgm-errors.

The problem is

The picture of Stephen Hawking that is available in the PDF becomes missing in the SVG.
The same issue for the radar, the axes that is available in the PDF also becomes missing in the SVG.

Please check it out. Thank you.

@agrahn

This comment has been minimized.

Copy link

commented May 5, 2019

dvisvgm doesn't convert bitmaps wrapped into PDF/EPS, such as https://github.com/pstricks-fans/dvisvgm-errors/blob/master/hawking.eps , to SVG. Instead, provide to-be-embedded bitmapped graphics as PNG files. They are not converted to inline SVG and must be shipped alongside the SVG written by dvisvgm.

@pstricks-fans

This comment has been minimized.

Copy link
Author

commented May 5, 2019

@agrahn How about the radar (missing axes)?

@mgieseki

This comment has been minimized.

Copy link
Owner

commented May 5, 2019

The conversion of PDF files is still experimental and doesn't yet support all object types allowed there. It might also be possible that Ghostscript doesn't forward all actions being performed to dvisvgm. In this case there wouldn't be much I could do. However, I have to look into the issue first.
Nonetheless, when converting the radar example from DVI or EPS format, all dots and axes are present in the SVG.

@mgieseki mgieseki self-assigned this May 6, 2019

@mgieseki mgieseki added the bug label May 6, 2019

@mgieseki

This comment has been minimized.

Copy link
Owner

commented May 6, 2019

The blue axes and white dots are missing in the radar example due to a bug in dvisvgm's PostScript layer. I'll fix it with the next release.
As Alexander already wrote, dvisvgm doesn't support bitmaps embedded in EPS or PDF files. Thus, hawking.pdf can't be converted completely.

@mgieseki mgieseki added this to the 2.7.1 milestone May 6, 2019

@mgieseki mgieseki closed this in 2145ada May 7, 2019

@agrahn

This comment has been minimized.

Copy link

commented May 7, 2019

It seems that SVG-1.2 does not support inline bitmap. Am I right?

@mgieseki

This comment has been minimized.

Copy link
Owner

commented May 7, 2019

It should be possible to inline PNG or JPEG data as Base64 stream, e.g.

<image x="0" y="0" width="300" height="100" xlink:href="data:image/png;base64,<BASE64_DATA>"/>

I haven't tested it yet, though.

The much more challenging task would be to extract the bitmap data from the EPS/PDF file because PS operator image accepts pretty complex data structures to describe a bitmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.