glass-loupe

PDFMiner reduced to be lighter weight for parsing text-only PDFs.

Usage no npm install needed!

<script type="module">
  import glassLoupe from 'https://cdn.skypack.dev/glass-loupe';
</script>

README

Reading a PDF File


const LoupePdf = require('glass-loupe');

LoupePdf.readFile('path/to/file.pdf', (err, textBoxes)=>{
  if (err) // Handle Error
  
  textBoxes.map((ea)=>{
    
    console.log(ea);
    
    /*
      Each entry is a coordinate and text.
    
     {
       x : some_integer,
       y : some_integer,
       t : "some text"
     }
    */
    
  });
  
});