ASCIIDOCTOR-PDF(1)
β¨ asciidoctor-pdf β the glow-up your AsciiDoc deserves β¨
okay bestie, so you know how you write your little AsciiDoc files and they're gorgeous and everything? yeah. this is the girl that turns them into PDF. it's giving "my docs but make them printable." π
This is asciidoctor-pdf from the Asciidoctor manual, and we're gonna go through everything β every flag, every vibe, no cap.
πΈ SYNOPSIS πΈ
asciidoctor-pdf [OPTION]... FILE...
π DESCRIPTION π
The asciidoctor-pdf(1) command converts the AsciiDoc source file(s) FILE to PDF format.
If FILE is - then the AsciiDoc source is read from standard input. (yes bestie, stdin. pipe it in, live your truth π«Ά)
π₯ OPTIONS π₯
π‘οΈ Security Settings
-B,--base-dir=DIRβ Base directory containing the document and resources. Defaults to the directory containing the source file, or the working directory if the source is read from a stream. When combined with the safe mode setting, can be used to chroot the execution of the program. (chroot?? she's locked in. literally.)-S,--safe-mode=SAFE_MODEβ Set safe mode level:unsafe,safe,serverorsecure. Disables potentially dangerous macros in source files, such asinclude::[]. If not set, the safe mode level defaults tounsafewhen Asciidoctor-pdf is invoked using this script.--safeβ Set safe mode level tosafe. Enables include directives, but prevents access to ancestor paths of source file. Provided for compatibility with theasciidoccommand. If not set, the safe mode level defaults tounsafewhen Asciidoctor-pdf is invoked using this script.
π Document Settings
-a,--attribute=ATTRIBUTEβ Define, override or delete a document attribute. Command-line attributes take precedence over attributes defined in the source file unless the value ends with@.
ATTRIBUTE is normally formatted as a key-value pair, in the form NAME=VALUE. Alternate acceptable forms are NAME (where the VALUE defaults to an empty string), NAME! (unassigns the NAME attribute) and NAME=VALUE@ (where VALUE does not override value of NAME attribute if it's already defined in the source document). Values containing spaces should be enclosed in quotes.
This option may be specified more than once. (spam it, she can take it π )
-d,--doctype=DOCTYPEβ Document type:article,book,manpageorinline. Thebookdocument type allows multiple level-0 section titles in a single document. Themanpagedocument type enables parsing of metadata necessary to produce a man page. Theinlinedocument type allows the content of a single paragraph to be formatted and returned without wrapping it in a containing element. Defaults toarticle.
π Document Conversion
-D,--destination-dir=DIRβ Destination output directory. Defaults to the directory containing the source file, or the working directory if the source is read from a stream. If specified, the directory is resolved relative to the working directory.-E,--template-engine=NAMEβ Template engine to use for the custom converter templates. The gem with the same name as the engine will be loaded automatically. This name is also used to build the full path to the custom converter templates. If a template engine is not specified, it will be auto-detected based on the file extension of the custom converter templates found.-e,--erubyβ Specifies the eRuby implementation to use for executing the custom converter templates written in ERB. Supported values areerbanderubis. Defaults toerb.-I,--load-path=DIRECTORYβ Add the specified directory to the load path, so that-rcan load extensions from outside the default Ruby load path. This option may be specified more than once.-n,--section-numbersβ Auto-number section titles. Synonym for--attribute sectnums. (she said "I'll do it myself." iconic.)-o,--out-file=OUT_FILEβ Write output to file OUT_FILE. Defaults to the base name of the input file suffixed with backend extension. The file is resolved relative to the working directory. If the input is read from standard input or a named pipe (fifo), then the output file defaults to stdout. If OUT_FILE is-, then the output file is written to standard output.-R,--source-dir=DIRβ Source directory. Currently only used if the destination directory is also specified. Used to preserve the directory structure of files converted within this directory in the destination directory. If specified, the directory is resolved relative to the working directory.-r,--require=LIBRARYβ Require the specified library before executing the processor, using the standard Rubyrequire. This option may be specified more than once.-s,--no-header-footerβ Output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. This option is useful for producing documents that can be inserted into an external template. (just the body, bestie. no fit, no shoes, straight to the point.)-T,--template-dir=DIRβ A directory containing custom converter templates that override one or more templates from the built-in set. (requirestiltgem)
If there is a subfolder that matches the engine name (if specified), that folder is appended to the template directory path. Similarly, if there is a subfolder in the resulting template directory that matches the name of the backend, that folder is appended to the template directory path.
This option may be specified more than once. Matching templates found in subsequent directories override ones previously discovered. (last one wins, like always π)
β±οΈ Processing Information
--failure-level=LEVELβ The minimum logging level that triggers a non-zero exit code (failure). If this option is not set (default:FATAL), the program exits with a status code zero even if warnings or errors have been logged.-q,--quietβ Silence warnings. (shhh. not a word. π«Ά)--traceβ Include backtrace information on errors. Not enabled by default.-v,--verboseβ Verbosely print processing information and configuration file checks tostderr.-t,--timingsβ Display timings information (time to read, parse and convert).
π Program Information
-h,--help [TOPIC]β Print the help message. Show the command usage if TOPIC is not specified (or not recognized).-V,--versionβ Print program version number.
-v can also be used if no other flags or arguments are present.
π ENVIRONMENT π
Asciidoctor-pdf honors the SOURCE_DATE_EPOCH environment variable. If this variable is assigned an integer value, that value is used as the epoch of all input documents and as the local date and time. See https://reproducible-builds.org/specs/source-date-epoch/ for more information about this environment variable.
(so you get the same output every single time β reproducible build girlies stay winning π)
π EXIT STATUS π
0β Success.1β Failure (syntax or usage error; configuration error; document processing failure; unexpected error).
π BUGS π
Refer to the Asciidoctor issue tracker at https://github.com/asciidoctor/asciidoctor/issues?q=is%3Aopen.
π«Ά AUTHORS π«Ά
Asciidoctor-pdf was written by Dan Allen, Ryan Waldron, Jason Porter, Nick Hengeveld and other contributors.
Asciidoctor was written by Dan Allen, Ryan Waldron, Jason Porter, Nick Hengeveld and other contributors.
AsciiDoc was written by Stuart Rackham and has received contributions from many other individuals.
π RESOURCES π
Project web site: https://asciidoctor.org
Git source repository on GitHub: https://github.com/asciidoctor/asciidoctor-pdf
GitHub organization: https://github.com/asciidoctor
Discussion list / forum: http://discuss.asciidoctor.org
π COPYING π
Copyright (C) 2012-2018 Dan Allen, Ryan Waldron and the Asciidoctor Project. Free use of this software is granted under the terms of the MIT License.
π AUTHORS π
Dan Allen
Sarah White
Ryan Waldron
okay that's the whole page bestie, every single flag, no skips, no shortcuts. go make some gorgeous PDFs. π
With love from the Asciidoctor 1.5.8 era, dated 2019-02-04 β yes she's a little vintage but she still ATE. mwah π β¨
π¦ where this page comes from
- debian bookworm: ruby-asciidoctor-pdf 2.3.4-3 Β· MIT
- debian trixie: ruby-asciidoctor-pdf 2.3.4-3 Β· MIT
- ubuntu jammy: ruby-asciidoctor-pdf 1.6.2-1 Β· MIT
- ubuntu noble: ruby-asciidoctor-pdf 2.3.4-3 Β· MIT
- ubuntu questing: ruby-asciidoctor-pdf 2.3.4-3
- ubuntu resolute: asciidoctor-pdf 2.3.19-3 Β· MIT
- ubuntu stonking: asciidoctor-pdf 2.3.24-5 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms