---
name: "CAM::PDF::Renderer::Text"
section: "3pm"
platform: "linux"
package: "libcam-pdf-perl"
version: "1.60-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/CAM::PDF::Renderer::Text"
---

# CAM::PDF::Renderer::Text(3pm)

Render an ASCII image of a PDF page

## NAME

CAM::PDF::Renderer::Text - Render an ASCII image of a PDF page

## LICENSE

See CAM::PDF.

## SYNOPSIS

```
    use CAM::PDF;
    my $pdf = CAM::PDF->new($filename);
    my $contentTree = $pdf->getPageContentTree(4);
    $contentTree->render("CAM::PDF::Renderer::Text");
```

## DESCRIPTION

This class is used to print to STDOUT the coordinates of each node of a page layout.  It is written both for debugging and as a minimal example of a renderer.

## GLOBALS

The `$CAM::PDF::Renderer::Text::xdensity` and `$CAM::PDF::Renderer::Text::ydensity` define the scale of the ASCII graphical output device.  They both default to 6.0.

## FUNCTIONS

- $pkg-\>**new()**

  Calls the superclass constructor, and initializes the ASCII PDF page.

- $self-\>renderText($string)

  Prints the characters of the screen to our virtual ASCII framebuffer.

- $self-\>**toString()**

  Serializes the framebuffer into a single string that can be easily printed.

## AUTHOR

See CAM::PDF
