How to extract text from a PSD file?

rado picture rado · Jul 7, 2009 · Viewed 17.6k times · Source

I need to extract the text from the layers in a photoshop PSD file on linux. Does anyone know how to do that? Gimp rasterizes the text and you can't copy and paste it. Also, note that I do not own the Photoshop program.

Answer

alfredodeza picture alfredodeza · Jul 7, 2009

Have you tried using vim?

VIM comes with a flag that lets you edit a binary file.

I tried editing a PSD file with:

vim -b file.psd

This is an example of what I got when editing the file:

                            <dict>
                                    <key>com.apple.print.PageFormat.PMAdjustedPageRect</key>
                                    <array>
                                            <real>0.0</real>
                                            <real>0.0</real>
                                            <real>576</real>
                                            <real>734</real>
                                    </array>
                                    <key>com.apple.print.ticket.stateFlag</key>
                                    <integer>0</integer>
                            </dict>