« Seek – Extremely nifty Thunderbird extension | Home | VIRB° 2: Beta, Beta, Bing! »
PS_BRAMUS.TextExport 1.2 – Automatically export all Text layers from Photoshop PSD to a Text file
Colleague Johan asked whether someone could knock up a script which exports all text layers from a Photoshop document to a text file. Since I’ve scripted Photoshop before (heck, I even steered Photoshop from within C#) it was no biggie for me to knock up a simple script, which I dubbed TextExport
After Johan placed his request, I quickly knocked up a script which loops all layers (1.0), then (pretty important) expanded it to loop groups of layers too (1.1) and finally added some user friendly stuff like giving one the option to choose where to save the file holding all text elements (1.2).
Download
Update November 2008:PS_BRAMUS.TextExport is outdated and has been replaced with PS_BRAMUS.TextConvert which does both import and export!
Right here:
Installation / How to use
- Download
PS_BRAMUS.TextExportfrom the link above - Extract it to Presets/Scripts folder of your Photoshop installation folder (defaults to C:\Program Files\Adobe\Adobe Photoshop CS3\Presets\Scripts on Windows)
- Restart Photoshop if it was already running
- Open the PSD you wish to export text from
- Now, when having a file opened, go to File > Scripts and select PS_BRAMUS.TextExport.1.2 from the list.

- Wait until the output file appears
Configuration
Three settings in PS_BRAMUS.TextExport can be configured, all to be found in the .jsx file itself.
- Open up
PS_Bramus.TextExport-1.2.jsxwith your favorite texteditor - If you want to choose where to save the file to, set
useDialogtotrue. If set tofalse(default), the output file will be saved into your documents folder - If you don’t want the exported file to be openend after the export has run, set
openFiletofalse. If set totrue(default), the output file will automatically be opened by your default text editor. - In the export file, each line is separated by a
separatorstring. Change this one to use one you like (defaults to*************************************).
Example
I’ve tested PS_BRAMUS.TextExport with a pretty complex PSD, which holds the design of 3RDS. Here are the results:
Input PSD
Output TXT
Make a donation
It certainly is no obligation but it would most certainly put a smile on my face
About this entry

Mar 12 2008 / 12:12 am


Best of Bram.us
Start getting used to scratching and smudging the iPhone with this Flash based iPhone Simulator
Automatically wrap/float/contour text around freeform images using CSS for usage in (X)HTML pages.
Pimp Your Firefox to be a web all-star
A look at the inc.common.php, spreading handy functions.
Photoshop Script inspired in the Chlomoscript to unobtrusively pimp photos you have taken.
Methods to adding file management options to TinyMCE (Part 1), Extending TinyFCK (Part 2) and PHP file uploads overview (Spinoff 1).








Trackbacks/Pings
[...] knock up a script which exports all text layers from a Photoshop document to a text file. Last week I released the first version of the script (v 1.2), now it’s time for an [...]
Comments
Very interesting!
It would also be great to add the layer names in the textfile, no?
Text Layers by default have the same name as the text it holds; What would be neat is to add the structure in order to see what group the layer is in. Will bump a 1.3 sometime soon
Hey,
This is great! I needed to get the text from 20 PSDs and wasn’t sure how to do it, I had even considered typing up the copy all over again. But this script worked really great.
I updated the script code to kill the alert prompt that the script generates to notify the user that the text export has been completed and set up a batch so now I can extract the text from a whole folder of PSDs and get the machine to do all the work.
Thanks a lot :0)
Oh, and I think you should call it “Textport” instead of Textexport
Tested, verified as very useful.
Ninja-fast-slicing =)
@Wolf: still need to fix the upcoming 1.3 to work with multiple documents
Ha, fixed already (little trick with the activeDocument property) … me.blogging
Thanks for sharing, lovely thingy.
Just pitty it’s kinda slow on huge PSD files with many layers..
Still thanks a lot for sharing.