pdf-scrapo

1.0.0-a • Public • Published

PDF-Scrapo.js

PDF-Scrapo.js, scrapes PDF.

[!IMPORTANT] PDF-Scrapo.js is JS library for parsing and processing PDF files, nothing much than this.

Usage

npm install pdf-scrapo

or

yarn add pdf-scrapo

an example here for example usage:

const { readPDFFile, parsePDF, processParsedText, replace, saveToFile, processPDF, getParsedText } = require('pdf-scrapo.js');

const inputFilePath = 'input.pdf';
readPDFFile(inputFilePath);

const parsedText = parsePDF();
console.log('Parsed Text:', parsedText);

const styledText = processParsedText('Italic');
console.log('Styled Text:', styledText);

const translatedText = [
    'Bu basit bir PDF\'dir',
    'Bu kalın metin',
    'Bu italik metin'
];

const replacedText = replace(parsedText, translatedText);
console.log('Replaced Text:', replacedText);

const outputFilePath = 'output_translated.pdf';
saveToFile(outputFilePath);

processPDF(inputFilePath, 'output.txt');

all the functions that PDF-Scrapo.js has:

  1. readPDFFile
  2. parsePDF
  3. processParsedText
  4. replace
  5. saveToFile
  6. processPDF
  7. getPdfData as pdfData
  8. getParsedText as parsedText

Package Sidebar

Install

npm i pdf-scrapo

Weekly Downloads

2

Version

1.0.0-a

License

GPL-3.0-only

Unpacked Size

42.3 kB

Total Files

6

Last publish

Collaborators

  • kuaracomputersciencelaboratories