Skip to content

yakupcemilk/PDF-Scrapo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

PDF-Scrapo, scrapes from PDF.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published