.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PDF::API2::Lite 3pm" .TH PDF::API2::Lite 3pm "2011-03-10" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PDF::API2::Lite \- lite pdf creation .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& $pdf = PDF::API2::Lite\->new; \& $pdf\->page(595,842); \& $img = $pdf\->image(\*(Aqsome.jpg\*(Aq); \& $font = $pdf\->corefont(\*(AqTimes\-Roman\*(Aq); \& $font = $pdf\->ttfont(\*(AqTimesNewRoman.ttf\*(Aq); .Ve .SH "METHODS" .IX Header "METHODS" .ie n .IP "$pdf = PDF::API2::Lite\->new" 4 .el .IP "\f(CW$pdf\fR = PDF::API2::Lite\->new" 4 .IX Item "$pdf = PDF::API2::Lite->new" .PD 0 .ie n .IP "$pdf\->page" 4 .el .IP "\f(CW$pdf\fR\->page" 4 .IX Item "$pdf->page" .ie n .IP "$pdf\->page $width,$height" 4 .el .IP "\f(CW$pdf\fR\->page \f(CW$width\fR,$height" 4 .IX Item "$pdf->page $width,$height" .ie n .IP "$pdf\->page $llx, $lly, $urx, $ury" 4 .el .IP "\f(CW$pdf\fR\->page \f(CW$llx\fR, \f(CW$lly\fR, \f(CW$urx\fR, \f(CW$ury\fR" 4 .IX Item "$pdf->page $llx, $lly, $urx, $ury" .PD Opens a new page. .ie n .IP "$pdf\->mediabox $w, $h" 4 .el .IP "\f(CW$pdf\fR\->mediabox \f(CW$w\fR, \f(CW$h\fR" 4 .IX Item "$pdf->mediabox $w, $h" .PD 0 .ie n .IP "$pdf\->mediabox $llx, $lly, $urx, $ury" 4 .el .IP "\f(CW$pdf\fR\->mediabox \f(CW$llx\fR, \f(CW$lly\fR, \f(CW$urx\fR, \f(CW$ury\fR" 4 .IX Item "$pdf->mediabox $llx, $lly, $urx, $ury" .PD Sets the global mediabox. .ie n .IP "$pdf\->saveas $file" 4 .el .IP "\f(CW$pdf\fR\->saveas \f(CW$file\fR" 4 .IX Item "$pdf->saveas $file" Saves the document (may not be modified later) and deallocates the pdf-structures. .ie n .IP "$font = $pdf\->corefont $fontname" 4 .el .IP "\f(CW$font\fR = \f(CW$pdf\fR\->corefont \f(CW$fontname\fR" 4 .IX Item "$font = $pdf->corefont $fontname" Returns a new or existing adobe core font object. .Sp \&\fBExamples:\fR .Sp .Vb 4 \& $font = $pdf\->corefont(\*(AqTimes\-Roman\*(Aq); \& $font = $pdf\->corefont(\*(AqTimes\-Bold\*(Aq); \& $font = $pdf\->corefont(\*(AqHelvetica\*(Aq); \& $font = $pdf\->corefont(\*(AqZapfDingbats\*(Aq); .Ve .ie n .IP "$font = $pdf\->ttfont $ttfile" 4 .el .IP "\f(CW$font\fR = \f(CW$pdf\fR\->ttfont \f(CW$ttfile\fR" 4 .IX Item "$font = $pdf->ttfont $ttfile" Returns a new or existing truetype font object. .Sp \&\fBExamples:\fR .Sp .Vb 3 \& $font = $pdf\->ttfont(\*(AqTimesNewRoman.ttf\*(Aq); \& $font = $pdf\->ttfont(\*(Aq/fonts/Univers\-Bold.ttf\*(Aq); \& $font = $pdf\->ttfont(\*(Aq../Democratica\-SmallCaps.ttf\*(Aq); .Ve .ie n .IP "$font = $pdf\->psfont $pfb, $afm, $encoding" 4 .el .IP "\f(CW$font\fR = \f(CW$pdf\fR\->psfont \f(CW$pfb\fR, \f(CW$afm\fR, \f(CW$encoding\fR" 4 .IX Item "$font = $pdf->psfont $pfb, $afm, $encoding" Returns a new type1 font object. .Sp \&\fBExamples:\fR .Sp .Vb 2 \& $font = $pdf\->psfont(\*(AqTimesRoman.pfb\*(Aq,\*(AqTimesRoman.afm\*(Aq,\*(Aqlatin1\*(Aq); \& $font = $pdf\->psfont(\*(Aq/fonts/Univers.pfb\*(Aq,\*(Aq/fonts/Univers.afm\*(Aq,\*(Aqlatin2\*(Aq); .Ve .ie n .IP "$egs = $pdf\->create_egs" 4 .el .IP "\f(CW$egs\fR = \f(CW$pdf\fR\->create_egs" 4 .IX Item "$egs = $pdf->create_egs" Returns a new extended-graphics-state object. .Sp \&\fBExamples:\fR .Sp .Vb 1 \& $egs = $pdf\->create_egs; .Ve .ie n .IP "$img = $pdf\->image_jpeg $file" 4 .el .IP "\f(CW$img\fR = \f(CW$pdf\fR\->image_jpeg \f(CW$file\fR" 4 .IX Item "$img = $pdf->image_jpeg $file" Returns a new jpeg-image object. .ie n .IP "$img = $pdf\->image_png $file" 4 .el .IP "\f(CW$img\fR = \f(CW$pdf\fR\->image_png \f(CW$file\fR" 4 .IX Item "$img = $pdf->image_png $file" Returns a new png-image object. .ie n .IP "$img = $pdf\->image_tiff $file" 4 .el .IP "\f(CW$img\fR = \f(CW$pdf\fR\->image_tiff \f(CW$file\fR" 4 .IX Item "$img = $pdf->image_tiff $file" Returns a new tiff-image object. .ie n .IP "$img = $pdf\->image_pnm $file" 4 .el .IP "\f(CW$img\fR = \f(CW$pdf\fR\->image_pnm \f(CW$file\fR" 4 .IX Item "$img = $pdf->image_pnm $file" Returns a new pnm-image object. .ie n .IP "$pdf\->savestate" 4 .el .IP "\f(CW$pdf\fR\->savestate" 4 .IX Item "$pdf->savestate" Saves the state of the page. .ie n .IP "$pdf\->restorestate" 4 .el .IP "\f(CW$pdf\fR\->restorestate" 4 .IX Item "$pdf->restorestate" Restores the state of the page. .ie n .IP "$pdf\->egstate $egs" 4 .el .IP "\f(CW$pdf\fR\->egstate \f(CW$egs\fR" 4 .IX Item "$pdf->egstate $egs" Sets extended-graphics-state. .ie n .IP "$pdf\->fillcolor $color" 4 .el .IP "\f(CW$pdf\fR\->fillcolor \f(CW$color\fR" 4 .IX Item "$pdf->fillcolor $color" Sets fillcolor. .ie n .IP "$pdf\->strokecolor $color" 4 .el .IP "\f(CW$pdf\fR\->strokecolor \f(CW$color\fR" 4 .IX Item "$pdf->strokecolor $color" Sets strokecolor. .Sp \&\fBDefined color-names are:\fR .Sp .Vb 10 \& 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 .Ve .Sp or the rgb-hex-notation: .Sp .Vb 1 \& #rgb, #rrggbb, #rrrgggbbb and #rrrrggggbbbb .Ve .Sp or the cmyk-hex-notation: .Sp .Vb 1 \& %cmyk, %ccmmyykk, %cccmmmyyykkk and %ccccmmmmyyyykkkk .Ve .Sp or the hsl-hex-notation: .Sp .Vb 1 \& &hsl, &hhssll, &hhhssslll and &hhhhssssllll .Ve .Sp and additionally the hsv-hex-notation: .Sp .Vb 1 \& !hsv, !hhssvv, !hhhsssvvv and !hhhhssssvvvv .Ve .ie n .IP "$pdf\->linedash @dash" 4 .el .IP "\f(CW$pdf\fR\->linedash \f(CW@dash\fR" 4 .IX Item "$pdf->linedash @dash" Sets linedash. .ie n .IP "$pdf\->linewidth $width" 4 .el .IP "\f(CW$pdf\fR\->linewidth \f(CW$width\fR" 4 .IX Item "$pdf->linewidth $width" Sets linewidth. .ie n .IP "$pdf\->transform %opts" 4 .el .IP "\f(CW$pdf\fR\->transform \f(CW%opts\fR" 4 .IX Item "$pdf->transform %opts" Sets transformations (eg. translate, rotate, scale, skew) in pdf-canonical order. .Sp \&\fBExample:\fR .Sp .Vb 6 \& $pdf\->transform( \& \-translate => [$x,$y], \& \-rotate => $rot, \& \-scale => [$sx,$sy], \& \-skew => [$sa,$sb], \& ) .Ve .ie n .IP "$pdf\->move $x, $y" 4 .el .IP "\f(CW$pdf\fR\->move \f(CW$x\fR, \f(CW$y\fR" 4 .IX Item "$pdf->move $x, $y" .PD 0 .ie n .IP "$pdf\->line $x, $y" 4 .el .IP "\f(CW$pdf\fR\->line \f(CW$x\fR, \f(CW$y\fR" 4 .IX Item "$pdf->line $x, $y" .ie n .IP "$pdf\->curve $x1, $y1, $x2, $y2, $x3, $y3" 4 .el .IP "\f(CW$pdf\fR\->curve \f(CW$x1\fR, \f(CW$y1\fR, \f(CW$x2\fR, \f(CW$y2\fR, \f(CW$x3\fR, \f(CW$y3\fR" 4 .IX Item "$pdf->curve $x1, $y1, $x2, $y2, $x3, $y3" .ie n .IP "$pdf\->arc $x, $y, $a, $b, $alfa, $beta, $move" 4 .el .IP "\f(CW$pdf\fR\->arc \f(CW$x\fR, \f(CW$y\fR, \f(CW$a\fR, \f(CW$b\fR, \f(CW$alfa\fR, \f(CW$beta\fR, \f(CW$move\fR" 4 .IX Item "$pdf->arc $x, $y, $a, $b, $alfa, $beta, $move" .ie n .IP "$pdf\->ellipse $x, $y, $a, $b" 4 .el .IP "\f(CW$pdf\fR\->ellipse \f(CW$x\fR, \f(CW$y\fR, \f(CW$a\fR, \f(CW$b\fR" 4 .IX Item "$pdf->ellipse $x, $y, $a, $b" .ie n .IP "$pdf\->circle $x, $y, $r" 4 .el .IP "\f(CW$pdf\fR\->circle \f(CW$x\fR, \f(CW$y\fR, \f(CW$r\fR" 4 .IX Item "$pdf->circle $x, $y, $r" .ie n .IP "$pdf\->rect $x,$y, $w,$h" 4 .el .IP "\f(CW$pdf\fR\->rect \f(CW$x\fR,$y, \f(CW$w\fR,$h" 4 .IX Item "$pdf->rect $x,$y, $w,$h" .ie n .IP "$pdf\->rectxy $x1,$y1, $x2,$y2" 4 .el .IP "\f(CW$pdf\fR\->rectxy \f(CW$x1\fR,$y1, \f(CW$x2\fR,$y2" 4 .IX Item "$pdf->rectxy $x1,$y1, $x2,$y2" .ie n .IP "$pdf\->poly $x1,$y1, ..., $xn,$yn" 4 .el .IP "\f(CW$pdf\fR\->poly \f(CW$x1\fR,$y1, ..., \f(CW$xn\fR,$yn" 4 .IX Item "$pdf->poly $x1,$y1, ..., $xn,$yn" .ie n .IP "$pdf\->close" 4 .el .IP "\f(CW$pdf\fR\->close" 4 .IX Item "$pdf->close" .ie n .IP "$pdf\->stroke" 4 .el .IP "\f(CW$pdf\fR\->stroke" 4 .IX Item "$pdf->stroke" .ie n .IP "$pdf\->fill" 4 .el .IP "\f(CW$pdf\fR\->fill" 4 .IX Item "$pdf->fill" .ie n .IP "$pdf\->fillstroke" 4 .el .IP "\f(CW$pdf\fR\->fillstroke" 4 .IX Item "$pdf->fillstroke" .ie n .IP "$pdf\->image $imgobj, $x,$y, $w,$h" 4 .el .IP "\f(CW$pdf\fR\->image \f(CW$imgobj\fR, \f(CW$x\fR,$y, \f(CW$w\fR,$h" 4 .IX Item "$pdf->image $imgobj, $x,$y, $w,$h" .ie n .IP "$pdf\->image $imgobj, $x,$y, $scale" 4 .el .IP "\f(CW$pdf\fR\->image \f(CW$imgobj\fR, \f(CW$x\fR,$y, \f(CW$scale\fR" 4 .IX Item "$pdf->image $imgobj, $x,$y, $scale" .ie n .IP "$pdf\->image $imgobj, $x,$y" 4 .el .IP "\f(CW$pdf\fR\->image \f(CW$imgobj\fR, \f(CW$x\fR,$y" 4 .IX Item "$pdf->image $imgobj, $x,$y" .PD \&\fBPlease Note:\fR The width/height or scale given is in user-space coordinates which is subject to transformations which may have been specified beforehand. .Sp 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. .ie n .IP "$pdf\->textstart" 4 .el .IP "\f(CW$pdf\fR\->textstart" 4 .IX Item "$pdf->textstart" .PD 0 .ie n .IP "$pdf\->textfont $fontobj,$size" 4 .el .IP "\f(CW$pdf\fR\->textfont \f(CW$fontobj\fR,$size" 4 .IX Item "$pdf->textfont $fontobj,$size" .ie n .IP "$txt\->textlead $leading" 4 .el .IP "\f(CW$txt\fR\->textlead \f(CW$leading\fR" 4 .IX Item "$txt->textlead $leading" .ie n .IP "$pdf\->text $string" 4 .el .IP "\f(CW$pdf\fR\->text \f(CW$string\fR" 4 .IX Item "$pdf->text $string" .PD Applys the given text. .ie n .IP "$pdf\->nl" 4 .el .IP "\f(CW$pdf\fR\->nl" 4 .IX Item "$pdf->nl" .PD 0 .ie n .IP "$pdf\->textend" 4 .el .IP "\f(CW$pdf\fR\->textend" 4 .IX Item "$pdf->textend" .ie n .IP "$pdf\->print $font, $size, $x, $y, $rot, $just, $text" 4 .el .IP "\f(CW$pdf\fR\->print \f(CW$font\fR, \f(CW$size\fR, \f(CW$x\fR, \f(CW$y\fR, \f(CW$rot\fR, \f(CW$just\fR, \f(CW$text\fR" 4 .IX Item "$pdf->print $font, $size, $x, $y, $rot, $just, $text" .PD Convenience wrapper for shortening the textstart..textend sequence. .SH "AUTHOR" .IX Header "AUTHOR" alfred reibenschuh