Shortcut to rotate in fractions

A colleague of mine recently had a task of inserting lineart scans into an InDesign file and then rotating the images so that they were straight on the page.

During this process, he’d asked:

What’s the shortcut for rotating an image by a fraction of a degree?

While I can remember many of the shortcuts used in InDesign, I couldn’t remember a shortcut for this item, and after consulting my InDesignSecrets shortcut poster I realised that there isn’t one. There is a shortcut to increase the angle from 1 degree to 5, but not smaller increments… which I thought was something that people would have asked for by now.

For the task he was doing, he definitely needed one, otherwise the workflow was:

  1. Select the item to rotate;
  2. Go to the rotate tool;
  3. Type the fraction and click OK
  4. Check the result and if further adjustment was required, click back into the rotate tool and type a new fraction and try again until acceptable.

A shortcut would definitely make this easier.

Tomaxxi to the rescue

Luckily, one was easy to find online. Scripter Marijan Tompa (whom some may know by the name Tomaxxi) wrote an article on how to write such a script.

In my colleague’s case, the script only needed to be adjusted by changing the angle from 45 in Marijan’s example to 0.1 like so:

var myTrans = app.transformationMatrices.add({counterclockwiseRotationAngle:0.1});
var myObj = app.selection[0];
myObj.transform(CoordinateSpaces.pasteboardCoordinates, AnchorPoint.CENTER_ANCHOR, myTrans);

The script was saved as rotateAnticlockwise.jsx and added to the scripts. A second copy was made but this time adjusted from counterclockwise to clockwise like so:

var myTrans = app.transformationMatrices.add({counterRotationAngle:0.1});
var myObj = app.selection[0];
myObj.transform(CoordinateSpaces.pasteboardCoordinates, AnchorPoint.CENTER_ANCHOR, myTrans);<code>

This too was saved as rotateClockwise.jsx. and added to the scripts.

From here, my colleague could then go to the scripts palette and run the scripts as required.

Similarly, my colleague could make sure that scripts was checked from the quick apply menu.

And from here, go to quick apply by pressing Command + Return and typing the first few letters of the script. This choice would stay in the quick apply so need only be done once.

But the title of the article was a shortcut, so shortcuts had to be applied. That is easily done though by going to the Edit Menu and selecting Keyboard Shortcuts.

In the next dialog box, choose Scripts from the Product Area, navigate to the appropriate script, then place the cursor in the New Shortcut text field in the bottom right and press the keys to become the new shortcut. If the type beneath says [unassigned] it means it won’t interfere with other shortcuts, so click Assign. Do the same for both scripts, choosing different shortcuts for both.

Done. My colleague now had his shortcuts and could rotate the images without having to keep moving his cursor to the rotate panel and manually key in entries.

Given the scripts now had their own shortcuts, these were also visible in the scripts panel, just in case my colleague forgot what the shortcuts were.

But importantly because shortcuts were assigned, they could also be hot-keyed to his ergonomic mouse. Similarly, the commands could be hot-keyed to other inputs such as those discussed in a previous article.

On that note, I thought a shortcut like this would exist, given the amount of other shortcuts that allow for nudging/moving in smaller units. What are your thoughts? Let me know in the comments whether this is a specific use-case, or something to be pursued over at the InDesign suggestions.

Export many PDFs at once… plus security

A recent question on Reddit’s InDesign subreddit was whether two PDFs could be exported at the same time from the same document, but have two different properties – one with trims and one without. The answer is yes, but via a custom script written for the task.

I use such a script on a daily basis so that I can prepare a PDF for client proofing via email; and a separate PDF that has trim and crops that is sent directly to a hot-folder that prints it for me.

I’d submitted my script as a solution (that can be downloaded from the scripts page), but then realised that this concept was not a new idea. Ariel Walden over at ID-Extras had already written a similar script within a blog post of his own.

Similarly, Peter Kahrel’s Batch Convert script can perform the same task, with the added advantage that it can also do this for all open InDesign documents;

Or if no documents are open, a specified folder (and subfolders if desired) of InDesign files.

Can’t make these secure

One feature that all three scripts have in common is that the exports are based on the PDF presets available on the user’s machine. One feature that can’t be added to a PDF preset is security – this can only be done when a request to export the document is made, as security settings aren’t saved into PDF presets.

This is a problem if there are lots of documents that need to be exported with security settings as it requires the user to enter the security details each time a PDF is exported.

I’ve made an additional script

For this purpose, I thought I would make a script that not only makes several PDFs, but can also add password security to one version. The script can be downloaded from the scripts page.

When the script is run, it will generate two PDFs using different PDF export settings, but one will have the suffix “_secure” added to the filename, and a dialog box will appear once the export is finished:

Adjustability

The script can also be adjusted by opening the script in any text editing application and making the necessary changes, such as.

Use the same password for every document

Look for the line

    openDocumentPassword = myPassOpen; // requires a password to open the document

and change the myPassOpen to the desired password in quotations. For example:

    openDocumentPassword = "OpenSesame"; // requires a password to open the document

Similarly, do the same thing for the line underneath, making sure that the open password and edit password are not the same.

    changeSecurityPassword = myPassWrite; // requires a password to change the document

change to

    changeSecurityPassword = "EditSesame"; // requires a password to change the document

then search for the lines

dialog.show();
//alert("Done");

and swap the forward slashes in the lines around so that the lines now read like this.

//dialog.show();
alert("Done");

Only require a password to edit the document

Look for the following line:

    openDocumentPassword = myPassOpen; // requires a password to open the document

and add two forward slashes to the start of the line.

//    openDocumentPassword = myPassOpen; // requires a password to open the document

Adding two forward slashes to a line in a javascript tells the script to ignore the rest of the line and go to the next line of code.

Don’t show the “done” message

The default script has a dialog at the end for showing what the opening and editing passwords are, but if you want to edit the script so it makes a PDF that applies security to edit the document but does not provide the password (e.g. for the purpose of handing PDFs over to parties who may seek to deconstruct them in other applications) then make the adjustment mentioned a moment ago to restrict passwording to editing only, and then search for the lines

dialog.show();
//alert("Done");

and swap the forward slashes in the lines around so that the lines now read like this.

//dialog.show();
alert("Done");

Add more PDF exports

Look for the line

app.activeDocument.exportFile(ExportFormat.pdfType, File(resultsFolder + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"), false, "[High Quality Print]");

make a copy of the line and make the appropriate changes:

  • Replace the “[High Quality Print]” to the desired PDF preset exactly as it is written in the PDF export dialog box and put it in quotes. For example, if your PDF preset is called My Export then type “My Export”
  • Replace the “.pdf” with a suffix that denotes that this is an additional PDF. For example, if the pdf is a high res print, perhaps replace this with “_hi-res.pdf” so that the resulting file has _hi-res.pdf at the end of its filename.

Otherwise if you are after specific changes to the script to suit your needs, contact me via the contact page.

Things to know about the script

Opening and editing passwords must be different

One condition of preparing a secure PDF from Adobe InDesign is that the password required to open the PDF must be different to the password to edit the PDF, so if editing the script to replace the randomly generated password to a known one, the opening and editing passwords must be different. If the passwords are the same, the PDF will be made without security.

PDF Standard in the preset must be set to “None”

PDFs that use a PDFX standards can’t have security applied to them as the security panel of the PDF export box is greyed out, preventing security to be applied. The standards dropdown box in the desired PDF preset must be set to None.

Only password security is applied

When exporting a PDF from InDesign, only password security can be applied, unlike Adobe Acrobat’s choices of security that it can offer (as shown below).

While password security may deter or prevent a layperson from editing the PDF, the security can be broken through some effort. Several websites offer services where users can drag and drop a PDF to the site, and within moments the PDF will have the PDF password removed.

Similarly, there are desktop applications that can also be purchased to remove the security (as one of their many features), such as PDFsam Visual.

Small tips to save big time

I often find it interesting to watch the different ways that my colleagues and I may perform the same task. Take the InDesign command Paste in Place for example. I’ll typically use the keyboard shortcut, but I’ve noticed that one colleague will go to the edit menu and select it from there; another will right-click and access it through the contextual menu, while another has an ergonomic mouse that has the shortcut hot-keyed to an additional button (No-one used InDesign’s quick apply panel).

While there are many ways to accomplish the same task, they all take different amounts of time and hand travel. A two-handed keyboard shortcut takes less time than navigating through the menus and – if using a mouse – leaves the cursor in its last position; but takes one hand off of the mouse briefly. In my situation, I’m using a Wacom tablet, so after using a keyboard shortcut, I then have to reposition the cursor as I’m usually still holding the stylus in my right hand. I’m also not a fan of the gymnastics my hands have to often do to in order to execute a task, and recently I’ve been hot-keying eight of my commonly used shortcuts to the contextual menu of my stylus.

Luckily in the Paste in Place example, there is more than one way to accomplish the task, and there’s no right way to use this – it is whatever is most comfortable for the user. What I would like to highlight in today’s article is how to accomplish common tasks more efficiently.

It is worth pointing out that this isn’t an exhaustive list and doesn’t get into details that might require the purchase of dedicated software such as Digital Asset Management software, or the creation of hot folders from software such as EFI Fiery Command Workstation, but is a few tips that anyone of any skill level can take advantage of to save a minute here and there from their workflows.

Within InDesign

Add your own interface items

The option to edit Keyboard Shortcuts and Menus can be found from the Edit menu

Keyboard Shortcuts (KBSC)

From the keyboard shortcuts menu, it is possible to assign keyboard shortcuts to items that do not have shortcuts assigned by default, as well as redefine shortcuts from the defaults. Shortcuts can also extend to scripts in the scripts panel as well.

Add own menu items

It is possible to make your own set of menu items using InDesign’s own menu customisation, but this only allows users to create their own menu sets based on the default set – you can’t make your own new items… without scripting. Indiscript’s Marc Autret has an article where he explains an overview of how this can be done, and provides examples as well.

Add own contextual menu items

Adding the Draw Measurement Arrows script to the contextual menu.

Silicon Publishing’s Ole Kvern wrote an article about making a contextual menu startup script that adds functionality to the contextual menu available via the right mouse button. However, I’ve since added my own functionality based on his script by editing the script in a text editor and adding my own items.

Improve on viewing the current items

Customise workspaces

Does every tool need to be visible or docked all at once? Perhaps consider making workspaces more appropriate to the workspace that is actually being used. InDesign ships with some defaults that behave this way, but it is worth experimenting.

Using Bart van de Wiele’s CreativePro 2020 tip to make a custom links palette separate to the usual links palette.

An extreme (and clever) example was demonstrated at the CreativePro 2020 Online Conference by Adobe’s Bart van de Wiele. In the 3 minutes max session, he demonstrated a way of customising the Links palette and saving it as its own workspace – allowing more information about a link to be viewed briefly, and then navigating back to the regular workspace.

Improvement on the scripts panel

Peter Kahrel’s runscript user interface

InDesign’s default script panel literally mirrors how the scripts are filed in finder/explorer, but is missing many features such as a search facility and could really use an overhaul, given its appearance hasn’t changed since InDesign was released. Luckily, Peter Kahrel has made his own launcher that allows scripts to be filtered by name.

Within any application

Not all tips are specific to Adobe InDesign. One Adobe application in particular – Adobe Acrobat – has long been criticised for its lack of customisation, so any opportunity to improve its use is appreciated.

Better navigation

Use dictation

For users that hunt and peck the keys rather than touch-typing, it is worth considering using the real-time dictation features in Mac and Windows operating systems (and some specific software) as word recognition is on par with typing speeds up to 90 words per minute or more.

Learn the new OS features

Each time the operating system is updated, it is worth paying attention to the changes made by the platform for any time-saving features. One example from my own circumstances is using spotlight to access applications rather than the dock.

Default Folder X

I was introduced to this paid Mac plug-in from St Clair Software several years ago and I’ve been using it since. It extends the functionality of save as dialogs which provides recent folders, open folders and favorites.

Controller specific shortcuts

While keyboard shortcuts were mentioned earlier in the article, it is worth noting that they can usually be applied as buttons to controllers that are beyond the usual two-button mice that can be found in an office.

Wacom Stylus

The default radial menu accessed via the Wacom Desktop Center

I’ve used the base-model stylus for years. In addition to the buttons on the stylus, there are four more buttons on the tablet; and the ability to call upon a contextual menu with one of the stylus buttons that allows more tasks to be carried out.

Gaming mice

Mapping custom keys to the Logitech G300S gaming mouse.

I was introduced to this tip once again at CreativePro 2020 online, and it seemed like such a simple idea that I’d wondered why it hadn’t been implemented in my workplace. For example, a base-model gaming mouse such as the Logitech G300S has nine programmable buttons.

Touch portal

A simulated appearance of an iPad using sideshowfx’s Photoshop shortcuts via Touch Portal.

Long-known to live-stream performers on Twitch and Youtube is a product called the Elgato Streamdeck. Put simply, it is an additional keyboard that is customizable to quickly access shortcuts via one button instead of the keyboard gymnastics that can come with some keyboard shortcuts.

A cheaper alternative is software called Touch Portal, and this turns a smartphone or tablet into a streamdeck-like device – ideal for anyone who has an old smartphone or tablet that isn’t otherwise in daily use. The free version is limited to two screens with eight icons each, but a paid version is offered with far more extensibility at a price that is affordable for any pocket.

While this does require its own customisation, SideShowFX has boxed up a collection of Photoshop, Illustrator, After Effects and Premiere shortcuts that are ready to install. Their youtube page has a great explanation of how it all works.

Have it your way

Ultimately, these are solutions that I find helpful, but I like to keep an open mind to new techniques and strategies to get my work done efficiently and accurately. If you have any techniques or strategies you would like to share, please leave a comment or get in touch directly via the contact page.

Data Merge to Single Records Pro: Now Available

Since 2016, Colecandoo has provided the free version of the Data Merge to Single Records script for Adobe InDesign – a script that allows single records to be exported from Data Merge with unique filenames available from the Data Merge database itself. This improves Adobe InDesign’s default – naming each file Untitled-N and is only available for InDesign files, not PDFs.

On that note, the PRO version of this script is now available!

This script improves upon the free original by:

  • Exporting to various additional file formats, such as interactive PDF, EPS, PNG, JPG, direct to print, or PDF via InDesign first;
  • Add a primary key to either the start or the end of a filename;
  • When exporting to certain file formats – the ability to run a user-selected additional script before the export.

The script can be purchased for A$15 from the Buy Now button below.


The original Data Merge to Single Records script offered by Colecandoo remains free and can be downloaded from the scripts page.

%d bloggers like this: