This repo contains the code for a simple Vercel function which generates a PDF file from any webpage using a headless Chrome instance.
Clone this repository:
git clone https://github.com/BetaHuhn/vercel-pdf-converter
Install all dependencies:
npm install
Login to your Vercel account and setup a project:
vercel
Run the function locally:
npm run develop
Deploy to Vercel in production:
npm run deploy
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/BetaHuhn/vercel-pdf-converter
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:
Issues and PRs are very welcome!
This project adheres to Semantic Versioning. To see differences with previous versions refer to the CHANGELOG.
This project was developed by me (@betahuhn) in my free time. If you want to support me:
Copyright 2020 Maximilian Schiller
This project is licensed under the MIT License - see the LICENSE file for details.