Skip to content

Convert ANY link to a pdf with out messing up html with this simple api

Notifications You must be signed in to change notification settings

micaelillos/LinkToPdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Link to PDF



👩🏽‍💻 Turn any link to a pdf

What is this ?

This is an elegant and simple api that recieves any link and uses puppeteer to screenshot that link into png format and then uses imagemagick to convert to pdf the reason for this is because sometime when converting html to pdf it does not come out the desired way

How to use

Prequisistes

  1. Make sure to have imagemagick installed

If you do not have it installed run:

sudo apt install imagemagick

  1. Make sure you have nodejs installed

Usage

📌 First clone the repo:

git clone https://github.com/micaelillos/LinkToPdf.git

📌 Change Directory

cd LinkToPdf

📌 Next install dependecies

npm install

📌 Run project

npm run start

📌 To convert link to pdf enter this in a browser

http://localhost:4000/convert?link=[yourlink]

Example:

http://localhost:4000/convert?link=https://google.com

TODO

Add support for cropping & multiple pages

About

Convert ANY link to a pdf with out messing up html with this simple api

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published