« A boy meets girl story … in emoticons | Home | Google Search Coupon »
PS_BRAMUS.TextConvert: PSD2TXT and TXT2PSD for the masses!
What if you could extract all text strings from a PSD file into a TXT file? Sure, it’s possible, thanks to PS_BRAMUS.TextExport, the PSD2TXT script I wrote a few months ago. Now, what if you wanted to do that in the opposite direction and import strings from a TXT file into a PSD file (viz. TXT2PSD)? Look no further, PS_BRAMUS.TextConvert is here, and does both!
What is PS_BRAMUS.TextConvert
Don’t like reading? Member of the lazyweb? Savvy enough? You might as well just skip to the example then
PS_BRAMUS.TextConvert is the successor of PS_BRAMUS.TextExport and consists out of two scripts:
PS_BRAMUS.TextConvert.Export(PSD2TXT)PS_BRAMUS.TextConvert.Import(TXT2PSD)
The first script is a modded version of PS_BRAMUS.TextExport which scans your PSD file for text strings. After retrieving all text, the output is saved into a TXT file in your Documents folder.
The second script is the counterpart: it reads in TXT files (which you first exported via the first script) and replaces all text layers with the new content in your PSD file.
Is PS_BRAMUS.TextConvert something for me?
PS_BRAMUS.TextConvert is ideal for agencies/companies who need to translate Photoshop mockups: Export all text layers via PS_BRAMUS.TextConvert.Export to a text file, send that text file to the translation agency and let them do the translation, then import the translated file via PS_BRAMUS.TextConvert.Import into the PSD file.

Of course its usage is not limited to the example above. The Export part of PS_BRAMUS.TextConvert can be used for (speed)slicing for example
Requirements
- Photoshop CS2 or newer is required
PS_BRAMUS.TextConverthas been tested and verified working with Photoshop CS2 and CS3 (CS4 untested but should work. Can anyone verify?)
Download / License
PS_BRAMUS.TextConvert released under a creative commons Attribution-ShareAlike 2.5 license. Should you use the script within a commercial context, or for any other reason you fancy, please consider clicking the PayPal donate button.
Note: PS_BRAMUS.TextConvert was made possible by means of lexia:park, Barcelona, Spain.
Installation
- Download
PS_BRAMUS.TextConvertfrom the link above - Extract it to the Presets/Scripts folder of your Photoshop installation folder (defaults to
C:\Program Files\Adobe\Adobe Photoshop CS3\Presets\Scriptson Windows) - Restart Photoshop if it was already running (important!)
How to use PS_BRAMUS.TextConvert
Once installed, usage is simple:
1. Exporting text (PSD2TXT)
- In Photoshop go to File > Scripts and select
PS_BRAMUS.TextConvert.Export-1.0from the list to export all text. - Per open PSD file, a
TextConvert-[NAME_OF_YOUR_PSD_FILE].txtfile will appear in your Documents folder
(if multiple files are open, you can choose to only runPS_BRAMUS.TextConvert.Exporton the currently active file or on all files) - After the export was done, you’ll get a little notification of this
(ifPS_BRAMUS.TextConvert.Exportran with a single file, the .txt file will open instead)
2. Reworking text
- Locate the exported .txt file in your Documents folder and open it with your favorite text editor
- Translate the strings you find in there, but make sure that you leave the
[BEGIN /XXXX ]and[END /XXXX ]lines untouched! (If changed importing will fail) - Save the text file with the same name in the same location.
3. Importing text (TXT2PSD)
- In Photoshop go to File > Scripts and select
PS_BRAMUS.TextConvert.Import-1.0from the list to import all text. - Per open PSD file, the script will look if the
TextConvert-[NAME_OF_YOUR_PSD_FILE].txtfile exists in your Documents folder, read it in (if it exists) and update the text layers of your PSD file
(if multiple files are open, you can choose to only runPS_BRAMUS.TextConvert.Importon the currently active file or on all files) - After the import was done, you’ll get a little notification of the number of files updated
(if no txt files were found, then it will state that 0 files where changed)
Warning!
- Please note that
PS_BRAMUS.TextConvert.Importis not compatible with any versionPS_BRAMUS.TextExport! - Please note that in between the running of the Export and Import NO CHANGES TO THE PSD FILE can be done!
Example
Given the fact that the image pictured on the left is a normal Photoshop file (viz. background layer, image elements on different layers, text layers, layer groups, etc) I’m quite sure the figure below explains it all:
Now, did you download PS_BRAMUS.TextConvert already?
Make a donation
It certainly is no obligation but it would most certainly put a smile on my face
Tags
export, import, Javascript, photoshop, psd2txt, tool, txt2psd
About this entry

Oct 30 2008 / 6:40 pm


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
[...] http://www.bram.us/2008/10/30/ps_bramustextconvert-psd2txt-and-txt2psd-for-the-masses/ asks Hoosgot, [...]
[...] November 2008: PS_BRAMUS.TextExport is outdated and has been replaced with PS_BRAMUS.TextConvert which does both import and [...]
[...] November 2008:PS_BRAMUS.TextExport is outdated and has been replaced with PS_BRAMUS.TextConvert which does both import and [...]
[...] ?????? PS_BRAMUS.TextConvert???????????????????????????????? [...]
[...] and paste the text. Set out looking for a way to convert the psd to a text file and found this: PSD2TXT, works like a charm. Leave a [...]
Comments
great idea!
bramus strikes again
wonderful! I will be donating today!
A question please: I would like to run the script on multiple files. What can I do instead of manually opening/closing all the files? I thought of batch processing, but the menu file>>automate>>batch… only works with actions, not with scripts
thanks for your help!
PS: regarding my previous comment:
I meant, I would like to run the script on all files in a given folder.