-
-
20 Apr 2022 09:41:08 UTC
- Distribution: Prima
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (126 / 24 / 2)
- Kwalitee
Bus factor: 1- % Coverage
- License: freebsd
- Perl: v5.12.0
- Activity
24 month- Tools
- Download (1.91MB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Prima::PS::PDF - PDF interface to Prima::Drawable
SYNOPSIS
use Prima; use Prima::PS::PDF; my $x = Prima::PS::PDF-> create( onSpool => sub { open F, ">> ./test.pdf"; binmode F; print F $_[1]; close F; }); die "error:$@" unless $x-> begin_doc; $x-> font-> size( 30); $x-> text_out( "hello!", 100, 100); $x-> end_doc;
DESCRIPTION
Realizes the Prima library interface to PDF v1.4. The module is designed to be compliant with Prima::Drawable interface. All properties' behavior is as same as Prima::Drawable's, except those described below.
Inherited properties
- ::resolution
-
Can be set while object is in normal stage - cannot be changed if document is opened. Applies to fillPattern realization and general pixel-to-point and vice versa calculations
Specific properties
- ::grayscale
-
could be 0 or 1
- ::pageSize
-
physical page dimension, in points
- ::pageMargins
-
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
- ::rotate and ::scale
-
along with Prima::Drawable::translate provide PS-specific transformation matrix manipulations. ::rotate is number, measured in degrees, counter-clockwise. ::scale is array of two numbers, respectively x- and y-scale. 1 is 100%, 2 is 200% etc.
Internal methods
- pixel2point and point2pixel
-
Helpers for translation from pixel to points and vice versa.
- spool
-
Prima::PS::Drawable is not responsible for output of generated document, it just calls ::spool when document is closed through ::end_doc. By default just skips data. Prima::PS::Printer handles spooling logic.
- fonts
-
Returns Prima::Application::fonts, however with
iso10646-1
encoding only. That effectively allows only unicode output.
Module Install Instructions
To install Prima, copy and paste the appropriate command in to your terminal.
cpanm Prima
perl -MCPAN -e shell install Prima
For more information on module installation, please visit the detailed CPAN module installation guide.