Prima::PS::PDF(3)

πŸ“¦
version 1.74000 Β· 5 versions
, in opensuse-leap 16.0

πŸ’– Prima::PS::PDF(3) β€” User Contributed Perl Documentation πŸ’–

✨ NAME ✨

Prima::PS::PDF β€” PDF interface to Prima::Drawable πŸ¦‹

✨ SYNOPSIS ✨

Recommended usage, bestie:

use Prima::PS::Printer;
my $x = Prima::PS::PDF::File-> new( file => 'out.pdf');

or

my $x = Prima::PS::PDF::FileHandle-> new( handle => \&STDOUT);

Low-level, if you're feeling brave:

use Prima::PS::PDF;
my $x = Prima::PS::PDF-> create( onSpool => sub {
        open F, ">> ./test.pdf";
        binmode F;
        print F $_[1];
        close F;
});

Printing:

die "error:$@" unless $x-> begin_doc;
$x-> font-> size( 30);
$x-> text_out( "hello!", 100, 100);
$x-> end_doc;

🌸 DESCRIPTION 🌸

okay so this module implements the Prima library interface to PDF v1.4. It's literally designed to be compliant with the Prima::Drawable interface. All properties' behavior is as same as Prima::Drawable's except those described below β€” periodt. πŸ’…

πŸ¦‹ Inherited properties πŸ¦‹

  • ::resolution β€” can be set while the object is in the normal stage. It cannot be changed if the document is opened. Applies to implementation of the fillPattern property and general pixel-to-point and vice versa calculations. 🌈

πŸ’… Specific properties πŸ’…

  • grayscale β€” could be 0 or 1. πŸŽ€
  • pageSize β€” the physical page dimension, in points. πŸ“
  • pageMargins β€” the non-printable page area, an array of 4 integers: left, bottom, right, and top margins in points. 🫢
  • reversed β€” if 1, a 90 degrees rotated document layout is assumed. πŸ”„

🧚 Internal methods 🧚

  • pixel2point and point2pixel β€” helpers for translation from pixel to points and vice versa. πŸ¦‹
  • spool β€” Prima::PS::PDF is not responsible for the output of the generated document, it only calls the ::spool method when the document is closed through an ::end_doc call. By default discards the data. The Prima::PS::Printer class handles the spooling logic. πŸ’Œ
  • fonts β€” calls Prima::Application::fonts and returns its output filtered so that only the fonts that support the iso10646-1 encoding are present. This effectively allows only unicode output. πŸ”€

πŸ’Œ cute sign-off: perl v5.42.0 Β· 2024-08-20 Β· Prima::PS::PDF(3) β€” user-contributed Perl documentation, mwah. 🫢
πŸ“¦ where this page comes from