jzillmann / pdf-to-markdown

A PDF to Markdown converter
https://pdf2md.morethan.io
MIT License
1.17k stars 189 forks source link

Standalone version #2

Open Sevenanths opened 7 years ago

Sevenanths commented 7 years ago

Hello!

I was wondering if it would be possible to create a standalone version of pdf-to-markdown to use in other projects. The current project includes the generation of the page etc as well. Just the converter would be nice to have.

Example

PdfDocument = PDFJS.getDocument(...);  
Converter = new PdfToMarkDown();  
var Markdown = Converter.makeMarkdown(PdfDocument);

Would be forever grateful! Thanks in advance.

jzillmann commented 7 years ago

Hey @Sevenanths , you mean as a kind of library you can just install using npm, etc.. ?

Sevenanths commented 7 years ago

Not even! Just a regular old JS file you can include in your HTML.

jzillmann commented 7 years ago

Hey @Sevenanths , neat idea, but that would take me some time since i still consider myself a js newbie... And since i've currently no use for, i wouldn't invest time into it... But if you find somebody who is willing to work on it, i could give support to him!

morsmodr commented 3 years ago

I can help take this one sometime in July. What do you think @jzillmann

jzillmann commented 3 years ago

Hey @morsmodr that would be neat yes. Notice however that is kind of in the process, just with an major overhaul.

There is this branch: https://github.com/jzillmann/pdf-to-markdown/tree/modularize The new code is distributed to 2 folders:

Right now ui and core are not cleanly separated. ui just reads the files from core, so that needs to be cleaned up as well. Let me know what you think and if you have any questions!