CAM::PDF::GS(3pm)

CAM::PDF::GS3pm

Pdf graphic state

Usage

    use CAM::PDF;
    my $pdf = CAM::PDF->new($filename);
    my $contentTree = $pdf->getPageContentTree(4);
    my $gs = $contentTree->computeGS();

Overview

This class is used to represent the graphic state at a point in the rendering flow of a PDF page. Much of the functionality is actually based in the parent class, CAM::PDF::GS::NoText.

Subclasses that want to do something useful with text should override the renderText() method.

Conversion functions

$self->getCoords($node)

Computes device coordinates for the specified node. This implementation handles text-printing nodes, and hands all other types to the superclass.

$self->textToUser($x, $y)

Convert text coordinates ("Tm") to user coordinates. Returns the converted X and Y.

$self->textToDevice($x, $y)

Convert text coordinates ("Tm") to device coordinates. Returns the converted X and Y.

$self->textLineToUser($x, $y)

Convert text coordinates ("Tlm") to user coordinates. Returns the converted X and Y.

$self->textLineToDevice($x, $y)

Convert text coordinates ("Tlm") to device coordinates. Returns the converted X and Y.

$self->renderText($string, $width)

A general method for rendering strings, from "Tj" or "TJ". This is a no-op, but subclasses may override.

$self->Tadvance($width)

Move the text cursor.

Data functions

$self->BT()
$self->Tf($fontname, $fontsize)
$self->Tstar()
$self->Tz($scale)
$self->Td($x, $y)
$self->TD($x, $y)
$self->Tj($string)
$self->TJ($arrayref)
$self->quote($string)
$self->doublequote($tw, $tc, $string)
$self->Tm($m1, $m2, $m3, $m4, $m5, $m6)

Releases

7 releases since Debian 7 (Wheezy); the text changed 3 times.

  1. 7
  2. 8
  3. 9–11
  4. 12–13

License

See CAM::PDF.

Author

See CAM::PDF

From libcam-pdf-perl 1.60-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.