Welcome to Colecandoo

Applying character styles over character styles

There may be occasions where more than one character style has to be applied to the same words, such as a highlight, italic, etc. I recently saw this request over at the InDesign requests page.

In the request, the requestor does hint at a way that this can already be achieved in InDesign, though it can be time consuming. Let’s start from the beginning and look at some text that has an italic character style applied to it.

But if I apply a separate highlight character style that I’ve also made…

The highlight appears but the italic is removed. Reapplying the italic character style to the word only changes the word back to italic and doesn’t preserve the underline.

One solution is to do a local override – that is to manually apply the appearance but without using a character style

Note the plus that appears to the right of the Paragraph Style 1 – this indicates a local override is present.

That works, but let’s say that the client asks for all italics to now be a tint of the colour initially used. That’s fine if character styles were applied as the italic style needs to be changed once in the properties of the character style. However, all the italics applied using local overrides will need to have their fills reapplied with the new settings.

Yes, the eyedropper tool and find/change can assist, but if character styles were applied, these additional steps would not be necessary.

In this circumstance, making a third style that has both the underline and italic would make sense.

In this case, it adds one more character style – not a big deal, but in a large document, the quantity of character styles can grow fast.

GREP Styles to the rescue

Take this chemical equation in a science textbook. It currently looks like this:

The subscripts in this equation have been applied with a character style that I’ve named sub. However, the author wants the reaction only in bold. If the equation is highlighted and then has a bold character style applied, this happens:

All of the subscript formatting of the numbers are lost.

I can then create a second style called “bold sub” that has bold and subscript properties and base the style on the bold formatting, but I then have to make sure I correctly apply the newly created style to the appropriate numbers… this now introduces a level of human error.

But what if I could apply the bold style and keep the subscripts? It is possible using GREP styles. Using the GREP code from this CreativePro post (look for Laurent Tournier’s post dated Oct 9 2010 in the comments) apply it to the paragraph style.

[editor’s note – I’ve adjusted mine to account for the naming of elements 113-118 as of 2018, so if you want that amended code, contact me via my contact page]

Now apply the paragraph style to the recently bolded text.

Brilliant! Note how the I-beam cursor is between two subscript numbers, yet the character style shows that this is bold only.

This technique can also be applied to other formatting where subscripts or superscripts need to be preserved, such as:

  • Ordinal Numbers
  • Numbers written with scientific notation
  • Squared or cubed measurements

It just requires the right GREP syntax. All of the above examples used GREP styles to format the subscripts and superscripts only. To learn this technique and others, apply to join the Treasures of GREP Facebook page.

Once again to illustrate the point, the author wants these six lines in bold. By highlighting the lines and applying the bold character style, the subscripts and superscripts stay in tact.

Nested styles

Similarly, this can also be achieved with Nested styles. Take the last two lines in the last example prior to applying the bold – if I want the ordinal number at the start of the line to be bold, I don’t have to write a GREP style but I can use a nested style such as the one below.

That will give me this result without applying any manual character styles to the text:

There are catches to this technique

The first catch is that the character styles must have the minimal amount of style changes only. That is the sub character style only changes the position of the character to subscript, so that is the only item that style will apply, while maintaining the rest of the paragraph style’s formatting.

The second catch is to be aware of the style hierarchy. The following list is in order of what style overrules another (from most to least dominant):

  • Local override
  • Local character style
  • Nested style
  • GREP style lowest in list in the paragraph style settings
  • GREP style highest in list in the paragraph style settings

There can be several advantages to layering character styles by using GREP styles:

  • Less character styles.
  • Time saving for commonly formatted items such as ordinal numbers.
  • Consistency based on GREP patterns for words.

Similarly, there can be drawbacks with this technique:

  • Looks for particular words or phrases, so not appropriate for instances where dozens of words or phrases may make more GREP styles than are manageable.
  • Applies to paragraph styles, if used over many paragraph styles, the GREP style needs to be applied repeatedly. Scripts can help with this, such as one I wrote on my scripts page, or GREP Editor from Peter Kahrel.
  • Can’t take a bold style and italic style and combine them – it can only apply additional attributes that weren’t there previously.
  • GREP styles (along with live preflight, page thumbnails, dynamic spellcheck and any other service that has to run while the document is being composed) can slow the processing speed of the machine, particularly on larger documents.

Outlining the problem… text outlining

From time to time, I will prepare PDF artwork for third party providers and then note that their specifications indicate “Convert all text to outlines” (also known as converting to curves or paths). But why do some third parties recommend this practice?

The PDF is opened in software other than Acrobat

For commercial printers, PDFs are usually imported into Raster Image Processing (RIP) software that will impose and trap the artwork for their printing methods. However, not all providers work this way and may need to open the PDF in applications other than Adobe Acrobat. For example, a third party that prepares cutting formes may open the file in Corel Draw or a CAD application that supports its CNC software.

This means that as the file opens, the application may ask for fonts not available to the third party.

This can be exacerbated if the PDF is opened not only in a different application than Adobe Acrobat, but also a different alphabet and writing system. Converting the type to outlines maintains the appearance of the type without requiring the font to be present.

Other reasons that text is converted to outlines

So special effects can be applied

InDesign, Illustrator and Photoshop can apply interesting special effects to vector objects, but not all of those effects can be applied to live type. The solution is to convert the type to outlines, thus converting the type to vector shapes that can have the desired effect applied.

To prevent editing by third parties

Limited editing is possible within PDFs using either Acrobat’s own editing tools or using plugins such as Enfocus Pitstop Professional. These tools can allow last minute alterations to text so long as the text is type and not converted to outlines.

Locking the PDF with password protection isn’t an option as this can prevent the file from being placed into layout software or RIP software for output, so the password is then required to unlock the file. PDF password protection is also somewhat breakable, with many websites offering services where PDFs can be uploaded, and then unlocked and then downloaded without the password protection. There are also PDF editing and viewing applications such as PDF Sam that allow for decryption of PDFs.

Even without the Enfocus Pitstop plug-in, it is possible to open PDFs in Adobe Illustrator or Affinity Publisher and then – if the fonts are available – make the necessary alterations… though converting type to outlines will prevent this.

To circumvent the font EULA

A client may have acquired a font that has allowed for screen use only and prohibits embedding in a PDF, preventing the font from appearing correctly in the PDF. A way around this is to convert the type to outlines in the native application prior to PDF export, though it is worth noting that the End User Licence Agreement (EULA) of the font may forbid this workaround, so it is worth reading the font EULA.

That doesn’t mean it should be done!

There are issues that arise from converting type to outlines. Dov Isaacs – Principal Scientist for Adobe Systems – has a brilliant PDF that details this (and much more) but the basic takeaways concerning type to outlines are:

  • Increased filesize that takes forever to download or view onscreen
  • Smaller typefaces do not render as well
  • May potentially breach the font’s EULA

In addition, there are other issues such as:

  • Potential issues with fonts where type overlaps itself (it can knock out holes in the joins)
  • If the conversion from type to outlines has been done in the native application and then accidentally saved and closed, this means the type will no longer be live in the native application.
  • It can prevent or hinder minor type alterations being made in a PDF submitted for print.
  • Text (as outlines) that has special effects applied (as described earlier) may not always be able to have the same effect applied to live type. This can create issues with variable data campaigns where the effect needs to be applied to a text variable.
  • It can make it difficult to identify the font used, as the font’s information is no longer in the PDF and the only other way to identify the font is visually or with apps such as what the font, adobe capture, or identifont.
  • The conversion is usually a one-way conversion. There is a fantastic Adobe Illustrator plug-in from Astute Graphics called Vector First Aid 2 that – in some circumstances – can convert outlines back to type, but it isn’t a magic bullet (though definitely worth a look).

If your hand is forced…

In a perfect world, I’d only deal with providers that fully supported PDF/X-4 files. Unfortunately, not all providers do, and occasionally our hands will be forced into providing PDFs specifically as the provider has requested, which may mean converting text to outlines. Rather than doing this in the native application (e.g. InDesign or Illustrator) there is a great way to quickly convert all type to outlines using an Adobe Acrobat Preflight that is detailed over at CreativePro.

Find spaces only (no returns or tabs) with InDesign’s GREP

When learning GREP, the syntax for a space is usually shown as \s. This works in most situations, but it is worth pointing out that this syntax represents any space, including tabs and returns, not just horizontal space between words. For finding spaces only but ignoring returns and tabs, we need a different GREP string.

Take the following example where there are double spaces (or worse) in a text frame. With the assistance of the GREP editor script from Peter Kahrel, we can identify every result that will be found using the \s syntax plus the {2,} (identifies two or more of the same result).

The yellow highlights show the search results and while the double spaces have been identified, so have the double returns and space plus returns. If all of these spaces were to change to single spaces, all returns would be lost and the type would all be in one paragraph – an unintended result.

There is a pre-made GREP search built into the find/change dialog and it is called Multiple Space to Single Space, and the code looks like this:

[~m~>~f~|~S~s~<~/~.~3~4$ ]{2,}

If this is keyed into the GREP editor, the result is as follows:

The double spaces and longer can now be found without accidentally selecting returns or tabs, but the GREP code is quite unwieldy. Perhaps it can be copied each time it is required – let’s go to the find/change dialog box, call up the Multiple Space to Single Space search and copy the result.

Now let’s paste it into the GREP editor

The syntax hasn’t placed, but instead been represented by the actual characters that the GREP code represented. I can type the required syntax manually, but it’s a long piece of code that I don’t want to remember all of the time.

Use \p{Zs} instead

InDesign’s GREP allows for specific Unicode properties that aren’t available from the find/change dialog box, but they are accessible via the GREP editor script. Click on the insert wildcard or character class button in the top left of the GREP editor dialog box.

A new dialog box will open. From here, unfurl the Unicode properties, then unfurl the separator, and choose Space Separator.

This dialog also includes other Unicode properties that may be of interest, but for now it reveals that the syntax to use is \p{Zs}. Let’s try that in the GREP editor, along with the {2,} to find two or more instances of the same syntax.

Fantastic, it has done the same thing that InDesign’s Multiple Space to Single Space has done with a quarter of the syntax.

Additionally, now that the syntax is known, we don’t have to go through the GREP editor subdialog each time, the syntax is easy to remember – \p{Zs}.

Lastly

The GREP editor script is a fantastic utility made by Peter Kahrel that allows users to see the results of GREP code in real-time, and also provides access to snippets of GREP code that aren’t available from InDesign’s own find/change panel. An added bonus is that searches can also be directly applied to paragraph styles as GREP styles, rather than copying the syntax and pasting it into the paragraph style (or rewriting it on paper and re-keying it because the GREP gets translated into what it actually represents). I highly recommend this script and if you find it useful as well, make sure you let Peter know by making a donation his way.

Additionally, Peter is the author of GREP in InDesign: an InDesignSecrets guide – a fantastic resource for anyone wishing to learn how to use GREP in Adobe InDesign; or to build more sophisticated searches. If you would like to purchase a copy of this title, please click on this affiliate link here.

When PDFs were edited, not commented

My preferred of proofing artwork to clients is to provide a PDF proof of the artwork from my Adobe InDesign file, along with specific instructions to open the PDF in Adobe Acrobat Reader, and use PDF mark-ups using Adobe Acrobat Reader’s comment feature.

In a perfect world, the markups would be returned from the client looking something like this:

This will allow me to take advantage of InDesign’s “Import PDF Comments” feature:

Or similarly via the Annotations plug-in from DTPTools:

Each method has its own strengths and weaknesses, but the goal is the same – to take the markups from a PDF file directly into InDesign to accept or reject alterations.

Unfortunately, we don’t live in a perfect world, and proofs can come back in a variety of ways:

  • Provided as a series of instructions, usually as bullet points in an email or given over the telephone;
  • Printed out by the client and marked up with a pen. This can be made worse if a red pen isn’t used; the client’s alterations are illegible or uses their own shorthand rather than proofreaders’ marks; or if the hard-copy alts are made into poor-quality digital images by scanning or photographing (or worse, faxing).
  • Submitted to an upload service that allows markups to be made on its platform; but not extracted and able to be imported into InDesign via Import PDF Comments or annotations (e.g. Box and Dropbox)
  • Markups are made, but using software other than Acrobat (e.g. Mac Preview) that have difficulty importing into InDesign’s solution or the plug-in;
  • Markups are made, but using markup tools that allow for subjective opinion (e.g. speech bubbles, arrows, drawing tools) rather than replacement, strikethrough or text addition. Speech bubbles have their place in alterations, but usually to indicate that a larger content change is required, rather than for small type replacements.
  • Markups that are duplicated and effectively “clog” the commenting panel (i.e. using more commenting than is required to take in an alteration such as the example below).
  • Rather than using markups, the client has actually edited the PDF with a PDF editor of some description and made the changes to the PDF itself (as shown below)

Most of these bullet points are a way of life with round-tripping of proofs, but the last point is the most frustrating when taking in alterations as:

  • InDesign or the plug-in literally have no markup instructions to take in, so no alterations appear in their respective alteration panels;
  • It can give the artist a false sense that no alterations were made as no markups are present;
  • If alterations are subtle, it can be difficult to tell where the alterations were made.

I’d like to say this outcome rarely happens, but the reality is that this happens far too often. My first impulse is to contact the client and inform them that the alterations aren’t usable and to use the Comment feature rather than the Edit feature, but that has the following drawbacks:

  • It is likely to frustrate and annoy the client, especially if many alterations were made. This is moreso the case if the client has followed the printer’s instructions to mark up a PDF but has mistakenly misunderstood the difference between the Edit and Comment feature of Acrobat.
  • Even if the client complies, it introduces errors such as alterations missed that were on the previously sent proof. It also takes time to prepare the alterations again, time that may not be available.

To use a card player’s metaphor, we have to play the hand that we are dealt and somehow compare the two files to determine what changes were made. I will also communicate to the client our preferred method of proofing to avoid similar incidents in the future.

But what ways can the two files be compared to take in the alterations?

Visual comparison

This can be done on-screen by either having both applications open between two monitors or one monitor with the windows split. It can also be done in an analog fashion by printing out the original and the latest alterations, then using a light table, overlaying each altered page over each original page and looking for differences. Unfortunately, both methods are time-consuming and subjective.

Visually overlay the PDF into the InDesign file

This involves placing the PDF of the alterations into the InDesign file, but on a layer above the artwork and with a transparency so that an overlay comparison can be made. To do this:

  1. Use the multipageimporter script with the following options to place all PDF pages into the InDesign pages on their own layer above the artwork.
  • Make a new object style with 25% normal opacity as its only property.
  • Use the following script by “Vinny” that will apply the object style to the imported PDF only. (This script works for documents less than 100 pages, but upon testing will throw a javascript error).

With overprint preview turned on, it will now become possible to see alterations that may have been made, and toggling the PDF layer on and off will assist in this process.

However this is still a manual, time-consuming and subjective task.

Kasyan’s comparison script

This is a script created by Kasyan Servetsky based on an article by Mike Rankin at CreativePro.

The technique in the article is used to compare two InDesign files by placing original and altered InDesign files into a temporary document applying different transparency settings to each file, and through the transparency settings being able to identify where alterations were made. This can still be applied in this use-case but an added step of an additional InDesign file that contains a placed PDF of the altered file and comparing between the two files.

Like the previous methods, it is still a time-consuming, manual and subjective task.

Dedicated file comparison software

Software such as Global Vision offers comparison software that loads both the original and altered files and performs a comparison that highlights the differences between the two files. It is worth looking at a video of the software in action.

It isn’t the only software that compares PDFs, and a brief search of the internet will yield several online services that perform similar tasks, such as:

  • Diffchecker
  • PDF Forge’s compare tool
  • Kiwi PDF comparer

That said, naming the sites above is not an endorsement, so if looking for an online option, make sure to perform all appropriate due-diligence before considering any provider.

Compare files in Acrobat itself

Acrobat does have a similar feature from the view menu where both original and altered files are compared between each other.

The results are highlighted, but the report and specific errors are not always as obvious as the results prepared with Global Vision’s software.

Using Acrobat’s compare files data as the PDF markup

There is a technique that can take the comparisons from Acrobat’s Compare files feature and treat them as markups. The technique is as follows:

  1. After the comparison is run, hit the close button on the top right.
  2. Navigate to the first page that has the compare results title page and delete it using Command+Shift+D.
  3. Save the resulting file.

The resulting PDF can then be imported using the Import PDF Comments feature from InDesign

Or by using the Annotations plug-in by DTPTools

Note that the plug-in displays the three changes that were highlighted in the comparison document, but InDesign’s Comment Import only displays two, while acknowledging that there is a third somewhere on the page.

Consider other round-tripping solutions within InDesign

There are several third party solutions available from the Adobe Exchange that allow round-tripping via InDesign such as:

  • GoProof;
  • inMotion;
  • PageProof;
  • ProofMe

The advantage for clients is that rather than opening the proof in Acrobat, clients are directed to a website where alterations can be made. This avoids clients inadvertently editing the PDF and instead allows them to provide changes that will need to be made by the artist.

Having tried some of these proofing systems, one thing in common was that alterations that clients could make was only in the form of comments, rather than strikethroughs or additions that are possible with the PDF commenting tools. These services usually require a log-in system which can be a hurdle, and are usually paid services.

InDesign’s Share for Review

InDesign 2020 and above does contain a feature called Share for Review that works in a similar way to these third party solutions, though the 2021 release allows for text highlighting, strikethrough and additions as well.

Another advantage is that clients no longer require Adobe Acrobat or a PDF reader to open the proofs, only a web browser. Check out Daniel’s video over at Bring Your Own Laptop to see this in more detail, along with other 2021 update features.

It is worth pointing out that this is not Adobe’s first attempt at a proofing solution, with an earlier system called CS Review introduced in May 2010 and then deprecated in April 2012. It is also worth pointing out that Share for Review is a feature offered in InDesign that – at the time of writing – has no comparison from competitors such as Quark Xpress or Affinity Publisher.

So far as my own work goes, this proofing method was not considered when Share for Review was released in June 2020 as the markups were limited to pin and drawing tools. Additionally, the release of the expanded tools happened during a peak-time in our production, and was too difficult to switch clients over from the PDF round-tripping method to this method in such a short space of time. It was also too early to gather other user input about the experience and bugs, so more feedback was required before considering this as a real-world solution.

Now at the time of writing with the expanded tools, I will begin trialling this method and report my findings once I’m confident there is enough to report.

Last word on this article

Up to this point in time, PDF commenting has worked effectively as a round-tripping solution from my perspective in the majority of my work, though it isn’t without its issues such as:

  • Establishing the process with clients, especially with staff turnover as the process needs to be established and explained to ensure that a client will not only mark up a PDF (rather than make changes to the PDF itself), but that the markups are prepared correctly and efficiently;
  • Proofing large file sizes;
  • Proofing to clients who are at the mercy of their IT department’s rules as to what software or websites they can or cannot access;
  • The Adobe Acrobat software itself, considering in a previous version the Acrobat team removed features that most casual users of the software would consider essential (much to my frustration until customer demand made them reinstate it) and how the software will be supported in future releases and for future operating systems.

What have your experiences with PDF comments been? Do you use a similar round-tripping method or something different? And are there any technologies in this space that haven’t been mentioned? Leave your comments below.

%d bloggers like this: