Szpadel / Chrome Headless Render Pdf
Stars: ✭ 164
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Chrome Headless Render Pdf
Pdfsave
Convert websites into readable PDFs
Stars: ✭ 46 (-71.95%)
Mutual labels: cli, pdf, pdf-generation
Md To Pdf
Hackable CLI tool for converting Markdown files to PDF using Node.js and headless Chrome.
Stars: ✭ 374 (+128.05%)
Mutual labels: cli, pdf, pdf-generation
Openpdf
OpenPDF is a free Java library for creating and editing PDF files with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository. ⛺
Stars: ✭ 2,174 (+1225.61%)
Mutual labels: pdf, pdf-generation
Ptext Release
pText is a library for reading, creating and manipulating PDF files in python.
Stars: ✭ 124 (-24.39%)
Mutual labels: pdf, pdf-generation
Phpchrometopdf
A slim PHP wrapper around google-chrome to convert url to pdf or to take screenshots , easy to use and clean OOP interface
Stars: ✭ 127 (-22.56%)
Mutual labels: pdf, pdf-generation
Play Pdf
A PDF module for the Play framework
Stars: ✭ 108 (-34.15%)
Mutual labels: pdf, pdf-generation
Labelmake
Declarative style JavaScript PDF generator library. Works on Node and the browser 🖨︎
Stars: ✭ 112 (-31.71%)
Mutual labels: pdf, pdf-generation
Etherpad Lite
Etherpad: A modern really-real-time collaborative document editor.
Stars: ✭ 11,937 (+7178.66%)
Mutual labels: pdf, pdf-generation
Laravel Pdf
A Simple package for easily generating PDF documents from HTML. This package is specially for laravel but you can use this without laravel.
Stars: ✭ 79 (-51.83%)
Mutual labels: pdf, pdf-generation
Pdfcreatorandroid
Simple library to generate and view PDF in Android
Stars: ✭ 128 (-21.95%)
Mutual labels: pdf, pdf-generation
Svglib
Read SVG files and convert them to other formats.
Stars: ✭ 139 (-15.24%)
Mutual labels: pdf, pdf-generation
Lancia
网页转PDF渲染服务。提供收据、发票、报告或任何网页内容转PDF的微服务
Stars: ✭ 108 (-34.15%)
Mutual labels: pdf, chrome-headless
Pdf Generator
Cordova plugin to generate pdf in the client-side
Stars: ✭ 98 (-40.24%)
Mutual labels: pdf, pdf-generation
Wasm Pdf
Generate PDF files with JavaScript and WASM (WebAssembly)
Stars: ✭ 163 (-0.61%)
Mutual labels: pdf, pdf-generation
Vectorgraphics2d
Graphics2D implementations to export various vector file formats
Stars: ✭ 87 (-46.95%)
Mutual labels: pdf, pdf-generation
Report
Report management package in PHP that aims to help you export information in a variety of formats
Stars: ✭ 125 (-23.78%)
Mutual labels: pdf, pdf-generation
Go Audio
An offline solution to convert pdfs into audiobooks
Stars: ✭ 153 (-6.71%)
Mutual labels: cli, pdf
Unipdf
Golang PDF library for creating and processing PDF files (pure go)
Stars: ✭ 1,171 (+614.02%)
Mutual labels: pdf, pdf-generation
Usage:
chrome-headless-render-pdf [OPTIONS] --url=URL --pdf=OUTPUT-FILE [--url=URL2 --pdf=OUTPUT-FILE2] ...
Options:
--help this screen
--url url to load, for local files use: file:///path/to/file
--pdf output for generated file can be relative to current directory
--chrome-binary set chrome location (use this options when autodetection fail)
--chrome-option set chrome option, can be used multiple times, e.g. --chrome-option=--no-sandbox
--remote-host set chrome host (for remote process)
--remote-port set chrome port (for remote process)
--no-margins disable default 1cm margins
--include-background include elements background
--landscape generate pdf in landscape orientation
--window-size specify window size, width(,x*)height (e.g. --window-size 1600,1200 or --window-size 1600x1200)
--paper-width specify page width in inches (defaults to 8.5 inches)
--paper-height specify page height in inches (defaults to 11 inches)
--page-ranges specify pages to render default all pages, e.g. 1-5, 8, 11-13
--scale specify scale of the webpage rendering (defaults to 1)
Example:
Render single pdf file
chrome-headless-render-pdf --url http://google.com --pdf test.pdf
Render pdf from local file
chrome-headless-render-pdf --url file:///tmp/example.html --pdf test.pdf
Render multiple pdf files
chrome-headless-render-pdf --url http://google.com --pdf test.pdf --url file:///tmp/example.html --pdf test2.pdf
This tool can be also used programmatically:
const RenderPDF = require('chrome-headless-render-pdf');
RenderPDF.generateSinglePdf('http://google.com', 'outputPdf.pdf');
const RenderPDF = require('chrome-headless-render-pdf');
RenderPDF.generateMultiplePdf([
{'http://google.com', 'outputPdf.pdf'},
{'http://example.com', 'outputPdf2.pdf'}
]);
const RenderPDF = require('chrome-headless-render-pdf');
RenderPDF.generatePdfBuffer('http://google.com')
.then((pdfBuffer) => {
console.log(pdfBuffer);
});
you can also use it from typescript or es6
import RenderPDF from 'chrome-headless-render-pdf';
RenderPDF.generateSinglePdf('http://google.com', 'outputPdf.pdf');
Motivation
google-chrome currently have option to render pdf files when used with headless option. But this option contains hardcoded adding header and footer to page rendering it unusable for pdf generation. This module allows to generate it without those elements.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].