All Projects → EricGrange → cefHtmlSnapshot

EricGrange / cefHtmlSnapshot

Licence: MPL-2.0 license
Command-line utility for Windows take snapshots of HTML pages and save them as images or PDF

Programming Languages

pascal
1382 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to cefHtmlSnapshot

Chromium.swt
Chromium widget for SWT
Stars: ✭ 105 (+356.52%)
Mutual labels:  chromium, cef
Nim pc demo
云信Windows(PC) C/C++ Demo源码仓库
Stars: ✭ 147 (+539.13%)
Mutual labels:  chromium, cef
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 (+452.17%)
Mutual labels:  chromium, pdf-generation
Cef2go
Go lang bindings for the Chromium Embedded Framework (CEF)
Stars: ✭ 780 (+3291.3%)
Mutual labels:  chromium, cef
Pdf Bot
🤖 A Node queue API for generating PDFs using headless Chrome. Comes with a CLI, S3 storage and webhooks for notifying subscribers about generated PDFs
Stars: ✭ 2,551 (+10991.3%)
Mutual labels:  chromium, pdf-generation
Cef4delphi
CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS.
Stars: ✭ 785 (+3313.04%)
Mutual labels:  chromium, cef
Uranium
Fast and versatile implementation of CEF for Unreal Engine
Stars: ✭ 51 (+121.74%)
Mutual labels:  chromium, cef
Journey
JCEF-powered cross-platform web browser
Stars: ✭ 85 (+269.57%)
Mutual labels:  chromium, cef
Chromely
Build HTML Desktop Apps on .NET/.NET Core/.NET 5 using native GUI, HTML5, JavaScript, CSS
Stars: ✭ 2,728 (+11760.87%)
Mutual labels:  chromium, cef
Bas
BrowserAutomationStudio can automate everything that Chrome can.
Stars: ✭ 203 (+782.61%)
Mutual labels:  chromium, cef
Html Pdf Chrome
HTML to PDF converter via Chrome/Chromium
Stars: ✭ 629 (+2634.78%)
Mutual labels:  chromium, pdf-generation
cefgo
Go bindings for the Chromium Embedded Framework (CEF)
Stars: ✭ 20 (-13.04%)
Mutual labels:  chromium, cef
cefau3
Chromium Embedded Framework for AutoIt3
Stars: ✭ 23 (+0%)
Mutual labels:  chromium, cef
Journey
JCEF-powered cross-platform web browser
Stars: ✭ 68 (+195.65%)
Mutual labels:  chromium, cef
chromium-swt
Create and render web UIs in Java SWT and Eclipse RCP applications.
Stars: ✭ 121 (+426.09%)
Mutual labels:  chromium, cef
Pandomium
Pandomium is the JCEF (Java Chromium Embedded Framework) implementation dedicated for the Maven based projects
Stars: ✭ 146 (+534.78%)
Mutual labels:  chromium, cef
jcefbuild
Binary builds of java-cef
Stars: ✭ 160 (+595.65%)
Mutual labels:  chromium, cef
FoldingBrowser
FoldingCoin & CureCoin All-In-One Installer
Stars: ✭ 48 (+108.7%)
Mutual labels:  chromium, cef
Cefpython
Python bindings for the Chromium Embedded Framework (CEF)
Stars: ✭ 2,498 (+10760.87%)
Mutual labels:  chromium, cef
cef-mixer
High Performance off-screen rendering (OSR) demo using CEF
Stars: ✭ 183 (+695.65%)
Mutual labels:  chromium, cef

cefHtmlSnapshot

Command-line utility for Windows whose aim is to take snapshots of HTML pages and save them as images or PDF

Project is still experimental and not functional yet.

Started as hack of the "ConsoleBrowser2" demo of CEF4Delphi by Salvador Díaz Fau, additional bugs are mine.

Released under MPL 2.0

Credits

Main repository at https://github.com/EricGrange/cefHtmlSnapshot

This project requires CEF4Dephi https://github.com/salvadordf/CEF4Delphi/ by Salvador Díaz Fau and leverages the Chromium Embedded Framework (https://bitbucket.org/chromiumembedded/cef/).

TurboJPEG support https://bitbucket.org/egrange/dwscript/src/master/Libraries/GraphicsLib/

Command line arguments

cefHtmlSnapshot.exe url_or_file [-arg1 value1] [-arg2 value2] ... output_file

  -?, -h, --help    This inline documentation
  url_or_file       URL of the website or file to be snapshotted (required)
                    If a .url file is specified, the URL will be read from it
  output_file       Output file pathname, extension determines format (default snapshot.jpg)
                    Supported formats are pdf, jpg, png, bmp & txt

  -w, --width       Width of the snapshot, between 1 and 2048 (default 1024)
  -h, --height      Height of the snapshot, between 1 and 2048 (default 768)
                    When output format is a PDF, this parameter is ignored
  -d, --delay       Delay in milliseconds, between 100 ms and 30 sec (default 1 sec)
  -s, --scale       Scale of the website relative to 96dpi, between 0.1 and 10.0 (default 1.0)
  --quality         Output JPEG quality (1 to 100, default 90)
  --compression     Output PNG compresson level (0 to 9, default 7)

  --cookie          set a cookie, format is CommaText, starting with name=value, then fields
                    url=       cookie url (uses scheme + domain from url parameter by default)
                    domain=    cookie domain (uses domain from url parameter by default)
                    path=      cookie path ("/" by default)
                    secure=    secure flag (0 or 1, by default 1 if url starts with "https:")
                    httponly=  htpOnly flag (0 or 1, by default 0)
  --javascript      Name of a JavaScript file to execute just before taking the snapshot
  --ignore-certificate-errors Turns on/off certificate checks (0 or 1, by default 0)
  --no-sandbox      Turns on/off sandbox (0 or 1, by default 0)

  --pdf-xxx         PDF output options outlined below
        page-width      page width in microns (default 210000)
        page-height     page height in microns (default 297000)
        margins         sets all margins in points
        margin-top      top margin in points (default 20)
        margin-left     left margin in points (default 20)
        margin-right    right margin in points (default 20)
        margin-bottom   bottom margin in points (default 20)
        landscape       portait (default, 0) or landscape (1)
        backgrounds     enable backgrounds (1) or not (default, 0)
		
  --text            Specifies the source of text for .txt output, accepted values
                        text (default)
                        html
                        console
  --frame	        Specifies the name of the frame for text our html output (by default main frame)
		

Exemple

Takes a 1024x768 snapshot of my blog and save it in Jpeg format, while running a JS script to remove the EU cookie law banner.

cefHtmlSnapshot https://www.delphitools.info/ --javascript Scripts\cookie-law-buster.js snapshot.jpg
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].