adobe cs — colour #03

adobe cs — colour #01 and colour #02 started an explication of the excruciating world of colour management. excruciating, not because it is immeasurably difficult, but because so many seem to avoid it altogether — this is unnecessary.

colour management can be extraordinarily complex if you get into the nitty gritty — but most of us don’t need to delve that deep. so, do yourself a favour and get a basic working knowledge of colour management to give your files the best chance once they hit the press.

unfortunately, there’s no definitive solution to the problem. no one can say “here are the settings to set and the buttons to push” because, well, it depends. let’s see why — here’s a pretty standard choice for colour settings in InDesign (under edit > color settings…):
screen grab of  North America General Purpose colour settings

now that’s probably fine if you’re a general purpose kind of person working in north america. but if you’re a prepress kind of person in australia it’s pretty shitty. one of the key rules of colour management is give yourself the widest practicable colour gamut as your starting point. hover your mouse over where it says “sRGB…” and you’ll see this description pop up at the bottom of the window :
screen grab of description for sRGB color space

see how InDesign gives you clues about what settings to use — “not recommended for prepress work (because of its limited color gamut)“. if you change to the north america prepess settings you’ll see the rgb profile change to adobe rgb (1998) — a better choice for prepress work, because it has a wider gamut which also, conveniently, more closely resembles the cmyk gamut — as its description explains :
screen grab of north america prepress colour settings

but for aussie prepress dudes, we’re still not there. swop stands for “Specifications for Web Offset Publications” (for those who don’t realise, “web” is the term for printing from a paper roll). in australia, most commercial printing (apart from newspapers, magazines and catalogues) is done through sheet offset.

in adobe cs — colour #01 we saw that swop restricts the total ink coverage to 300% with a maximum black of 90%. but sheet offset can tolerate more ink and this is exactly why aussies are often disappointed by flat images when their shit hits the press — they are restricting their images to an unnecessarily narrow gamut by using swop — which they do either because it’s the default or because it’s what is recommended on all the (mostly north american) forums.

a decent sheet offset press/operator under good conditions can handle a tic (or tac if you prefer) of about 350% so let’s look at some colour spaces whose descriptions match that :
screen grab of US sheetfed offset descriptionscreen grab of fogra27 descriptionscreen grab of fogra39 description

judging by the descriptions, these should all give similar results but, unfortunately, although InDesign did a good job of pointing us at a good rgb profile, it’s not quite so helpful when it comes to cmyk. remember, the image from colour #01 and colour #02 had a black background of r0g0b0. here’s how those three cmyk profiles will render that colour :
screen grab of separations preview panel from each of the three profiles

u.s.sc and fogra27 do indeed give us a tic of 350% — but look at the difference in the separations. that 85% total black is diabolical. you’re just about guaranteed to get shitty detail in your shadow areas using u.s.sc because it’s relying so heavily on all four plates to create the dark colours — whereas fogra27 loads as much achromatic data as possible onto the black plate which will almost certainly result in a crisper result.

looking at the data for fogra39 we can see that the description was incorrect — it only allows for a tic of 330% (not 350%) but we can probably put this down to a typo — it’s very likely the fogra39 description was just copied from fogra27, which has been with us for longer.

so, is fogra27 better than fogra39? again, it depends. as mentioned above, 350% tic is easily achievable under ideal conditions but very much of our printing is done in a subideal reality. if you’re a prepress dude in australia sending high quality work to an excellent printer who has plenty of time (and budget) to do a high quality job, fogra27 is a good choice. if you’re sending stuff to a decent printer who’s been screwed down on the delivery deadline, then fogra39 will give you and them less grief.

having said all that … in an ideal world we would always get to speak directly with the printer’s production dude for explicit instructions on the best protocol to use for each job — but this isn’t always possible or practical — so we have to get better at best-guess scenarios.


• related post : InDesign tip : #24 : checking the black plate in separations preview.
• related post : adobe cs — colour #01 : you don’t need to convert images to cmyk.
• related post : adobe cs — colour #02 : you really need to get your shit together.

macgrunt icon

Advertisements

adobe cs — colour #02

adobe cs — colour #01 started looking at colour management in adobe creative suite — specifically, how images no longer need to be converted to cmyk in photoshop. this post continues the indoctrination — colour management can be left to InDesign.

HOWEVER, you really need to get (and keep) your shit together.

let’s continue by following two documents converted to two different common colour profiles — fogra 27 and web swop. again, we are using the exact same rgb psd file in those two documents :
screen grab of two documents showing different breakdowns for red and black
the separations preview panels show the breakdowns for the red text and the black background for both documents (as indicated by the white circles).

now, when you export to PDF you get a few different options for colour conversion — no colour conversion, convert to destination, and convert to destination (preserve numbers) :
screen grab of export PDF dialog showing colour conversion options

if you choose no colour conversion for either of those documents you’ll get exactly the same numbers in the PDFs as are shown in the separations preview panels above. what does this mean? it means that if you want to control your output you need to make a decision about which profile to use for your InDesign files. because images will produce significantly different results under different export conditions and unless you take control, you’ve got no idea what’s going to happen to your imported images once it’s time to export for print.

if you take either of those documents and export it to the opposite profile using convert to destination (preserve numbers). you’ll get exactly the numbers of the opposite profile. that is, if you take the fogra document and export it to swop using “preserve numbers” you’ll get the swop numbers in your pdf. however, if you use convert to destination without the preserve numbers option you’ll get a different set of numbers entirely — neither the swop nor the fogra ones.

what does THAT mean? it means, again, the choices you make (or fail to make) have an impact on your final output — both your indesign profiles and your export protocol will affect the finished product and if they don’t match, the effect is going to be unpredictable. or, more simply, if you don’t take control of your workflow you’re going to get unexpected results.

so, you have to get your shit together when it comes to colour management — don’t get pushed around by the software — you have to be the one doing the pushing.

ok, so that’s a demonstration of the problem. next up we’ll start looking at the solution.


• related post : InDesign tip : #24 : checking the black plate in separations preview.
• related post : adobe cs — colour #01 : you don’t need to convert images to cmyk.
• related post : adobe cs — colour #03 : what’s the best colour profile?.

macgrunt icon

InDesign scripting : bringing it together

this post is a response to a question from Tom :

I am working towards a compilation of scripts to take customer supplied Indd documents – Drop them on applet or automator – Print 1 laser / create 3 PDF files (different settings) / email the low res proof to CSR. … What I picture in my head is getting the email PDF proof script running the way I want – Put it into automator as part of a larger workflow. Then get the other elements as scripts – put those into the same workflow – ??

two things to note straight up — you don’t need separate scripts and you don’t need automator. but this is a great little example because all we need to do is pull together a bunch of script snippets already scattered around this site. as you read through you’ll see highlighted bits that link back to posts with more details.

let’s go … first things first — we want this to be a droplet (so you can drag and drop files onto the app for processing) so the whole script will be wrapped in an on open handler. and you’ll need to wrap it in a repeat loop so it can handle more than one dropped file at a time. and it would be a good idea to alert the user when the script has finished doing its thing. so the initial bits will look something like this :

on open mgItems
  repeat with mgThisItem in mgItems
    -- rest of script here
  end repeat
  display dialog "some kind of confirmation message here"
end open

then we need InDesign to open and process each file. but we should put this in a try block to ensure the script doesn’t crash if a different file type is dropped on it inadvertently :

on open mgItems
  repeat with mgThisItem in mgItems
    tell application id "com.adobe.InDesign"
      try
        open mgThisItem
        tell active document
          -- do printing and pdf stuff in InDesign
        end tell
        close active document
      on error
        -- decide what kind of error handling you want to include if the file won't open
      end try
    end tell
    -- rest of script for email processing here
  end repeat
  display dialog "some kind of confirmation message here"
end open

the observant will notice that the tell application command is different from previous scripts on this site. this is the way to address any version of InDesign — but be aware that other parts of this script may have terms or syntax that may need to be adjusted for your particular version of InDesign.

ok — next comes the printing bit. if you’re using only one print preset for this workflow you’d use a simple line :

print using "name_of_print_preset" without print dialog

but if you need to change the print preset based on the file specs you’d need something more complex like in InDesign scripting : lesson 24.

exporting pdfs is covered in lessons 08, 09, 10, 11, and 12 and cover a few different ways to approach the problem. three basic things need to be determined : the export preset to be used, the name of the pdf and the location to save it to.

the simplest version of this part of the workflow might look like this (but depends on Tom’s specific needs) :

set mgDocName to name of active document
set text item delimiters of AppleScript to " "
set mgShortName to text item 1 of mgDocName
set text item delimiters of AppleScript to ""
set mgHRFilePath to "path:to:highres:folder:" & mgShortName & "_HR.pdf" as string
set properties of PDF export preferences to properties of PDF export preset "HighRes"
tell active document
  export format PDF type to mgHRFilePath without showing options
end tell
set mgHRDigitalFilePath to "path:to:highresdigital:folder:" & mgShortName & "_HRD.pdf" as string
set properties of PDF export preferences to properties of PDF export preset "HighResDigital"
tell active document
  export format PDF type to mgHRDigitalFilePath without showing options
end tell
set mgProofFilePath to "path:to:proof:folder:" & mgShortName & "_proof.pdf" as string
set properties of PDF export preferences to properties of PDF export preset "Proof"
tell active document
  export format PDF type to mgProofFilePath without showing options
end tell

that’s it for the InDesign bits. now to email that third pdf. first get a reference to the file, then create the message — Tom’s using Entourage (thanks to Ben Waldie at MacTech for the Entourage code) :

tell application "Finder"
  set mgFile to mgProofFilePath as alias
end tell
set mgSubject to "proof of job " & mgShortName as string
tell application "Microsoft Entourage"
   set theRecipients to {{address:{display name:"CSR Name", address:"CSR@tomsplace.com"}, recipient type:to recipient}}
   set theMessage to make new outgoing message with properties {recipient:theRecipients, subject:"mgSubject", content:"here's your proof dude", attachments:mgFile}
   send theMessage
end tell

again, this is pretty much the simplest form this part of the workflow could take. Tom will need to expand it to encompass his particular requirements.

the final basic structure could look something like this :

on open mgItems
  repeat with mgThisItem in mgItems

    tell application id "com.adobe.InDesign"
      try
        open mgThisItem
        tell active document
          print using "name_of_print_preset" without print dialog
        end tell
        set mgDocName to name of active document
        set text item delimiters of AppleScript to " "
        set mgShortName to text item 1 of mgDocName
        set text item delimiters of AppleScript to ""
        set mgHRFilePath to "path:to:highres:folder:" & mgShortName & "_HR.pdf" as string
        set properties of PDF export preferences to properties of PDF export preset "HighRes"
        tell active document
          export format PDF type to mgHRFilePath without showing options
        end tell
        set mgHRDigitalFilePath to "path:to:highresdigital:folder:" & mgShortName & "_HRD.pdf" as string
        set properties of PDF export preferences to properties of PDF export preset "HighResDigital"
        tell active document
          export format PDF type to mgHRDigitalFilePath without showing options
        end tell
        set mgProofFilePath to "path:to:proof:folder:" & mgShortName & "_proof.pdf" as string
        set properties of PDF export preferences to properties of PDF export preset "Proof"
        tell active document
          export format PDF type to mgProofFilePath without showing options
        end tell
        close active document
      on error
        -- decide what kind of error handling you want to include if the file won't open
      end try
    end tell

    tell application "Finder"
      set mgFile to mgProofFilePath as alias
    end tell
    set mgSubject to "proof of job " & mgShortName as string
    tell application "Microsoft Entourage"
      set theRecipients to {{address:{display name:"CSR Name", address:"CSR@tomsplace.com"}, recipient type:to recipient}}
      set theMessage to make new outgoing message with properties {recipient:theRecipients, subject:"mgSubject", content:"here's your proof dude", attachments:mgFile}
      send theMessage
    end tell

  end repeat
  display dialog "some kind of confirmation message here"
end open

of course, this isn’t a definitive solution — it’s simply a demonstration of one possible approach to the problem.

once you’re done compiling the perfect script, save it as an app and drag it onto your sidebar so it’s easily accessible — then start dropping those indd files.

macgrunt icon

adobe cs — colour #01

colour management has come a long way in the last few years. there are still a lot of the old guard who are yet to update their knowledge, and a lot of young guns who are yet to gain it. here’s the first of a couple of posts about colour management in adobe creative suite.

in the olden days (about ten years or so ago) the recommended practice for dealing with colour images was to save at least three copies of a photographic image : one rgb for onscreen, one cmyk corrected for sheet offset, and one cmyk corrected for press (newsprint). the most pedantic operators saved a different correction/conversion for every output scenario their image was destined for (eg. three different papers might have three different output profiles). so, many copies of each image — a wailing and gnashing of teeth — madness reigned.

this was also the time when raster images destined for print were always saved as tifs, unless they had spot colours or clipping paths, then they were saved as eps because it was the only importable file type that could retain such information. but now, of course, you save all your print ready rasters in psd format (you DO, don’t you? … no? then you should).

but back to colour management … de rigueur nowadays is to save raster images in rgb and allow InDesign to do any colour management on the fly. what? blasphemy and anathema to the old guard! page layout programs are for page layout and imaging programs are for images and that’s that. but such contentions are now piffle. there are good reasons why the adobe software is now called creative suite — it’s no longer a bunch of separate programs — it’s now an integrated set with many things in common, including colour conversion algorithms.

so, here’s a little demonstration for the non-believers (click to enlarge) :
screen grab of four versions of one image in InDesign

that’s a screen grab of the same rgb psd placed in four separate InDesign files. each InDesign file is assigned a separate colour profile as indicated by the labels. these are the same four colour profiles that could be assigned permanently through photoshop but, by being assigned to the InDesign files, they DO NOT change the image file (psd) in any way — just the way it is interpreted by InDesign.

assigning a colour profile in InDesign is as simple as choosing convert to profile from your edit menu and choosing the appropriate profile from the relevant dropdown :
screen grab showing convert to profile menu and window with dropdown options

the difference between the four InDesign files is more obvious when we turn on separations preview (windows > output > ) and have a look at some of the numbers. here are the same four files with only the black plates showing (again, click to enlarge) :
screen grab of four versions of one image in InDesign — black plates only

the readings in the separations preview panel come from the black background — which is r0g0b0 in the psd. you can see that fogra 27 allows for a total ink limit (also known as total ink coverage or total area coverage) of 350% and a solid black, whereas swop only allows 300% with 90% black, and poor old newsprint is restricted to 220% and has to pull the black back to 71%. NOTE: these are the exact same numbers you’d get if you did a cmyk conversion of the psd in photoshop.

what does all this mean?
it means that a single image can be sent to multiple output types by simply changing the InDesign profile. you do not need a separate image file for each destination.

now, converting the file to an output profile is not strictly necessary if your final output is pdf — because the conversion can be done at export. but, as the first screen grab shows, doing the conversion gives you a better idea on screen of what your final output is likely to look like.

we’ll have a nice little chat about this topic some more in a future post.

til then, keep grunting.


• related post : InDesign tip : #24 : checking the black plate in separations preview.
• related post : adobe cs — colour #02 : you really need to get your shit together.
• related post : adobe cs — colour #03 : what’s the best colour profile?.

macgrunt icon

InDesign scripting : lesson 24

waaay back in lesson 04 we looked at a script to automate printing (and lessons 05 and 06 explained how some of the script elements worked).

well, finally, it’s time to take printing automation to the next level. the original script prompts the user to select a print preset from a list. but that’s too much like hard work. what if the script could automatically decide which preset to use based on the document specs?

apologies to you lovely people in the States — we’re going to be using metric for this example because, well, it is the twenty first century after all and anything referred to as ‘imperial’ should be long dead.

the first part of the script captures a few bits of information from the document preferences. facing pages is boolean, so it returns true or false. page orientation returns landscape or portrait (square pages return portrait too). page height and width return real numbers in whatever measurement unit you’re using :

tell application "Adobe InDesign CS6"
  tell active document
    set mgPgFace to facing pages of document preferences as string
    set mgPgOrnt to page orientation of document preferences as string
    set mgPgHght to page height of document preferences
    set mgPgWdth to page width of document preferences
  end tell
end tell

display dialog (mgPgHght as string) & " : " & (mgPgWdth as string) & " : " & mgPgOrnt & " : " & mgPgFace

so, for a single A4 page the resulting dialog will look something like this :
screen grab of initial dialog

now, if you’re a neat freak (and aren’t we all?) you may prefer your real numbers converted to integers. notice that you can’t coerce a real to an integer as it is captured — the conversion has to be done separately :

tell application "Adobe InDesign CS6"
  tell active document
    set mgPgFace to facing pages of document preferences as string
    set mgPgOrnt to page orientation of document preferences as string
    set mgPgHght to page height of document preferences
    set mgPgWdth to page width of document preferences
    set mgPgHght to mgPgHght as integer
    set mgPgWdth to mgPgWdth as integer
  end tell
end tell

display dialog (mgPgHght as string) & " : " & (mgPgWdth as string) & " : " & mgPgOrnt & " : " & mgPgFace

then you’ll have neat (not necessary, but neat) :
screen grab of revised dialog
…and you can get rid of that display dialog line now — dialogs are a handy way to check your progress when developing a script.

ok, now, the complexity of the next bit is dependant on the complexity of your workflow. the workflow this script was developed for has only eight possible scenarios, roughly like so :
table showing print preset options for various document types

so, all we need to do is find out which of the scenarios our document falls into and select the corresponding print preset (which we’ll capture into the variable mgPrintPreset). let’s start with the two facing pages options (printed as spreads) :

if mgPgFace is "true" then --print document as spreads
  if mgPgHght is greater than 277 or mgPgWdth is greater than 200 then --use A3 fit preset
    set mgPrintPreset to "A3S fit"
  else --use A3 100% preset
    set mgPrintPreset to "A3S 100%"
  end if
else --print document as single pages
  --(scripting bits for single page options go here)
end if

this shows the basic approach to these kinds of problems — if/then/else. if something is true, then do this thing, else (otherwise) do this other thing. we just need to break the problem down into pairs of options.

and we can still use this method for eight different scenarios because if statements can also be nested — ifs within ifs. the full code for dealing with all eight possibilities looks like this :

if mgPgFace is "true" then --print document as spreads
  if mgPgHght is greater than 277 or mgPgWdth is greater than 200 then --use A3 fit preset
    set mgPrintPreset to "A3S fit"
  else --use A3 100% preset
    set mgPrintPreset to "A3S 100%"
  end if
else --print document as single pages
  if mgPgOrnt is "portrait" then --use one of the vertical presets
    if mgPgHght is greater than 277 or mgPgWdth is greater than 200 then --use one of the A3 presets
      if mgPgHght is greater than 400 or mgPgWdth is greater than 277 then --use A3 fit preset
        set mgPrintPreset to "A3V fit"
      else --use A3 100% preset
        set mgPrintPreset to "A3V 100%"
      end if
    else --use A4 vertical preset
      set mgPrintPreset to "A4V"
    end if
  else --use one of the horizontal presets
    if mgPgHght is greater than 200 or mgPgWdth is greater than 277 then --use one of the A3 presets
      if mgPgHght is greater than 277 or mgPgWdth is greater than 400 then --use A3 fit preset
        set mgPrintPreset to "A3H fit"
      else --use A3 100% preset
        set mgPrintPreset to "A3H 100%"
      end if
    else --use A4 horizontal preset
      set mgPrintPreset to "A4H"
    end if
  end if
end if

but it’s easier to understand in a screen grab of the code in script editor :
screen grab of this section of code in script editor

the bits in quotation marks are the names of the InDesign print presets, the green elements are the variables (remember you can name variables anything you like, just as long as it’s not a term reserved by applescript), and the other coloured bits are comments to help us keep track of what we’re doing. comments are preceded by two hyphens and are not actually part of the code — they’re little reminders that are especially helpful when revisiting the script sometime in the future.

the last line of code simply tells the document to print using the selected print preset :

print using (mgPrintPreset as string) without print dialog

cobble all those bits together and the complete script for this workflow looks something like this :
screen grab of complete script in script editor

now, obviously you’re not going to be able to use this one straight out of the box — you’ll have to do a little work to update it to your page sizes and print presets and whatnot to suit your workflow.

but once you’ve set it up you can do all your printing with a double click — rather than cmnd-p, click, choose, click, click …

OR, even better, reassign the cmnd-p shortcut to run your script.

bonza.

macgrunt icon