POD2PDF(1p)
π POD2PDF(1p) β the pod2pdf girlies' guide π
User Contributed Perl Documentation Β· pod2pdf(1p) Β· the tool that turns your Pod into a whole PDF, no cap
β¨ NAME β¨
pod2pdf β bestie, it converts Pod to PDF format. that's it, that's the job π
πΈ DESCRIPTION πΈ
pod2pdf takes documents written in Perl's POD (Plain Old Documentation) format and turns them into PDF files. glow-up of the century honestly π¦
π Usage
pod2pdf [options] input.pod >output.pdf
If you don't hand it an input filename, pod2pdf will just read from STDIN instead, like:
perldoc -u File::Find | pod2pdf [options] >File-Find.pdf
piping it straight in? iconic. π
π Options
pod2pdf accepts the following command-line options:
--output-fileβ sets the output filename for the PDF it generates. by default pod2pdf outputs toSTDOUT.--page-sizeβ sets the page size used in the PDF file. you can set it to any of the standard paper sizes (A4, A5, Letter, etc). defaults to A4.--page-orientationβ controls whether pages come out in landscape or portrait format. defaults toportrait.--page-width,--page-heightβ sets the width and height of the generated pages in points, for when you're using non-standard paper sizes.--left-margin,--right-margin,--top-margin,--bottom-marginβ lets you set each of the page margins (top, bottom, left, and right) individually, in points.--marginsβ sets all the page margins to the same size (specified in points).--header,--noheaderβ controls whether a header gets included on each page (the header has the page title, plus optional timestamp and icon). defaults to on, so use--noheaderto turn it off.--titleβ sets the page title. defaults to the input filename.--timestampβ boolean option. if you set it, the 'last modified' timestamp of the input file goes into the page header.--iconβ filename of an icon to be displayed in the top left corner of each page.--icon-scaleβ scaling value for the header icon. defaults to 0.25.--footer,--nofooterβ controls whether a footer gets included on each page (the footer has the current page number and optional text string). by default the footer is included, so use--nofooterto turn it off.--footer-textβ sets an optional footer text string that gets included in the bottom left corner of each page.--outlinesβ adds outlines (bookmarks) to the pdf according to headings (=head1,=head2, ...).--versionβ prints the version number and exits. bye bestie π
ποΈ Configuration files
You can save whole sets of command-line options into configuration files. so organized of you. β¨
A configuration file holds options in the exact same format pod2pdf uses on the command line, with one option given on each line of the file, e.g.
--page-size A5
--page-orientation landscape
To use a config file, invoke pod2pdf with the option @/path/to/configfile.conf.
For example, if you wanted to always include a company logo, timestamp, and copyright notice in your PDF files, you'd create a file mycompany.conf containing the following:
--icon "/path/to/your/logo.png"
--footer-text "Copyright 2007 MyCompany Limited"
--timestamp
Then you invoke pod2pdf like:
pod2pdf @/path/to/mycompany.conf input.pod >output.pdf
And listen β if you create a config file called pod2pdf.conf and place it in the same directory as the pod2pdf script, it will be loaded as the default configuration. automatic. we love a default. π
π¦ POD ENTENSIONS π¦
On top of the standard POD commands (see perlpodspec), pod2pdf supports the following extensions to the POD format:
=ffβ the=ffcommand inserts a page bread (form feed) into the document.O<...>β theO<...>formatting code inserts an external object (file) into the document. this is primarily intended for embedding images, e.g.
O</path/to/figure1.jpg>
to insert diagrams, etc into documentation.
pod2pdf supports the file types JPG, GIF, TIFF, PNG, and PNM for embedded objects. π
π DEPENDENCIES π
pod2pdf requires the following modules to be installed:
PDF::API2Pod::EscapesGetopt::ArgvFile
Additionally, to use images, the modules File::Type and Image::Size must be installed, and to specify alternative page sizes the Paper::Specs module is required. (yes, that's a whole lotta modules. worth it tho. π
)
β SEE ALSO β
The pod2pdf homepage: <http://perl.jonallen.info/projects/pod2pdf>
For more info about POD, read the perlpod manpage or see the POD page on the Perl 5 Wiki (<http://www.perlfoundation.org/perl5/index.cgi?pod>).
π COPYRIGHT and LICENSE π
Copyright (C) 2007 Jon Allen (JJ) <jj@jonallen.info>
This software is licensed under the terms of the Artistic License version 2.0.
For full license details, please read the file artistic-2_0.txt included with this distribution, or see <http://www.perlfoundation.org/legal/licenses/artistic-2_0.html>.
okay that's the whole page bestie, you're officially a pod2pdf expert πβ¨
this page brought to you by perl v5.32.1, dated 2021-05-23 β mwah, xoxo, go make some PDFs ππ¦πΈ
π¦ where this page comes from
- debian bookworm: pod2pdf 0.42-5.2 Β· Artistic-2.0
- debian trixie: pod2pdf 0.42-5.2 Β· Artistic-2.0
- ubuntu jammy: pod2pdf 0.42-5.2 Β· Artistic-2.0
- ubuntu noble: pod2pdf 0.42-5.2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms