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.

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.

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.

Consistent spot color naming to die-forme

A pain-point I see regularly concerns inconsistencies in color names, particularly spot colors that are used for embellishments. Take for example a color that is used for representing a forme-shape. For consistency sake, the office has implemented a CC library with standard swatches for regularly used embellishments such as Dieline, Perforation and Spot UV. The concept is that anyone who requires an embellishment can simply open the CC library and choose one from the embellishment colors that have been established.

Despite creating this CC library, embellishment colors and names can still be inconsistent for reasons such as:

  • The artwork was legacy artwork prior to introducing the CC library;
  • Operator error; or
  • Art was supplied by a third party, such as a client or supplier.

Naming consistency is important with workflows that have been established with these embellishment colors. Take the color “Dieline” for example. This should be clearly visible on the native files, but not on the printed output. In this instance when printing to digital devices, the RIP will identify the color “Dieline” and assign it a white color value that will treat it as if it were transparent and not print at all, though it will appear in the PDF. This eliminates the need to toggle a dieline layer on and off in the application that made the artwork, and eliminates any errors associated with art being mapped to incorrect layers.

However, if the artwork contained a color named as “Dieforme” for example, the RIP would not identify the color as “Dieline” and the formeshape would be visible on the final print. This issue could be resolved by adding the color “Dieforme” manually to on the RIP, but the concept is to have every file the same so that operators aren’t interrupted having to make adjustments on the RIP for specific tasks.

A solution via Acrobat

My preferred solution is to use a custom fixup from Adobe Acrobat’s Preflight dialog. In this example, I’ve created a PDF that contains ten variations of Dieline spot color using different names, but the color value is identical. Here is what the separation preview looks like:

Acrobat does have pre-made fixups for similar tasks, such as Make custom spot color names consistent.

Let’s give that a go.

The fix has reduced the number of spot colors but only down to five. Names that had different casing have been merged together, and spaces or dashes have been removed and then merged together with the results.

Let’s revert that and try an alternative fixup Merge spot color name if appearance is identical.

OK, that has remapped all of these spots to one spot color.

However, this color is the wrong name. It is also unlikely that the forme-shape colors would ever be set with different names yet have the same underlying CMYK color conversion. The following would be more likely:

Let’s run the Merge spot color name if appearance is identical fixup again.

Some names have been culled but there similar names such as die and Die have not been mapped together, so this solution hasn’t worked.

Make a custom fixup in the Preflight panel

Luckily we can make our own solution from the Preflight panel by clicking on the options button at the top right of the panel and selecting Create Fixup

In the new window, the fix will be given the name Diecut Fix. Choose Color spaces, spot colors, inks from the Fixup category in the top centre dialog; and select Map spot and process colors in the Type of fixup dialog on the top right hand side.

In the options at the bottom of that dialog box, make sure the Source color name matches with RegEx and in the field to the right, type the GREP ^die.*?$ – this will look for any word that begins with die. The destination should Map or rename, and the destination color name will be Dieline, with a CMYK value of 100% magenta, overprint on, and applied to Spot color is used. The checkbox should be checked on for ignore upper/lower case. Once OK’d from the bottom right hand corner, the fixup can then be activated using the Fix button on the bottom right of the Prepress dialog.

The fixup has worked – all of the colours have been mapped to the one color with the correct name and color value. An added bonus is that the color is set to overprint so that the color beneath won’t knock out.

Other applications

In this instance, the fixup has been used to fix a one-off issue concerning an incorrectly named spot color. But this fixup can be added to a larger workflow so that artwork from external sources can be cleansed for a workflow. See this article for more information (https://colecandoo.com/2019/02/24/droplet-like-its-hot/)

This particular fixup is also used to fix artwork that – while being set in the right color and name – did not have an overprint applied to the color. This fixup will correct this issue.

%d bloggers like this: