All Projects → kartik1998 → pdf-images

kartik1998 / pdf-images

Licence: MIT License
The library aims to simplify pdf-conversion by providing wrappers over poppler / pdfImages & imageMagick to convert pdfs to images.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to pdf-images

lambda-resize-image
An AWS Lambda Function to resize images automatically with API Gateway and S3 for imagemagick tasks. When an image is called on AWS Api Gateway, this package will resize it and send it to the S3.
Stars: ✭ 56 (+366.67%)
Mutual labels:  imagemagick
MagickWand
Swift wrapper for ImageMagick (MagickWand) for Linux and MacOS
Stars: ✭ 38 (+216.67%)
Mutual labels:  imagemagick
pdfScale
Bash Script to Scale and Resize PDFs using Ghostscript
Stars: ✭ 131 (+991.67%)
Mutual labels:  imagemagick
metalsmith-convert
Convert images with imagemagick (via imagemagick-native).
Stars: ✭ 17 (+41.67%)
Mutual labels:  imagemagick
imgui
Dear ImGui Addons Branch = plain unmodified dear imgui plus some extra addon.
Stars: ✭ 348 (+2800%)
Mutual labels:  poppler
mozscreenshots
Take screenshots of Mozilla applications in various UI configurations
Stars: ✭ 17 (+41.67%)
Mutual labels:  imagemagick
FuzzImageMagick
Sample files for fuzzing ImageMagick
Stars: ✭ 15 (+25%)
Mutual labels:  imagemagick
racket-poppler
Racket bindings for Poppler (library for reading and generating pdfs)
Stars: ✭ 18 (+50%)
Mutual labels:  poppler
Dev-Tools-Magento-2-Module
A collection of utilities meant to improve the experience of developing modules for Magento without breaking existing functionality.
Stars: ✭ 18 (+50%)
Mutual labels:  imagemagick
image-optimisation-tools-comparison
A Benchmarking Suite for popular Image Optimisation Tools
Stars: ✭ 28 (+133.33%)
Mutual labels:  imagemagick
giftext
Convert texts to animated gifs
Stars: ✭ 44 (+266.67%)
Mutual labels:  imagemagick
magick-rust
Rust bindings for ImageMagick
Stars: ✭ 135 (+1025%)
Mutual labels:  imagemagick
favicon
💥 Favicon Generator using Node.js and Imagemagick
Stars: ✭ 33 (+175%)
Mutual labels:  imagemagick
codeigniter-image-magician
🎨 An ImageMagick library for CodeIgniter.
Stars: ✭ 13 (+8.33%)
Mutual labels:  imagemagick
imei
IMEI - ImageMagick Easy Install
Stars: ✭ 126 (+950%)
Mutual labels:  imagemagick
RCE-python-oneliner-payload
Python bind shell single line code for both Unix and Windows, used to find and exploit RCE (ImageMagick, Ghostscript, ...)
Stars: ✭ 23 (+91.67%)
Mutual labels:  imagemagick
srcset.sh
A command line script that generates multiple responsive versions of an image at width breakpoints -- 320,480,640,768,960,1024,1280,1440 pixels wide -- that match common Mobile and widescreen desktop/laptop viewports using Imagemagick's convert utility and outputs the needed <img/> tag
Stars: ✭ 20 (+66.67%)
Mutual labels:  imagemagick
fukuro
Lightweight and powerful next-gen imageboard software based on abandoned Tinyboard
Stars: ✭ 21 (+75%)
Mutual labels:  imagemagick
magickwand-crystal
Crystal C bindings for MagickWand library
Stars: ✭ 67 (+458.33%)
Mutual labels:  imagemagick
python-poppler
Python binding to Poppler-cpp pdf library
Stars: ✭ 51 (+325%)
Mutual labels:  poppler

pdf-images

Simplify pdf-conversion by using in built methods which use poppler & imageMagick to convert pdfs to images.

pdf-image

pdf2image

Note

linux: Ensure you have imagemagick and pdfImages installed
mac: Ensure you have imagemagick and poppler installed
windows: not supported
Poppler is very fast and shows results in milliseconds, however it's accuracy is low compared to image magick. If your pdf has images like for example images of of cards etc. then using poppler is a good idea, however if you have proper pdfs which are let's say converted from md files, then I would suggest using imagemagick.

Usage: Poppler

const { Poppler } = require('pdf-images');
const result = Poppler.convert('/pdf/path/sample_pdf.pdf', 'output/directory/path', 'outputName');
  • A successfull result will look something like:
{
  pdfPath: '/pdf/path/sample_pdf.pf',
  outputImagesDirectory: '/output/directory/outputName/',
  images: [
    '/output/directory/outputName/outputName-001.png',
    '/output/directory/outputName/outputName-002.png'
  ],
  success: true
}
  • An error response will look something like:
{
  pdfPath: '/pdf/path/sample_pdf.pf',
  error: <Err object>
}

Usage: ImageMagick

const { ImageMagick } = require('pdf-images');
const result = ImageMagick.convert('/pdf/path/sample_pdf.pdf', 'output/directory/path', 'outputName');
  • A successfull result will look something like:
{
  pdfPath: '/pdf/path/sample_pdf.pf',
  outputImagesDirectory: '/output/directory/outputName/',
  images: [
    '/output/directory/outputName/outputName-001.png',
    '/output/directory/outputName/outputName-002.png'
  ],
  success: true
}
  • An error response will look something like:
{
  pdfPath: '/pdf/path/sample_pdf.pf',
  error: <Err object>
}
  • To set the density and quality of imagemagick use:
ImageMagick.setQuality(100);
ImageMagick.setDensity(200);
  • Default ImageMagick quality is 100 and density is 200
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].