Browsershot - Convert html to an image, pdf or string

  •        1792

Browershot is a package can convert a webpage to an image or pdf. The conversion is done behind the scenes by Puppeteer which controls a headless version of Google Chrome.


use Spatie\Browsershot\Browsershot;

// an image will be saved
Browsershot::url('https://example.com')->save($pathToImage);


https://freek.dev/793-easily-convert-webpages-to-images-using-php
https://github.com/spatie/browsershot

Tags
Implementation
License
Platform

   




Related Projects

html-pdf-chrome - HTML to PDF converter via Chrome/Chromium

  •    TypeScript

HTML to PDF converter via Chrome/Chromium. Note: It is strongly recommended that you keep Chrome running side-by-side with Node.js. There is significant overhead starting up Chrome for each PDF generation which can be easily avoided.

pdf-bot - 🤖 A Node queue API for generating PDFs using headless Chrome

  •    Javascript

Easily create a microservice for generating PDFs using headless Chrome. pdf-bot is installed on a server and will receive URLs to turn into PDFs through its API or CLI. pdf-bot will manage a queue of PDF jobs. Once a PDF job has run it will notify you using a webhook so you can fetch the API. pdf-bot supports storing PDFs on S3 out of the box. Failed PDF generations and Webhook pings will be retried after a configurable decaying schedule.

browserless - A browser driver on top of puppeteer, ready for production scenarios.

  •    Javascript

browserless is an efficient driver for controlling headless browsers built on top of puppeteer developed for scenarios where performance matters. browserless is backed by puppeteer, so you need to install it as well.

bookmark-archiver - 🗄 Save an archived copy of all websites starred using Pocket/Pinboard/Bookmarks

  •    Python

Save an archived copy of all websites you bookmark (the actual content of each site, not just the list of bookmarks).Outputs browsable static html archives of each site, a PDF, a screenshot, and a link to a copy on archive.org, all indexed with nice html & json files.

decktape - PDF exporter for HTML presentations

  •    Javascript

DeckTape is a high-quality PDF exporter for HTML presentation frameworks. DeckTape is built on top of Puppeteer which relies on Google Chrome for laying out and rendering Web pages and provides a headless Chrome instance scriptable with a JavaScript API.


Telescope Nova - An app platform built with React and powered by Meteor on the back-end

  •    Javascript

Telescope is the service ( from client or server ) works for render view ( md / code / image... ) via fetching URL. It's awesome that we can see any file on the internet. And telescope provides three ways (html/image/pdf) to display the view. So you can write the markup as follows. Meanwhile, telescope requires chrome libraries. You should ensure the dependencies of chrome that you had installed, because I use the headless Chrome browser puppeteer to generate snapshot and pdf.

prerender - Node server that uses Headless Chrome to render a javascript-rendered page as HTML

  •    Javascript

Prerender is a node server that uses Headless Chrome to render HTML, screenshots, PDFs, and HAR files out of any web page. The Prerender server listens for an http request, takes the URL and loads it in Headless Chrome, waits for the page to finish loading by waiting for the network to be idle, and then returns your content. The Prerender server can be used in conjunction with our Prerender.io middleware in order to serve the prerendered HTML of your javascript website to search engines (Google, Bing, etc) and social networks (Facebook, Twitter, etc) for SEO. We run the Prerender server at scale for SEO needs at https://prerender.io/.

rendora - dynamic server-side rendering using headless Chrome to effortlessly solve the SEO problem for modern javascript websites

  •    Go

Rendora can be seen as a reverse HTTP proxy server sitting between your backend server (e.g. Node.js/Express.js, Python/Django, etc...) and potentially your frontend proxy server (e.g. nginx, traefik, apache, etc...) or even directly to the outside world that does actually nothing but transporting requests and responses as they are except when it detects whitelisted requests according to the config. In that case, Rendora instructs a headless Chrome instance to request and render the corresponding page and then return the server-side rendered page back to the client (i.e. the frontend proxy server or the outside world). This simple functionality makes Rendora a powerful dynamic renderer without actually changing anything in both frontend and backend code. Dynamic rendering means that the server provides server-side rendered HTML to web crawlers such as GoogleBot and BingBot and at the same time provides the typical initial HTML to normal users in order to be rendered at the client side. Dynamic rendering is meant to improve SEO for websites written in modern javascript frameworks like React, Vue, Angular, etc...

breezy-pdf-lite - Simplified, self-hosted, version of breezypdf

  •    HTML

A quick to stand up HTML to PDF service powered by headless Google Chrome. Deploy with one click and start generating PDF's from your web application or command line. BreezyPDF Lite was extracted from BreezyPDF as a light weight alternative for new apps. As your software grows, a 1:1 server instance/render ratio will become slow and limiting.

headless-chrome-crawler - Distributed crawler powered by Headless Chrome

  •    Javascript

Crawlers based on simple requests to HTML files are generally fast. However, it sometimes ends up capturing empty bodies, especially when the websites are built on such modern frontend frameworks as AngularJS, React and Vue.js. Note: headless-chrome-crawler contains Puppeteer. During installation, it automatically downloads a recent version of Chromium. To skip the download, see Environment variables.

chrome-headless-screenshots - Using headless Chrome as an automated screenshot tool (alternative to PhantomJS)

  •    Javascript

May 2018 The Chrome team has released Puppeteer, which makes much of the code in this repository obsolete. As such, this project is no longer maintained and issues have been disabled. Please check out Puppeteer. This repo contains an example implementation of using headless Chrome as an automated screenshot tool on linux, which is a common use case for PhantomJS. Contributions are welcome.

wkhtmltopdf - Convert HTML to PDF using Webkit (QtWebKit)

  •    C++

wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats using the QT Webkit rendering engine. These run entirely "headless" and do not require a display or display service. See http://wkhtmltopdf.org for updated documentation.

headless - Create a virtual X screen from Ruby, record videos and take screenshots.

  •    Ruby

Headless is the Ruby interface for Xvfb. It allows you to create a headless display straight from Ruby code, hiding the low-level action. It can also capture images and video from the virtual framebuffer. For example, you can record screenshots and screencasts of your failing integration specs. I created it so I can run Selenium tests in Cucumber without any shell scripting. Even more, you can go headless only when you run tests against Selenium. Other possible uses include pdf generation with wkhtmltopdf, or screenshotting.

node-html-pdf - :page_facing_up: Html to pdf converter in nodejs

  •    Javascript

html-pdf can read the header or footer either out of the footer and header config object or out of the html source. You can either set a default header & footer or overwrite that by appending a page number (1 based index) to the id="pageHeader" attribute of a html tag.You can use any combination of those tags. The library tries to find any element, that contains the pageHeader or pageFooter id prefix.

openhtmltopdf - An HTML to PDF library for the JVM

  •    Java

Open-HTML-to-PDF is a HTML and CSS renderer written in Java. It supports Java2D and PDF output. Open-HTML-to-PDF is a fork of Flying-saucer with additional features.

menu - Html menu generator

  •    PHP

The spatie/menu package provides a fluent interface to build menus of any size in your php application. If you're building your app with Laravel, the spatie/laravel-menu provides some extra treats. Documentation is available at https://docs.spatie.be/menu.

Snappy - PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page

  •    PHP

Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. It uses the excellent webkit-based wkhtmltopdf and wkhtmltoimage.

dompdf - HTML to PDF converter (PHP5)

  •    PHP

At its heart, dompdf is (mostly) a CSS 2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes. This document applies to the latest stable code which may not reflect the current release. For released code please navigate to the appropriate tag.

WeasyPrint - Converts web documents (HTML with CSS, SVG) to PDF

  •    Python

WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. It is based on various libraries but not on a full rendering engine like WebKit or Gecko. The CSS layout engine is written in Python, designed for pagination, and meant to be easy to hack on.

cuprite - Headless Chrome driver for Capybara

  •    Ruby

Cuprite is a pure Ruby driver (read as no Java/Selenium/WebDriver/ChromeDriver requirement) for Capybara. It allows you to run your Capybara tests on a headless Chrome or Chromium by CDP protocol. Under the hood it uses Ferrum which is high-level API to the browser again by CDP protocol. The emphasis was made on raw CDP protocol because Headless Chrome allows you to do so many things that are barely supported by WebDriver because it should have consistent design with other browsers. The design of the driver will be as close to Poltergeist as possible though it's not a goal.






We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.