New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pdftopic

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdftopic

NODEJS This package allows you to convert a PDF to any image format (png, jpg, gif, ...) in very good quality

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
decreased by-18.26%
Maintainers
1
Weekly downloads
 
Created
Source

PDFTOPIC By Ilyes-El-Majouti

Documentation en français

Ce package permet de convertir un PDF en n'importe quels formats d'image (png, jpg, gif, ...) en très bonne qualité. le package avec la meilleure qualité de rendu, après avoir essayé plusieurs packages les qualités de rendu était horrible du coup j'ai décidé de créer ce package qui ressoudera ce souci a plus d'une personne 😉.

Si vous voulez une version pour convertir avec express js envoyez moi un message sur github ou faite un issues pour me le faire savoir

Comment l'utiliser ?

Avant tout il faut installer le package sur npm ou github avec la commande suivante

npm install pdftopic

Ensuite après avoir installé le package il vous suffira d'importer dans votre code Javascript la partie suivante pour cet exemple je souhaite convertir un fichier PDF en format PNG

const { pdftobuffer } = require('pdftopic');
const fs = require('fs');

const pdf = fs.readFileSync('./ilyes.pdf', null);

pdftobuffer(pdf, 0).then((buffer) => {
    fs.writeFileSync('./ilyes.png', buffer, null);
})

Résultat après avoir exécuté le code

Ensuite tu trouveras ton fichier converti avec ton extension pour ma part PNG

Avant

preview in file pdf

Après

preview convert file

Vous retrouverez les fichiers sur le github (https://github.com/Ilyes-El-Majouti/pdftopic)

Liker si vous avez aimé le code ça me ferait très plaisir 💪😉



Documentation in English

This package allows you to convert a PDF to any image formats (png, jpg, gif, ...) in very good quality. the package with the best rendering quality, after trying several packages the rendering qualities were horrible so I decided to create this package which will solve this problem for more than one person 😉.

If you want a version to convert with express js send me a message on github or do an issues to let me know

How to use it ?

First of all you have to install the package on npm or github with the following command

npm install pdftopic

Then after installing the package, you just need to import the following part into your Javascript code. For this example, I want to convert a PDF file to PNG format.

const { pdftobuffer } = require('pdftopic');
const fs = require('fs');

const pdf = fs.readFileSync('./ilyes.pdf', null);

pdftobuffer(pdf, 0).then((buffer) => {
    fs.writeFileSync('./ilyes.png', buffer, null);
})

Result after running the code

Then you will find your converted file with your extension for my part PNG

Before

preview in file pdf

After

preview convert file

You will find the files on the github (https://github.com/Ilyes-El-Majouti/pdftopic)

Like if you liked the code it would make me very happy 💪😉



Documentación en español

Este paquete te permite convertir un PDF a cualquier formato de imagen (png, jpg, gif, ...) en muy buena calidad. el paquete con la mejor calidad de renderizado, después de probar varios paquetes las calidades de renderizado eran horribles, así que decidí crear este paquete que resolverá este problema para más de una persona 😉.

Si desea una versión para convertir con express js, envíeme un mensaje en github o haga un problema para avisarme

Comment l'utiliser ?

En primer lugar, debe instalar el paquete en npm o github con el siguiente comando

npm install pdftopic

Luego, después de instalar el paquete, solo necesita importar la siguiente parte en su código Javascript para este ejemplo. Quiero convertir un archivo PDF a formato PNG.

const { pdftobuffer } = require('pdftopic');
const fs = require('fs');

const pdf = fs.readFileSync('./ilyes.pdf', null);

pdftobuffer(pdf, 0).then((buffer) => {
    fs.writeFileSync('./ilyes.png', buffer, null);
})

Resultado después de ejecutar el código

Luego encontrará su archivo convertido con su extensión para mí PNG

Antes

preview in file pdf

Después

preview convert file

Encontrará los archivos en github (https://github.com/Ilyes-El-Majouti/pdftopic)

Like si te gusto el código me haría muy feliz 💪😉

Keywords

FAQs

Package last updated on 08 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc