How to extract text from a PSD file?

前端 未结 5 1754
情深已故
情深已故 2021-01-01 16:47

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. A

相关标签:
5条回答
  • 2021-01-01 17:07

    You can use Photopea, it is not a desktop app, it runs in browser so you do not need to install anything, just open your psd file, and edit, or copy the text like in Photoshop:

    https://www.photopea.com/

    0 讨论(0)
  • 2021-01-01 17:08
    strings FILENAME > temp.txt
    

    The file temp.txt will contain all the plain text strings from the file, including some additional PSD settings. You'll have to manually search this file for the text you need.

    0 讨论(0)
  • 2021-01-01 17:15

    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>
    
    0 讨论(0)
  • 2021-01-01 17:17

    Just released this feature in the NPM package psd-cli. Makes it simple to extract text content without the headache of manually running through the file...

    One-line command install (needs NodeJS/NPM installed)

    npm install -g psd-cli

    You can then use it by typing in your terminal

    psd myfile.psd -t

    This will create myfile.txt, containing all text extracted from each PSD layer with the layer structure attached.

    Enjoy !

    npmjs.org package description

    0 讨论(0)
  • 2021-01-01 17:25

    Visit the internet site http://www.bram.us/2008/10/30/ps_bramustextconvert-psd2txt-and-txt2psd-for-the-masses/. There are two tools to export and import text from psd files. It goes very good!

    0 讨论(0)
提交回复
热议问题