Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/misaelnieto/web_to_pdf_action
Export any webpage to PDF
https://github.com/misaelnieto/web_to_pdf_action
Last synced: 2 months ago
JSON representation
Export any webpage to PDF
- Host: GitHub
- URL: https://github.com/misaelnieto/web_to_pdf_action
- Owner: misaelnieto
- License: mit
- Created: 2020-05-25T20:30:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T08:34:03.000Z (about 2 years ago)
- Last Synced: 2024-10-16T08:33:24.655Z (3 months ago)
- Language: JavaScript
- Size: 252 KB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webpage to PDF action
A [GitHub Action](https://github.com/features/actions) to convert any webpage to a PDF document.
Internally uses Puppeteer's mojo to get the page and render it to print it to PDF.
## Inputs
* `webPageURL`: This is the URL of the page. **Required**.
* `outputFile`: Path to the generated PDF file. **Required**.
* `usePuppeteer`: If you need to use Puppeteer or your chrome.
* `useScreen`: If you want to use the option emulateMediaType to generate with screen media and not print media
* `pdfOptions`: PDF options as described on [Puppeteer's documentation](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions). This is optional.## ✨ Example Usage
```yml
- name: html to pdf
uses: misaelnieto/web_to_pdf_action@master
with:
webPageURL: https://www.noenieto.com/resume/
outputFile: ./path/to/my/resume.pdf
usePuppeteer: true
useScreen: true
pdfOptions: '{"format": "Letter", "margin": {"top": "10mm", "left": "10mm", "right": "10mm", "bottom": "10mm"}}'
```## You may also like ...
[Fifsky's HTML to PDF action](https://github.com/fifsky/html-to-pdf-action).