Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CLI for rendering text with headless chrome.

NotificationsYou must be signed in to change notification settings

transitive-bullshit/puppeteer-render-text-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI for rendering text with headless chrome.

NPMBuild StatusJavaScript Style Guide

Logo

This CLI is also available as alibrary.

Why?

ImageMagick is the traditional unix tool to programaticallyrender text, and while it works very well for simple use cases, trying to use it to render rich text or html is very difficult.Pango is another option that's been around for ages, but both suffer from archaic syntax and minimal rich text support.

Puppeteer, on the other hand, allows for robust, headless chrome screenshots with best-in-class support for all modern html / text / font features.

This CLI makes it easy to use headless chrome to render text + html to images.

Features

Install

npm install -g puppeteer-render-text-cli

Usage

  Usage: puppeteer-render-text [options]<text>  Options:    -V, --version                    output the version number    -o, --output<path>              path of image file to store result (default: out.png)    -w, --width<number>             optional max width    -h, --height<number>            optional max height    -g, --load-google-font           load font families from google    -l, --load-font-family<string>  font family to load with fontfaceobserver    -s, --style<string>             JSON string of CSS styles (default: { })    --font-family<string>           font-family to add to style    --font-size<string>             font-size to add to style    --padding<string>               padding to add to style    --color<string>                 color to add to style    -h, --help                       output usage information

Related

License

MIT ©Travis Fischer

Support my OSS work byfollowing me on twittertwitter

About

CLI for rendering text with headless chrome.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp