{
    "mode": "perldoc",
    "parameter": "PDF::API2::Lite",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/PDF%3A%3AAPI2%3A%3ALite/json",
    "generated": "2026-06-14T07:47:55Z",
    "synopsis": "$pdf = PDF::API2::Lite->new;\n$pdf->page(595,842);\n$img = $pdf->image('some.jpg');\n$font = $pdf->corefont('Times-Roman');\n$font = $pdf->ttfont('TimesNewRoman.ttf');",
    "sections": {
        "NAME": {
            "content": "PDF::API2::Lite - (do not use)\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "$pdf = PDF::API2::Lite->new;\n$pdf->page(595,842);\n$img = $pdf->image('some.jpg');\n$font = $pdf->corefont('Times-Roman');\n$font = $pdf->ttfont('TimesNewRoman.ttf');\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class is unmaintained (since 2007) and should not be used in new code. It combines many of\nthe methods from PDF::API2 and PDF::API2::Content into a single class but isn't otherwise any\neasier to use.\n\nThere have been many improvements and clarifications made to the rest of the distribution that\naren't reflected here, so the term \"Lite\" no longer applies. It remains solely for compatibility\nwith existing legacy code.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "$pdf = PDF::API2::Lite->new\n$pdf->page\n$pdf->page $width,$height\n$pdf->page $llx, $lly, $urx, $ury\nOpens a new page.\n\n$pdf->mediabox $w, $h\n$pdf->mediabox $llx, $lly, $urx, $ury\nSets the global mediabox.\n\n$pdf->saveas $file\nSaves the document (may not be modified later) and deallocates the pdf-structures.\n\n$font = $pdf->corefont $fontname\nReturns a new or existing adobe core font object.\n\nExamples:\n\n$font = $pdf->corefont('Times-Roman');\n$font = $pdf->corefont('Times-Bold');\n$font = $pdf->corefont('Helvetica');\n$font = $pdf->corefont('ZapfDingbats');\n\n$font = $pdf->ttfont $ttfile\nReturns a new or existing truetype font object.\n\nExamples:\n\n$font = $pdf->ttfont('TimesNewRoman.ttf');\n$font = $pdf->ttfont('/fonts/Univers-Bold.ttf');\n$font = $pdf->ttfont('../Democratica-SmallCaps.ttf');\n\n$font = $pdf->psfont($psfile, [%options])\nReturns a new type1 font object.\n\nExamples:\n\n$font = $pdf->psfont('TimesRoman.pfa', -afmfile => 'TimesRoman.afm', -encode => 'latin1');\n$font = $pdf->psfont('/fonts/Univers.pfb', -pfmfile => '/fonts/Univers.pfm', -encode => 'latin2');\n\n$egs = $pdf->createegs\nReturns a new extended-graphics-state object.\n\nExamples:\n\n$egs = $pdf->createegs;\n\n$img = $pdf->imagejpeg $file\nReturns a new jpeg-image object.\n\n$img = $pdf->imagepng $file\nReturns a new png-image object.\n\n$img = $pdf->imagetiff $file\nReturns a new tiff-image object.\n\n$img = $pdf->imagepnm $file\nReturns a new pnm-image object.\n\n$pdf->savestate\nSaves the state of the page.\n\n$pdf->restorestate\nRestores the state of the page.\n\n$pdf->egstate $egs\nSets extended-graphics-state.\n\n$pdf->fillcolor $color\nSets fillcolor.\n\n$pdf->strokecolor $color\nSets strokecolor.\n\nDefined color-names are:\n\naliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond,\nblue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue,\ncornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey,\ndarkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon,\ndarkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet,\ndeeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen,\nfuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew,\nhotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon,\nlightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey,\nlightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey,\nlightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine,\nmediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen,\nmediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite,\nnavy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen,\npaleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple,\nred, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna,\nsilver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal,\nthistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen\n\nor the rgb-hex-notation:\n\n#rgb, #rrggbb, #rrrgggbbb and #rrrrggggbbbb\n\nor the cmyk-hex-notation:\n\n%cmyk, %ccmmyykk, %cccmmmyyykkk and %ccccmmmmyyyykkkk\n\nor the hsl-hex-notation:\n\n&hsl, &hhssll, &hhhssslll and &hhhhssssllll\n\nand additionally the hsv-hex-notation:\n\n!hsv, !hhssvv, !hhhsssvvv and !hhhhssssvvvv\n\n$pdf->linedash @dash\nSets linedash.\n\n$pdf->linewidth $width\nSets linewidth.\n\n$pdf->transform %opts\nSets transformations (eg. translate, rotate, scale, skew) in pdf-canonical order.\n\nExample:\n\n$pdf->transform(\n-translate => [$x,$y],\n-rotate    => $rot,\n-scale     => [$sx,$sy],\n-skew      => [$sa,$sb],\n)\n\n$pdf->move $x, $y\n$pdf->line $x, $y\n$pdf->curve $x1, $y1, $x2, $y2, $x3, $y3\n$pdf->arc $x, $y, $a, $b, $alfa, $beta, $move\n$pdf->ellipse $x, $y, $a, $b\n$pdf->circle $x, $y, $r\n$pdf->rect $x,$y, $w,$h\n$pdf->rectxy $x1,$y1, $x2,$y2\n$pdf->poly $x1,$y1, ..., $xn,$yn\n$pdf->close\n$pdf->stroke\n$pdf->fill\n$pdf->fillstroke\n$pdf->image $imgobj, $x,$y, $w,$h\n$pdf->image $imgobj, $x,$y, $scale\n$pdf->image $imgobj, $x,$y\nPlease Note: The width/height or scale given is in user-space coordinates which is subject\nto transformations which may have been specified beforehand.\n\nPer default this has a 72dpi resolution, so if you want an image to have a 150 or 300dpi\nresolution, you should specify a scale of 72/150 (or 72/300) or adjust width/height\naccordingly.\n\n$pdf->textstart\n$pdf->textfont $fontobj,$size\n$txt->textleading $leading\n$pdf->text $string\nApplies the given text.\n\n$pdf->nl\n$pdf->textend\n$pdf->print $font, $size, $x, $y, $rot, $just, $text\nConvenience wrapper for shortening the textstart..textend sequence.\n",
            "subsections": []
        }
    },
    "summary": "PDF::API2::Lite - (do not use)",
    "flags": [],
    "examples": [],
    "see_also": []
}