Automate PDF sizes and reduce manual adjustment time

frustratedA previous article talked about PDFs received from an online source and how parts of the production process could be automated. Some items that are not so easy to automatically fix can have automation assist to reduce the manual work. Adjusting bleed and page size in a PDF is one example.

Adjusting a PDF page size to accommodate bleed can be automated using JavaScript. An automated workflow should initially sort items by the product ordered. From there, the size of the PDF’s page can be determined and compared to what is required. Instead of failing a job without bleed, a copy of the file can be adjusted using JavaScript to make room for the bleed and the same JavaScript can set the trim box and bleed box for imposition.

To accomplish this there are some terms you need to familiarize yourself with in order to set up JavaScripts for Acrobat. The Bounding box or BBox is the grouping of actual image on the page. The measurements of the Bounding box cannot be changed but can be compared to the measurements of the media box. If the Bounding Box is smaller than the media box, you may not need to add image bleed. If it is the same size in either height or width, you will need to check out the file. Automation tools work perfectly to compare this data and sort files into what passes and what needs to be looked at.

Page boxes determine what we are sizing and how they fit together. The Page boxes are named: Media, Crop, Art, Trim and Bleed.

The Media box, is the actual size of the page size we are working with and what will print. The dimensions used in JavaScript are measured in points in the following order: [left, top, right, bottom]. JavaScript uses the left bottom corner for its [0, 0] measurement. So the Media box [left, top, right, bottom] of a 3.5 × 2 business card supplied without bleed would look like this: [0, 144, 252, 0].

To increase the size of the page, we adjust the Media box by 9 points all the way around. So the Media box will be adjusted as follows from the bottom left corner: [left -9, top 9, right 9, bottom -9]. This will make the PDF image centered in a 3.75 × 2.25 PDF page. The value of the new Media box will be [0, 162, 270, 0] and all new settings will be based on this value. The Trim box will then be set to [9, 144, 252, 9] and the Crop box and Bleed box will be set to match the Media box.

A simple JavaScript using the getPageBoxes( ) command and setPageBoxes( ) command can update any PDF automatically and send files that require bleed adjustment to an operator. This command gives you the ability to make the size change to a multi-page document or selected pages only (like even and odd pages).

Not all files arrive with the perfect specifications, but we do not want to have to open up every one of them. An automation tool like FullSwitch can inject a JavaScript into Acrobat based on a product or any other sorting information you would like to use. FullSwitch can send files to a folder on the server for viewing and send notification emails when they arrive. To increase image bleed, you can use the touch up object tool built into Acrobat or another PDF editor like Pitstop Extreme or the Pitstop Plugin. A more sophisticated tool like PowerSwitch can use Acrobat with the Switch Client to make items available in a checkpoint on a network for updating and forwarding to production.

All Adobe products have JavaScript reference guides, tutorials and examples online. It is worth your while to learn how simple JavaScripts and automation tools can be used and how fast they will increase your productivity.