-
Notifications
You must be signed in to change notification settings - Fork 122
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
Render PDF to SVG #149
Comments
It seems like pdf_render is not far away from generating a svg. I will see if I can do it. |
It can totally generate a SVG and you can load the SVG to render it.. |
Really? I've only seen pdf2img converting pdf to a rasterized picture. |
The debug print for |
OK I will try. |
I've got text rendering (mostly) correct. The way I render text is
I am working on other elements of PDFs. |
You can actually link most fonts directly in SVG. |
Not really. One can embed pfa fonts into a pdf, which is not supported by a modern browser. pfa (or any other) font -> svg font -> ttf font seems to be a shortcut, when there is no good tool to convert a pfa font on the web. I am working on other drawing, and I got some transparency issue. I will open another issue in pdf-render. You can find my code here https://github.com/ZZYSonny/pdf_render |
Hello, recently I was writing a PDF viewer that would work exactly as a normal web page, and you can enjoy all the feature of a browser (such as awesome touchpad scrolling/zooming). Try it out here https://zzysonny.github.io/StarShooter/
The way I am rendering a page is to generate a SVG picture for each page, using mupdf. Then Chrome can directly and efficiently (when generated in a proper way) render a complex SVG file. When you zoom in using touchpad, Chrome can rerender at a higher resolution instantly.
Currently I am modifying mupdf to achieve an efficiently-renderable pdf, but that is painful and I am considering a rust pdf library. Will you be interested in implementing a PDF -> SVG renderer?
The text was updated successfully, but these errors were encountered: