Skip to content

BetaHuhn/vercel-pdf-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

vercel-pdf-converter

GitHub Version Dependencies

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/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 

πŸ“š 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/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:

example

πŸ’» Development

Issues and PRs are very welcome!

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

❔ About

This project was developed by me (@betahuhn) in my free time. If you want to support me:

Donate via PayPal

License

Copyright 2020 Maximilian Schiller

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