PDF::API2::Lite - lite pdf creation
$pdf = PDF::API2::Lite->new; $pdf->page(595,842); $img = $pdf->image('some.jpg'); $font = $pdf->corefont('Times-Roman'); $font = $pdf->ttfont('TimesNewRoman.ttf');
Opens a new page.
Sets the global mediabox.
Saves the document (may not be modified later) and deallocates the pdf-structures.
Returns a new or existing adobe core font object.
Examples:
$font = $pdf->corefont('Times-Roman'); $font = $pdf->corefont('Times-Bold'); $font = $pdf->corefont('Helvetica'); $font = $pdf->corefont('ZapfDingbats');
Returns a new or existing truetype font object.
$font = $pdf->ttfont('TimesNewRoman.ttf'); $font = $pdf->ttfont('/fonts/Univers-Bold.ttf'); $font = $pdf->ttfont('../Democratica-SmallCaps.ttf');
Returns a new type1 font object.
$font = $pdf->psfont('TimesRoman.pfb','TimesRoman.afm','latin1'); $font = $pdf->psfont('/fonts/Univers.pfb','/fonts/Univers.afm','latin2');
Returns a new extended-graphics-state object.
$egs = $pdf->create_egs;
Returns a new jpeg-image object.
Returns a new png-image object.
Returns a new tiff-image object.
Returns a new pnm-image object.
Saves the state of the page.
Restores the state of the page.
Sets extended-graphics-state.
Sets fillcolor.
Sets strokecolor.
Defined color-names are:
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
or the rgb-hex-notation:
#rgb, #rrggbb, #rrrgggbbb and #rrrrggggbbbb
or the cmyk-hex-notation:
%cmyk, %ccmmyykk, %cccmmmyyykkk and %ccccmmmmyyyykkkk
or the hsl-hex-notation:
&hsl, &hhssll, &hhhssslll and &hhhhssssllll
and additionally the hsv-hex-notation:
!hsv, !hhssvv, !hhhsssvvv and !hhhhssssvvvv
Sets linedash.
Sets linewidth.
Sets transformations (eg. translate, rotate, scale, skew) in pdf-canonical order.
Example:
$pdf->transform( -translate => [$x,$y], -rotate => $rot, -scale => [$sx,$sy], -skew => [$sa,$sb], )
Please Note: The width/height or scale given is in user-space coordinates which is subject to transformations which may have been specified beforehand.
Per default this has a 72dpi resolution, so if you want an image to have a 150 or 300dpi resolution, you should specify a scale of 72/150 (or 72/300) or adjust width/height accordingly.
Applys the given text.
Convenience wrapper for shortening the textstart..textend sequence.
alfred reibenschuh
$Log: Lite.pm,v $ Revision 2.1 2007/05/08 18:32:09 areibens renamed compress to compressFlate Revision 2.0 2005/11/16 02:16:00 areibens revision workaround for SF cvs import not to screw up CPAN Revision 1.2 2005/11/16 01:27:48 areibens genesis2 Revision 1.1 2005/11/16 01:19:24 areibens genesis Revision 1.12 2005/06/17 19:43:47 fredo fixed CPAN modulefile versioning (again) Revision 1.11 2005/06/17 18:53:33 fredo fixed CPAN modulefile versioning (dislikes cvs) Revision 1.10 2005/03/14 22:01:05 fredo upd 2005 Revision 1.9 2005/02/28 18:00:06 fredo removed color method since businesscolor is not available anymore in PDF::API2 Revision 1.8 2004/12/16 00:30:51 fredo added no warn for recursion Revision 1.7 2004/06/15 09:11:38 fredo removed cr+lf Revision 1.6 2004/06/07 19:44:12 fredo cleaned out cr+lf for lf Revision 1.5 2004/05/21 15:04:43 fredo fixed NAME pod bug for cpan indexer Revision 1.4 2003/12/08 13:05:19 Administrator corrected to proper licencing statement Revision 1.3 2003/11/30 17:11:55 Administrator merged into default Revision 1.2.2.1 2003/11/30 16:56:21 Administrator merged into default Revision 1.2 2003/11/30 11:32:56 Administrator added CVS id/log
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install PDF::API2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDF::API2
CPAN shell
perl -MCPAN -e shell install PDF::API2
For more information on module installation, please visit the detailed CPAN module installation guide.