Archive for category Graphic design

Arabic text in Adobe Photoshop

…or how to create any right-to-left script layer in Photoshop

Photoshop is not fully prepared for working with right-to-left (RTL) languages: you can’t properly use Arabic or Hebrew for more than pasting in single non-breaking lines. This is a limitation in the software – and you may be told to buy a middle eastern version.

There is however a very simple workaround.

Adobe have supplied a Photoshop template file with live RTL text layer in it – which you can download from Adobe at the link below. Drag the text layer into your document and – hey presto – you have one RTL text layer mixed in with other LTR text layers.

It’s a Photoshop CS4 file – but works perfectly well up to CS5.5 (CS6 TBC):
Adobe Photoshop CS4 – Template to edit and create Arabic text

No Comments

A simple regex rename with Adobe Bridge

Adobe’s Bridge application has a very handy built-in file renaming utility. If you need to add a suffix, a numeric prefix or do a simple string substitution it’s ready and waiting just a keystroke away…

But for more complex string substitutions regex (from REGular EXpressions) come to the rescue!

Here’s a simple problem – you need to rename the first 6 characters of a series of files with a consistent file naming convention…

Fire up the batch renaming dialogue ([SHIFT]+[CMD]+R on a mac) – it’s under the Tools menu. Select your files, choose String Substitution from the dropdown, and check Replace All and Use Regular Expression as in the screenshot below.

The magic regex is in the Find field:
^.{6}

Explained

The “^” (a caret AKA “up-arrow”, “chevron”, “control character”) denotes the beginning of the search; the dot “.” denotes any kind of character and finally the “{6}” means six of.

Easy peasy.

No Comments

Advertising that you couldn’t get away with these days

Found this link to a whole bunch of mostly crassly sexist adverts from way back but but there’s other NO-NOs in there too: TOP 48 ADS THAT WOULD NEVER BE ALLOWED TODAY. Still not seen Mad Men yet but I guess this is what they may have gotten up to…

Anyway here’s my favourite wrong-uns:

No Comments

Font management on Mac OS X by Linotype

Thanks to guns for for making me aware of FontExplorer in the comment on this thread on how to organize fonts using Font Book over at Mac OS X Hints. FontExplorer looks great; the price certainly is. Must give it a good look when I get a chance.

No Comments

InDesign CS2 export script

This very useful JavaScript code was developed by Peter Kahrel as he found my problem interesting. Bless you Peter! The full thread is over on the Adobe’s InDesign Scripting Forum here abouts. Because there’s only a limited life for any post over there – I’m dumping here too for posterity.

The purpose of the script is to export single page PDFs from a multi-page InDesign CS2 document where the page numbering has been set via page Numbering and Section Options. PDFs are exported to a predetermined PDF setting: “PDF_X-1a with Bleed & co” in my case. The resulting file PDFs are named with a three-digit prefix corresponding to the page number in the InDesign document and a user defined base name – defined when the script is run.

A basic version of this script is supplied by Adobe in with the extras for an InDesign install but unfortunately that falls over when there is a Named Section present. Getting a stray Named Section in your document is very easy. Easier for some users mind – but still very easy. Peter – I still owe you a beer or three…

Here is the magic script:

#target indesign 

if(app.documents.length != 0) 
   { 
   var myFolder = Folder.selectDialog ("Choose a Folder");   
   if(myFolder != null) 
      { 
      myExportPages(myFolder); 
      } 
   } 
else 
   { 
   alert("Please open a document and try again."); 
   } 

function myExportPages(myFolder) 
{ 
var myPageName, myFilePath, myFile; 
var myDocument = app.activeDocument; 
var myDocumentName = myDocument.name; 
//This next line sets the PDF export Setting 
var myPDFExportPreset = app.pdfExportPresets.item("PDF_X-1a with Bleed & co") 
var myDialog = app.dialogs.add(); 
with(myDialog.dialogColumns.add().dialogRows.add()) 
   { 
   staticTexts.add({staticLabel:"Base name:"}); 
   var myBaseNameField = textEditboxes.add({editContents:myDocumentName, minWidth:160}); 
   } 
var myResult = myDialog.show({name:"ExportPages"}); 
if(myResult == true) 
   { 
   var myBaseName = myBaseNameField.editContents; 
   myDialog.destroy(); 
   // Remember the state of each section prefix 
   var section_states = myDocument.sections.everyItem().includeSectionPrefix; 
   // Get all section-prefix names 
   var section_names = app.activeDocument.sections.everyItem().name; 
   // Enable all section prefixes 
   myDocument.sections.everyItem().includeSectionPrefix = true; 
   // Create two parallel arrays with page numbers: 
   // one with numbers preceded by section prefixes, 
   // the other with bare page numbers 
   var page_ranges = []; 
   var filename_pagenames = []; 
   for(var i = 0; i < myDocument.pages.length; i++) 
      { 
      page_ranges.push (myDocument.pages.item(i).name); 
      var temp = strip_section (myDocument.pages[i].name, section_names); 
      filename_pagenames.push (("00" + temp).slice(-3)) 
      } 
   // Restore the section-prefix settings 
   restore_section_states (myDocument, section_states); 
   // Export each page 
   for(var i = 0; i < myDocument.pages.length; i++) 
      { 
      app.pdfExportPreferences.pageRange = page_ranges[i]; 
      myFilePath = myFolder + "/" + filename_pagenames[i] + "-" + myBaseName + ".pdf"; 
      myFile = new File(myFilePath); 
      myDocument.exportFile(ExportFormat.pdfType, myFile, false, myPDFExportPreset); 
      } 
   } 
else 
   { 
   myDialog.destroy(); 
   } 
} 

function restore_section_states (doc, states) 
{ 
for (var i = 0; i < doc.sections.length; i++) 
   doc.sections[i].includeSectionPrefix = states[i]; 
} 

function strip_section (pg, array) 
{ 
for (var i = 0; i < array.length; i++) 
   if (array[i].length > 0) 
      if (pg.match (RegExp ('^'+array[i])) != null) 
         { 
         pg = pg.replace (RegExp ('^'+array[i]), ''); 
         break 
         } 
return pg 
}

, , ,

1 Comment