PDF::Writer(3pm)

πŸ“¦
version 0.06 Β· 2 versions
  • 0.06 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.06 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– PDF::Writer β€” the manual, but make it make sense πŸ’–

okay bestie, so this is PDF::Writer(3pm), and it's genuinely one of those modules that just gets you. no gatekeeping here, let's go. ✨


πŸŽ€ NAME πŸŽ€

PDF::Writer β€” a PDF writer abstraction layer. that's the whole vibe. it writes PDFs, but like, in a delegating way. iconic.


πŸ¦‹ VERSION πŸ¦‹

This document describes version 0.05 of PDF::Writer, released Oct 25, 2005.

(yeah she's an elder. still slays tho. periodt.)


✨ SYNOPSIS ✨

the classic. the moment. here's how you use her:

use PDF::Writer;

# Or, to explicitly specify a back-end ...
use PDF::Writer 'pdflib';
use PDF::Writer 'pdfapi2';
use PDF::Writer 'mock';

my $writer = PDF::Writer->new;

so like, you can just use PDF::Writer; and let her pick, OR you can be extra and name your back-end directly. both are valid. both are cute. 🫢


πŸ’… DESCRIPTION πŸ’…

okay so here's the whole point of this module: it's a generalized API that lets a module generating PDFs transparently target multiple backends without changing its code. like, write once, swap the engine underneath, no drama. that's the dream fr fr.

The currently supported backends are:

  • PDF::API2 β€” available from CPAN. (the popular one, the it-girl of backends.)
  • PDFlib (versions 3+) β€” available from "/www.pdflib.com" in http;. There is both a pay and a free version. PDF::Writer will work with both, within their limitations. Please see the appropriate documentation for details. (yes, within their limitations. read that part twice, bestie.)
  • Mock β€” this lets modules that target PDF::Writer write their tests against a mock interface. Please see PDF::Writer::mock for more information. (testing girlies rise up 🧚)
okay now the important logic bit, don't skip: if both PDF::API2 and pdflib_pl are available, PDF::API2 is preferred. If neither is available, a run-time exception will be thrown. and listen β€” you must explicitly load the PDF::Writer::mock driver if you wish to use it. she will not load herself. she is not that kind of girl. πŸ’€

🌸 METHODS 🌸

  • new() β€” this acts as a factory, loading the appropriate PDF::Writer driver. that's it. that's the method. she's a factory, she makes the right thing happen, she doesn't make a whole speech about it. πŸ‘‘

🌈 CODE COVERAGE 🌈

We use Devel::Cover to test the code coverage of our tests. Below is the Devel::Cover report on this module's test suite.

(the report lives below this line in the original page β€” we're just telling you it's down there, bestie, we're not skipping it, it's just literally below.)

πŸ’œ AUTHORS πŸ’œ

Originally written by:

Autrijus Tang <autrijus@autrijus.org>

Currently maintained by:

Rob Kinyon <rob.kinyon@iinteractive.com>

Stevan Little <stevan.little@iinteractive.com>

Thanks to Infinity Interactive for generously donating our time. 🫢 real ones fr.


Copyright 2004, 2005 by Autrijus Tang <autrijus@autrijus.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>


and that's the whole page, bestie!! πŸŽ€ this one's from perl v5.34.0, dated 2022-06-16, and yeah the footer says PDF::Writer(3pm) β€” so like, she's been sitting pretty in the perl docs this whole time. go forth and generate PDFs. i'm obsessed. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from