Prima::PS::PDF(3)
π 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 thefillPatternproperty and general pixel-to-point and vice versa calculations. π
π Specific properties π
grayscaleβ could be0or1. π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β if1, a 90 degrees rotated document layout is assumed. π
π§ Internal methods π§
pixel2pointandpoint2pixelβ helpers for translation from pixel to points and vice versa. π¦spoolβPrima::PS::PDFis not responsible for the output of the generated document, it only calls the::spoolmethod when the document is closed through an::end_doccall. By default discards the data. ThePrima::PS::Printerclass handles the spooling logic. πfontsβ callsPrima::Application::fontsand returns its output filtered so that only the fonts that support theiso10646-1encoding 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
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms