PDF Editing Toolbar UI on iOS

The Document Editor toolbar holds a set of buttons that can be used to perform document editing actions. Some of the buttons are context-sensitive and are enabled only on demand, based on factors such as the selection state in the document view. See the Actions section for a detailed description of all the actions you can perform with these buttons.

Take a look at the DocumentEditorToolbarCustomizationExample.swift example from the Catalog app for more details about how to customize the Document Editor toolbar.

The toolbar can be moved to different positions onscreen using the drag handle on the right (or bottom) side of the toolbar.

Pages of a document with a draggable toolbar shown on top

Actions

In addition to the drag-and-drop action, which you can perform directly on the document view, there are many other actions you can perform using the Document Editor toolbar.

The following table lists all the toolbar buttons:

Icon Name Description
New New Shows the new page creation user interface
Remove Remove Removes the currently selected pages from the document
Duplicate Duplicate Creates copies of currently selected pages
Rotate Rotate Rotates the selected page 90 degrees clockwise, and can be invoked multiple times
Export Export Shows the export user interface that allows the selected pages to be saved as a new document
Select Select Toggles between selecting and deselecting all pages
Copy Copy Puts the selected pages in the clipboard
Paste Paste Pastes pages from the clipboard, inserting them at the selected location or end of the document
Undo Undo Undoes the last document editing action
Redo Redo Redoes the last undone document editing action
Done Done Exits document editing, prompting to save changes if needed

New Page

The first toolbar button allows you to create new pages, which are inserted at the end of the document.

Add a new page to a document

You can configure several properties for new pages, including the background, background color, and size. The page background can be blank, one of the predefined patterns, or a custom image from your Photo Library. The Page Color selector includes both a set of common colors and a full color picker to select any color you desire. To switch between the two selection modes, swipe left or right when picking colors. The page size can be either one of the standard paper sizes or a size that matches the main page size of the current document. You can also opt for the new page to be oriented vertically or horizontally.

Export

The export toolbar action allows you to create a new document comprised of the pages selected in the document view. This action doesn’t modify the current document in any way. When it’s selected, you’ll be presented with a dialog where you can name the new PDF file and optionally select its location.

Export a file

Saving

Document editing changes aren’t persisted until an explicit save is performed. This means you can easily exit your document editing session without modifying the document by selecting Done and opting to Discard Changes.

If you want to save your changes, you generally have two options. You can save the changes to the existing document by selecting Save, or you can save the changes to a new file using Save As… The Save option might not be available for some types of documents (e.g. read-only documents). In that case, only the Save As… option will be displayed.

Save dialog

If you decide to save the changes as a new document, you can select Save As…, and a new dialog will be displayed. This will allow you to name the new document and optionally select its location. Selecting Save will complete the save and create the new PDF file.

Save As dialog