The difference in the encoded "stream" content is only regarding those characters: 0x04 EOT (end of transmission) 0x0D CR '\r' (carriage ret) When I replace in both hdr_KDK2.eps and hdr_KDK2-extracted-from-doc.ps all '\r' with '\n' (using " tr '\r' '\n' " ) and when I also remove in both files all EOT (using " tr -d '\004' " ) then both resulting remainder files are identical. Accordingly it seems when including "gs -sDEVICE=eps2write" output latex or dvips somehow mess up things with EOT and CR characters.