Skip to content

πŸ“„β–² Vercel function which generates PDFs

License

Notifications You must be signed in to change notification settings

haxtheweb/pdfFrom

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

pdfFrom

Vercel function which generates PDFs from Webpages.

πŸ‘‹ Introduction

This repo contains the code for a simple Vercel function which generates a PDF file from any webpage using a headless Chrome instance.

πŸš€ Get started

Deploy with Vercel

Or setup manually:

Clone this repository:

git clone https://github.com/haxtheweb/pdfFrom

Install all dependencies:

yarn install

Login to your Vercel account and setup a project:

vercel

Run the function locally:

yarn run develop

Deploy to Vercel in production:

yarn run deploy 

πŸ“š Usage

After you've deployed the function, you can use it by placing your function's domain infront of any URL:

to-pdf.vercel.app/https://github.com/haxtheweb/pdfFrom

The function will then generate a PDF of that URL and return it as a downloadable file.

Here is how this GitHub Page looks as a PDF:

example

πŸ’» Development

Issues and PRs are very welcome!

This project adheres to Semantic Versioning. To see differences with previous versions refer to the CHANGELOG.

License

Copyright 2022 ELMS: Learning Network

Project based off of work from: https://github.com/BetaHuhn/vercel-pdf-converter Copyright 2020 Maximilian Schiller

This project is licensed under the MIT License - see the LICENSE file for details.

About

πŸ“„β–² Vercel function which generates PDFs

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 62.0%
  • CSS 23.5%
  • HTML 14.5%