Thread View: comp.lang.postscript
4 messages
4 total messages
Started by Richard P. Daley
Wed, 30 Dec 1992 03:24
Filtering ^D from PS files
Author: Richard P. Daley
Date: Wed, 30 Dec 1992 03:24
Date: Wed, 30 Dec 1992 03:24
22 lines
1320 bytes
1320 bytes
From a Postscript neophyte... I understand that some PC software is in the habit of creating Postscript files which contain ^D characters, to make printing via serial connections work. I have various software packages on my SPARCStation which print, fax, and view Postscript files, and some of these packages don't like finding ^D characters imbedded in the Postscript. I'd like to use a simple filter to get rid of the ^D characters. Can anyone tell me whether it's safe to strip out all ^D characters from an arbitrary Postscript file? Is it possible for a Postscript file to have ^D characters that can't be stripped out? For example, is there a way to imbed bitmaps or other binary data using non-printable characters? Should my filter be a little smarter, and only filter out ^D characters that show up at the beginning of the file? Is there any software which is creating Postscript files with a ^D at the end as well? Thanks for any advice, Rick Daley rdaley@sbi.com
Re: Filtering ^D from PS files
Author: Manuel Veloso
Date: Wed, 30 Dec 1992 19:38
Date: Wed, 30 Dec 1992 19:38
16 lines
1499 bytes
1499 bytes
In article <1602@twinkletoes.sbi.com> Richard P. Daley, rpd@twinkletoes.sbi.com writes: >Can anyone tell me whether it's safe to strip out all ^D characters from an >arbitrary Postscript file? Is it possible for a Postscript file to have >^D characters that can't be stripped out? For example, is there a way to >imbed bitmaps or other binary data using non-printable characters? I tried to do this once because binary images would inevitably have a ctrl-d in them. Stripping them out doesn't work, nor does converting them. And on the mac, there's no reliable, simple way to tell if the ctrl-d is part of a binary image. But if the ctrl-d's are in a certain place (before %%BeginDocument or after %%EOF) then they're probably safe to strip. Manuel
Re: Filtering ^D from PS files
Author: Paul Gilmartin
Date: Thu, 31 Dec 1992 00:15
Date: Thu, 31 Dec 1992 00:15
16 lines
1278 bytes
1278 bytes
Richard P. Daley (rpd@twinkletoes.sbi.com) wrote:
: I understand that some PC software is in the habit of creating Postscript files
: which contain ^D characters, to make printing via serial connections work.
: I have various software packages on my SPARCStation which print, fax, and view
: Postscript files, and some of these packages don't like finding ^D characters
: imbedded in the Postscript. I'd like to use a simple filter to get rid of the
: ^D characters.
It may help to concatenate your PostScript file after the following:
%!
<04> cvn {} def
which redefines the ^D as a no-op to PostScript. You might also
want to try a similar trick for the ^Z with <1A> instead of <04>.
This should preserve those characters in binary images.
Re: Filtering ^D from PS files
Author: Rick Clements
Date: Mon, 04 Jan 1993 17:52
Date: Mon, 04 Jan 1993 17:52
19 lines
1324 bytes
1324 bytes
In article <1602@twinkletoes.sbi.com> rpd@twinkletoes.sbi.com (Richard P. Daley) writes: >From a Postscript neophyte... >Can anyone tell me whether it's safe to strip out all ^D characters from an >arbitrary Postscript file? Is it possible for a Postscript file to have >^D characters that can't be stripped out? For example, is there a way to >imbed bitmaps or other binary data using non-printable characters? You can remove ^D from files which have ASCII and binary data. If the file has raw data you can't. The serial and parallel ports will handle both ASCII and binary data. AppleTalk will handle raw data. The difference between binary and raw data is binary data has special characters quoted (^D, ^C, ^S ...). In level II, the ^D won't appear as a ^D in the data. In level I, different printers quoted binary data differently, so many programs didn't send binary data because it wasn't consistant. -- Rick Clements (RickCl@pogo.WV.TEK.COM)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads