Ghostscript test for sample-receipt.pdf

← Back to Ghostscript

Input: sample-receipt.pdf

sample-receipt.pdf first page preview

gs

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

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

Loading preview…

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

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

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

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

ps2ascii

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