O'Reilly logo

PHP Advanced for the World Wide Web: Visual QuickPro Guide by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Drawing Shapes

Since you now understand how to use fonts, it's time to add a little graphical flare to the PDF. With just a few functions, you can make lines, rectangles, circles, polygons, arcs, and more. There are numerous factors you can adjust, including the line width and color.

The only thing you really need to understand about drawing shapes in PDFs is that the process takes two steps: defining the path and then stroking it. This may sound familiar to anyone who has used a vector-based graphics program such as Adobe Illustrator. First you define a path by identifying points along it—a line requires two, a rectangle four, and a circle a whole, whole lot. Defining the path (or clipping path as its formally called) does not actually create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required