pdf-to-markdown icon indicating copy to clipboard operation
pdf-to-markdown copied to clipboard

Standalone version

Open Sevenanths opened this issue 7 years ago • 5 comments

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.

Sevenanths avatar Aug 16 '17 17:08 Sevenanths

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

jzillmann avatar Aug 16 '17 18:08 jzillmann

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

Sevenanths avatar Aug 16 '17 19:08 Sevenanths

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!

jzillmann avatar Aug 23 '17 07:08 jzillmann

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

morsmodr avatar Jun 16 '21 23:06 morsmodr

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:

  • core - this holds the core code written in typescript, the plan is to publish this one on npm
  • ui - this is a replacement for the current UI and it makes use of the core

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!

jzillmann avatar Jun 17 '21 00:06 jzillmann