PS2ASCII(1)
ps2ascii(1) β bestie, it's giving text extraction β¨
okay so picture this: you've got a PostScript file or a PDF and you just want the words out of it, no fonts, no shapes, no drama. that's what ps2ascii is for, and she's a Ghostscript translator from PostScript or PDF to text. no cap. π
πΈ SYNOPSIS πΈ
ps2ascii [ input.ps [ output.txt ] ]
ps2ascii input.pdf [ output.txt ]
likeβ¦ two moods. .ps gets the optional brackets, .pdf is just straight up there. iconic behavior honestly. π
β¨ DESCRIPTION β¨
So ps2ascii uses gs(1) to yank the text out of PostScript(tm) or Adobe Portable Document Format (PDF) files. that's the whole job. that's her moment. π
Here's the vibe on the args, listen up:
- if you don't name any files on the command line, then
gsreads from standard input. so you can just pipe stuff in, go off king π«Ά - if you don't name an output file, the ASCII text goes to standard output. she's a talker, she'll just tell you. π¦
π¨ lore drop: the old ps2ascii.ps program was deprecated and got removed some years ago. rest in peace queen, she's gone.
so now the scripts use the txtwrite device to extract text from the input instead. and honestly? it does a generally better job than the old PostScript program did, and it can extract Unicode, not just ASCII. slay. β¨
but β and this is the part where we hold hands π«Ά β it no longer supports the COMPLEX feature. that feature is not invited to the party anymore. periodt.
π SEE ALSO π
more documentation on the txtwrite device lives right here, go read it, i know you want to:
https://ghostscript.readthedocs.io/en/latest/Devices.html#text-output
β VERSION β
this document was last revised for Ghostscript version 10.04.0. keeping it fresh. π§
π AUTHOR π
Artifex Software, Inc. are the primary maintainers of Ghostscript. main character energy, truly. π
and David M. Jones <dmjones@theory.lcs.mit.edu> made substantial improvements to ps2ascii. king behavior, we appreciate you. π
k that's the whole page bestie, ily, go extract some text π this was 10.04.0, dated 18 Sept 2024, and it's out. πβ¨
π¦ where this page comes from
- alpine 3.22: ghostscript-doc 10.05.1-r0 Β· AGPL-3.0-or-later
- alpine 3.23: ghostscript-doc 10.08.0-r0 Β· AGPL-3.0-or-later
- alpine 3.24: ghostscript-doc 10.08.0-r0 Β· AGPL-3.0-or-later
- arch rolling: ghostscript 10.08.0-1 Β· AGPL-3.0-or-later
- debian trixie: ghostscript 10.05.1~dfsg-1+deb13u1 Β· LicenseRef-public-domain
- debian trixie: ghostscript 10.05.1~dfsg-1+deb13u3 Β· LicenseRef-public-domain
- fedora 43: ghostscript 10.05.1-5.fc43 Β· AGPL-3.0-or-later
- fedora 43: ghostscript 10.05.1-5.fc43 Β· AGPL-3.0-or-later
- fedora 43: ghostscript 10.05.1-6.fc43
- fedora 43: ghostscript 10.05.1-6.fc43
- fedora 43: ghostscript 10.05.1-7.fc43 Β· AGPL-3.0-or-later
- fedora 43: ghostscript 10.05.1-7.fc43 Β· AGPL-3.0-or-later
- fedora 44: ghostscript 10.06.0-2.fc44 Β· AGPL-3.0-or-later
- fedora 44: ghostscript 10.06.0-2.fc44 Β· AGPL-3.0-or-later
- fedora 44: ghostscript 10.06.0-3.fc44 Β· AGPL-3.0-or-later
- nixpkgs unstable: ghostscript 10.08.0
- nixpkgs unstable: ghostscript-with-X 10.08.0
- opensuse-leap 16.0: ghostscript 10.08.0-160000.2.1 Β· AGPL-3.0-only
- opensuse-leap 16.0: ghostscript 10.08.0-160000.2.1 Β· AGPL-3.0-only
- opensuse-leap 16.0: ghostscript 10.08.0-160000.2.1 Β· AGPL-3.0-only
- opensuse-leap 16.0: ghostscript 10.08.0-160000.2.1 Β· AGPL-3.0-only
- ubuntu questing: ghostscript 10.05.0dfsg1-0ubuntu4
- ubuntu resolute: ghostscript 10.06.0~dfsg-3ubuntu1 Β· LicenseRef-public-domain
- ubuntu resolute: ghostscript 10.06.0~dfsg-3ubuntu1.1
- ubuntu resolute: ghostscript 10.06.0~dfsg-3ubuntu1.2 Β· LicenseRef-public-domain
- ubuntu stonking: ghostscript 10.07.1~dfsg-1ubuntu2 Β· LicenseRef-public-domain
- ubuntu stonking: ghostscript 10.07.1~dfsg-1ubuntu2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms