Ghostscript test for sample-technical.pdf

← Back to Ghostscript

Input: sample-technical.pdf

sample-technical.pdf first page preview

gs

gs -dBATCH -dNOPAUSE -sDEVICE=txtwrite -sOutputFile="sample-technical--ghostscript-c--gs.txt" "sample-technical.pdf"

Output: sample-technical--ghostscript-c--gs.txt

Loading preview…

-dTextFormat=3: approximate original layout/spacing, UTF-8 text.

gs -dBATCH -dNOPAUSE -sDEVICE=txtwrite -dTextFormat=3 -sOutputFile="sample-technical--ghostscript-c--gs--textformat3.txt" "sample-technical.pdf"

-dTextFormat=1: structured XML with per-character coordinates/font info.

gs -dBATCH -dNOPAUSE -sDEVICE=txtwrite -dTextFormat=1 -sOutputFile="sample-technical--ghostscript-c--gs--textformat1.xml" "sample-technical.pdf"

ps2ascii

ps2ascii "sample-technical.pdf" >"sample-technical--ghostscript-c--ps2ascii.txt"