Skip to content

tbrowder/PDF-GraphicsUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status Actions Status Actions Status

NAME

PDF::GraphicsUtils - Provides classes and routines for manipulating PDF page objects.

SYNOPSIS

use PDF::Lite;
use PDF::GraphicsUtils;
my PDF:Lite $pdf .= new;
my $page = $pdf.add-page;
my $g = Graphics.new: :$page;
# draw a circle on the page with values in PS points
my ($x, $y, $radius) = 200, 200, 30;
$g.circle: :$x, :$y, :$radius; 
# use other units of length for another circle
$g.circle: :x<2in>, :y<3in>, :radius<0.5in>; 
$pdf.save-as: "mypdf.pdf";
# View the pdf file and see two circles

DESCRIPTION

PDF::GraphicsUtils is a large collection of graphics objects with the ability to use various units to place them on the page as well as to describe their shape. See a complete list of graphics methods at GRAPHICS-METHODS.

Units available:

Length

If a number is entered without a suffix, the number is treated as a value in PS (PostScript) points (72 per inch). A unit may be specified with a one- or two-letter suffix as shown in the following table.

Unit Suffix
PostScript ps
millimeters mm
centimeters cm
inches in
feet ft
meters m
yards y

Angle

If a number is entered without a suffix, the number is treated as a value in degrees. A unit may be specified with a three-letter suffix as shown in the following table.

Unit Suffix
degrees deg
radians rad

AUTHOR

Tom Browder tbrowder@acm.org

COPYRIGHT AND LICENSE

© 2024 Tom Browder

This library is free software; you may redistribute it or modify it under the Artistic License 2.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages