This article originally appeared in TidBITS on 2016-04-02 at 7:00 a.m.
The permanent URL for this article is: http://tidbits.com/article/16379
Include images: Off

The Power of Preview: Annotating Documents and Images

by Adam C. Engst and Josh Centers

The last time we explored Preview, OS X’s built-in document and image viewer, we discussed using it to crop and resize images, as well as how to undo those changes (see “The Power of Preview: Cropping and Resizing Images [1],” 18 March 2016). Although Preview has many more image manipulation tools, we’re focusing this week on Preview’s annotation capabilities, which you can use to mark up an image or PDF (you can’t annotate Microsoft Office or iWork documents).

Most of Preview’s annotation tools are available in the Tools > Annotate menu, but it’s often easier to find them in the Markup Toolbar, which you can display by clicking the toolbox icon on the main toolbar, or by choosing View > Show Markup Toolbar (Command-Shift-A).

[image link] [2]

The Colour and the Shape -- The Preview annotation tool we use most often is Shapes, which makes it easy, for instance, to call out a particular interface element in a screenshot. You can find all available shapes under Tools > Annotate > Rectangle, Oval, Line, Arrow, Polygon, and Star. However, it’s usually faster to access Shapes on the Markup Toolbar.

[image link] [3]

Whether using the menu or toolbar, choose a shape to insert it into your document or image. It appears in the center of your document; to insert a new shape at a particular spot, click Shapes on the Markup Toolbar, and then drag the desired shape to the spot you want.

A selected shape is surrounded by blue drag handles you can use to adjust the shape’s dimensions. As in many image manipulation apps, you can press Option while dragging a handle to resize from the center, and press Shift to maintain the shape’s aspect ratio. For lines and arrows, the Shift key constrains the line to 45-degree angles.

[image link] [4]

You can, of course, move the shape, by placing your cursor on the shape anywhere other than on a drag handle — when your cursor becomes a hand, click and drag to move the shape. Or just click once to select the shape, after which you can use the arrow keys to nudge it more precisely.

As is often the case, if you need more than one shape of the same type, you can either use copy and paste, or simply hold down Option and drag the shape, as if to move it, to create an exact duplicate.

The line, polygon, and star offer additional possibilities. When first inserted, lines are straight, but a green drag handle in the middle of the line lets you make it into a smoothly curved line. By default, inserting a polygon adds a hexagon to your document. But if you select it and look closely, you’ll see another green drag handle. Move that handle counter-clockwise to remove sides, down to three, or clockwise to add sides, up to 12. The star shape works similarly, except it has two green handles, one that adds or remove points and another you can use to change the length of the points. For both the polygon and the star, the Shift key’s behavior is reversed; the resizing handles maintain aspect ratio by default, and the Shift key lets you change the horizontal and vertical dimensions independently.

[image link] [5]

It’s possible to rotate a shape, too, but only if you have a trackpad. Select the shape, put your thumb and forefinger on the trackpad, and twist. Make sure you have a shape selected first, because otherwise Preview rotates the entire image (in 90-degree increments).

After adjusting the shape, size, and position, you can further customize the shape’s look with options on the Markup Toolbar:

[image link] [7]

There are a few ways to use these tools in constructive ways other than inserting pretty shapes. A technique we use frequently at TidBITS and Take Control is to place a red oval or rectangle with no fill around interface elements we want to draw attention to. Even if you’re not a technology writer, snapping a quick screenshot (which you can do from within Preview, as you learned in “The Power of Preview: Pulling Files into Preview [8],” 25 February 2016), highlighting an onscreen item, and sending the annotated screenshot to a friend can save time and frustration when trying to assist with a technical issue. Arrows can also be useful for pointing out specific details.

Shapes can also be helpful for redacting text from PDFs that you’re planning to print. Create a rectangle with a black stroke and a black fill and drag it over a portion of a document you wish to obscure. When you print the document, the black rectangle will cover the sensitive material. (Josh once had a job that involved doing this for thousands of documents, albeit not with Preview.) Don’t assume this technique will work for PDFs you’re distributing digitally; the shapes remain editable objects that can be moved and deleted in both Preview and Adobe Reader. For a true redaction capability that deletes the text underneath the black bar, use Smile’s PDFpen [9] or Adobe’s Acrobat Pro.

Preview remembers your settings, so if you generally want shapes with 3-point red strokes and no fill, you’re all set. Unfortunately, there’s no way to save different settings, so if you switch to a black rectangle, reverting to your previous settings must be done manually.

With PDFs, annotations remain unique, editable objects, even after you save, close, and re-open a document. However, with images, that’s not true. Once you close an edited image, all your annotations are flattened into the underlying bitmap of the image and can no longer be selected and manipulated individually. In other words, make certain that you’re done adjusting annotation shapes before you close the file.

One final tip here. You might think that you could use Edit > Select All (Command-A) to select all the annotations you’ve made and delete them. You’d be wrong; that selects all the previously existing picture content instead. However, you can Shift-click multiple objects to select them simultaneously for moving or deleting all at once.

Who Was That Masked Loupe? -- For an alternative way to call things out, check out the Mask and Loupe shapes, both available from View > Annotate and the Shapes button menu in the Markup Toolbar.

Mask is a bit tricky to use because it’s sort of a reverse shape: the actual shape is a large gray border that deemphasizes what it covers. Inside that border is a “no fill” rectangle that you position over the portion of the image you want to highlight. The blue drag handles work as you’d expect, but to select or move the rectangle, you must click outside it, not inside, like every other shape. Play with the mask shape on a throwaway image so you can get a sense of how you might use it.

[image link] [10]

Loupe inserts an onscreen magnifying glass, which is a helpful way to highlight small details, but it also distorts the image, which can be confusing to the viewer. You change the size of the loupe with the blue drag handle and adjust the zoom level with the green drag handle.

[image link] [11]

The Pen Is Mightier -- If you’d rather draw shapes yourself, Preview lets you do that. In the Markup Toolbar, the third button from the left activates the Sketch tool, which doesn’t appear to have a menu equivalent. Select it, and click and drag to draw the desired shape.

What Preview does next depends on what you drew. If Preview thinks you were trying to draw a square, for instance, it changes your drawing to be a proper square shape. Likewise with triangles, ovals, lines, arrows, and other shapes — it’s a loose interpretation. Usually, if you draw an unidentifiable squiggle, Preview will leave the squiggle as is, but its behavior isn’t always predictable.

Thankfully, if you don’t care for Preview’s interpretations, or if Preview couldn’t see that you meant to draw a dialog balloon, you have a chance to correct it. After drawing a shape, look closely at the upper left of the window, where a small popover appears with your original and a choice of possible replacement shapes. Click the one you want, but be aware that you get only one shot, since the popover vanishes forever after you choose, or if you deselect the shape.

[image link] [12]

If you happen to have a trackpad equipped with Force Touch, note that the Sketch tool is pressure-sensitive, so you can press more firmly to darken the line as you draw.

The Sketch tool can be useful in ways you might not expect. For instance, imagine that you’re trying to give someone directions on a trail. Bring up the area in satellite view in Google Maps, take a screenshot, and then use the Sketch tool to draw a freehand line indicating where to go.

Texting While Annotating -- Shapes are great, but what about when you want to add a description to an annotation or complete a PDF form that lacks interactive form fields? For that, you can insert text. And, not surprisingly, Preview offers quite a few ways to do so.

The main way to insert text is to choose Tools > Annotate > Text (Command-Control-T) or click the Text button in the Markup Toolbar. Preview inserts a text box, with “Text” as a placeholder. You can move and resize this text box just as you would a shape, although it can be a little fussy, since clicking inside the text box edits the text instead of grabbing the box. Try these techniques to make moving it easier. First, click anywhere else to deselect the text box, hover over the deselected text box until you see the hand cursor, and then click and, without letting up, drag. Second, if the text box is already selected, hover over the outlined edge to get the hand cursor and drag.

To change a text box’s typeface, point size, color, style, and alignment, select the text box and click the Text Style drop-down menu in the Markup Toolbar, which is the rightmost button. You can’t style individual words or characters in the text box separately.

You can also use the Shape Style, Border Color, and Fill Color menus to further customize the look of the text box, just as you can with shapes. Border Color lets you add a border to the text box and give it a color, Shape Style offers stroke thickness and style choices, and Fill Color adds a background color to the text.

[image link] [13]

For more fun, try speech bubbles, which you insert by choosing Tools > Annotate > Speech Bubble or from the Shapes button in the Markup Toolbar. They work just like regular shapes, with the addition of two green drag handles for controlling the tip and base of the arrow. They can be fun for snapshots, but we’d caution you against using them in professional documents.

[image link] [14]

In fact, although it’s not inherently obvious, you can actually add text to any of the shapes, including lines and arrows. For those two, the text appears off to one end of the line; for the rest, the text shows up inside the shape.

Take Note -- In “The Power of Preview: Viewing Images and PDFs [15]” (13 March 2016), we discussed highlighting text in PDFs and adding notes to your highlights. That’s all fine and nice, but what if you want to leave a comment that’s not associated with text? For that, Preview lets you insert free-floating notes, which are represented by small yellow squares that only coincidentally resemble Post-it® sticky notes. (You can’t insert notes into images.)

To insert a note into a PDF, choose Tools > Annotate > Note (Command-Control-N) or click the Note button in the Markup Toolbar. Preview adds a small yellow square to the center of the current page, popping out a larger yellow rectangle into which you can type text. Enter as much text as you want; the yellow rectangle expands to hold it. Click anywhere outside the yellow rectangle to close it, leaving just the little yellow square.

[image link] [16]

There are five things you can do with the square after clicking to select it:

Remember that you can navigate to these notes in the sidebar, by choosing View > Highlights and Notes. Plus, you can add text to the notes in the sidebar, or edit them there, which is often easier than opening and closing the editing rectangle.

[image link] [17]

Sign on the Dotted Line -- Here’s a classic problem: someone sends you a form to sign via email. You have to print it, sign it, and then scan it back into the computer so you can email it back (or, horrors, fax it). Preview solves this problem neatly with its signature feature, found in Tools > Annotate > Signature, but more easily accessible in the Markup Toolbar. It enables you to create one or more signatures, and then easily add them to images and PDFs.

There are two ways to create a digital signature: by scanning a handwritten signature with the Mac’s webcam or by writing it on the trackpad. Obviously, if all you have is a mouse, you’ll want to use the camera method.

To create a signature with a trackpad, click the Sign button in the Markup Toolbar and choose Create Signature. Click the Click Here to Begin button and write out your signature on the trackpad with your finger — if you have a capacitive stylus for an iPad (not an Apple Pencil), it will likely work better. There’s no way to erase, so if you’re unhappy with the results, click Clear and try again. When you’re satisfied, click Done to add the signature to Preview’s list.

[image link] [18]

However, using a webcam like the FaceTime camera built into most Macs is arguably the better way to make a signature. Sign your name on a blank, white piece of paper, preferably with a black marker. Choose Create Signature and click the Camera button. Inside the popover, a window appears displaying what your camera sees. Hold your paper signature up to the camera, making sure to get it close and lined up with the blue line. When Preview detects the signature, it displays the digital version in the camera window. Again, if you don’t like the results, click Clear and try again, or if you’re happy, click Done to save the signature.

[image link] [19]

Once created, your signature is easy to insert into an image or PDF. Choose Tools > Annotate > Signature or click the Sign button again. This time, you’ll see your new signature there. Choose it to insert it into the document, where you can move and resize it like any other shape. You can also adjust its color by modifying the Border Color settings, although signatures can’t use the Fill Color option.

[image link] [20]

Although we’re not suggesting illegal forgery, if you find yourself in a situation where you often need to sign things for your boss or for an incapacitated relative, getting that person’s signature into Preview can make signing electronic forms for them much easier.

Once you save the PDF, the signature is embedded into the PDF’s visual layer, so it can’t easily be copied out and reused. Of course, someone could extract it by taking a screenshot of it in the PDF, but they could also scan or photograph a paper document to get the signature, so there’s no real difference in security either way.

Note that these signatures will sync to other Macs if you have iCloud Keychain turned on in System Preferences > iCloud > Keychain, and you can use your signatures when marking up images in Apple Mail.

We’ve now shown you how to use Preview to open and import files, efficiently view images and documents, crop and resize documents and images, and annotate documents and images. But it will be another few articles before we’re done — stay tuned for more on the power of Preview!

[1]: http://tidbits.com/article/16339
[2]: http://tidbits.com/resources/2016-04/Preview-Markup-Toolbar.png
[3]: http://tidbits.com/resources/2016-04/Shapes-button.png
[4]: http://tidbits.com/resources/2016-04/Preview-circle.png
[5]: http://tidbits.com/resources/2016-04/Preview-polygon.png
[6]: http://tidbits.com/resources/2016-04/Shape-Style.png
[7]: http://tidbits.com/resources/2016-04/Shape-color.png
[8]: http://tidbits.com/article/16284
[9]: https://smilesoftware.com/pdfpen
[10]: http://tidbits.com/resources/2016-04/Preview-mask.png
[11]: http://tidbits.com/resources/2016-04/Preview-loupe.png
[12]: http://tidbits.com/resources/2016-04/Preview-Sketch-tool.png
[13]: http://tidbits.com/resources/2016-04/Preview-wild-text.png
[14]: http://tidbits.com/resources/2016-04/Preview-speech-bubble.png
[15]: http://tidbits.com/article/16323
[16]: http://tidbits.com/resources/2016-04/Preview-solo-note.png
[17]: http://tidbits.com/resources/2016-04/Preview-note-sidebar.png
[18]: http://tidbits.com/resources/2016-04/Preview-trackpad-signature.png
[19]: http://tidbits.com/resources/2016-04/Preview-camera-signature.png
[20]: http://tidbits.com/resources/2016-04/Preview-signature.png