Skip to content

Latest commit

Β 

History

History
76 lines (45 loc) Β· 1.67 KB

README.md

File metadata and controls

76 lines (45 loc) Β· 1.67 KB

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.