Download the PHP package typesetterio/typesetter-cli without Composer
On this page you can find all versions of the php package typesetterio/typesetter-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download typesetterio/typesetter-cli
More information about typesetterio/typesetter-cli
Files in typesetterio/typesetter-cli
Package typesetter-cli
Short Description Create PDFs from markdown with PHP.
License MIT
Homepage https://typesetter.io
Informations about the package typesetter-cli
Typesetter
Create ebooks, flyers, one-sheets and more from markdown! This command runs locally using PHP to convert your markdown into a PDF.
Install
This requires PHP 8.4 or above.
This tool is meant to be part of the repository that you have your written content. Because of that, you can install it into the local directory with the following command.
composer require typesetterio/typesetter-cli
Usage
Start a new project in the current directory:
vendor/bin/typesetter init
This writes config.php, a two chapter starter book in content/ and my-theme/theme.html.
Generate the PDF:
vendor/bin/typesetter generate
| Option | Default | |
|---|---|---|
--config |
config.php |
The config file. |
--output |
Slug of the title plus .pdf |
The PDF file to write. |
Both paths are relative to the working directory.
Docker
docker run --rm -v "$PWD":/runtime ghcr.io/typesetterio/typesetter-cli generate
The container runs as uid 1000. On Linux, to use a different user: --user "$(id -u):$(id -g)".
To learn more, please check out the documentation. This details configuration, customization, themes and cover generation, observers, listeners and more.
Development
Requires PHP 8.4 or newer, Composer, and hadolint. make act additionally needs Docker and act. On macOS, brew install php composer hadolint act.
Run make to list the available targets.
docker build -t typesetter-cli . builds the Docker image.
Changelog
See CHANGELOG.md.
Credits
This was heavily influenced by the Ibis project but is a complete rewrite.
This package stands on the shoulders of giants like MPDF, some parts of Laravel and also the League Commonmark library.
Aaron Saray is the primary author and maintainer.
All versions of typesetter-cli with dependencies
laravel-zero/foundation Version ^13.23.1
laravel-zero/framework Version ^13.0
typesetterio/typesetter Version ^1.0