Settings

Theme

A tool that converts PDFs to SVG, built using PDF.js

pramodhkp.github.io

59 points by async5 11 years ago · 12 comments

Reader

rcfox 11 years ago

I've used `pdftocairo -svg` (it's part of the Poppler[0] utilities) to do this in the past, but Cairo insists on converting all of the text to shapes. (They are/were planning to fix that, so maybe it's already fixed.) You've got all of the text there, so you're a step closer to what I wanted, but I noticed that the spaces are all missing. I'm actually pretty impressed that SVG can render properly without the spaces for the text.

[0] http://poppler.freedesktop.org/

NaNaN 11 years ago

The fonts are not kept. Any real use case?

PointerReaper 11 years ago

I really wonder about the utility of something like this tool. I enjoy and encourage building new things "just because" but I can help but think the point to PDFs is to have complete visual control of layout and formatting while providing the textual and tagging information layers is critical to transform and adapt the information for artificial intelligent agents and people with disabilities that rely upon assistive technologies such as screen readers.

ericthegoodking 11 years ago

I would be interested in knowing about the Sizes of SVG produced by this tool. Some of the SVGs converted by poppler utility tool 'pdftocairo' are just too large i.e few MB's which is absolutely unacceptable as these large SVG'S tends to crash the mobile browsers.

  • async5OP 11 years ago

    Original PDF - 1.0M, SVGs - 7.7M, gzip'ed SVGs - 1.7M. I think the latter is a preferable format for the web, so you are looking 70% increase for this types of documents, but bare in mind that you may send only certain pages.

rpedela 11 years ago

When would one need a SVG version of a PDF instead of just using pdf.js by itself?

  • nurbl 11 years ago

    I've had several cases where a drawing I want to edit is only available as PDF. There are various ways to convert between the formats (e.g. inkscape) but so far I haven't found one that always works.

    • samstave 11 years ago

      Highlight a PDF to copy to inkscape and convert to elements would be pretty damn bad ass.

  • async5OP 11 years ago

    Now you have alternative to not use PDF (viewer)?

fizz_ed 11 years ago

What about something that goes the other way?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection