|
From: <ds...@ac...> - 2005-02-10 03:47:35
|
>> On that note, I've placed a patch on SourceForge (1117060) that is a f= ix >> or enhancement for PostScript level 1 devices. It's been hanging arou= nd >> for a while. I've just updated the thing to accomodate the change in >> layout and variable names in post.term. The original code was a bit o= f >> work. The postscript code is tricky because it conditionally displays >> an image in the non "level1" setting depending upon whether the device >> is level 1 or not. The trick is that you can't just ignore the data >> there, it has to be "read in" from within the file itself so that >> PostScript doesn't think the data are commands and subsequently crashe= s. >> >> Anyway, it hasn't been tested by someone who has a true Level 1 printe= r >> (i.e., dinosaur). But I think it is an improvement. Doubt I will >> update the patch again unless I ever need Level 1 support for some >> strange reason. > > How much does it extend the file size? Not by much. Here is the structure as I have changed it when level2 is allowed (i.e., user does not indicate "level1"): <conditional test for Level1> <if true> <draw a box with "this is level 2 image" inside> <if false> <a groupd of commands saying to "read from file" and ignore the next N by= tes of data in the file> <end conditional> \filter and other commands <big block of ASCII86 image data> With the added instructions, the "\filter" command is read and ignored.=20 Without them, "\filter" is an unrecognized command to level 1 and causes problems. The type bunch of code in ascii I'm guessing is 200 bytes or so (?). > > Is this Level1 code only for images? I think that a combination of some= one > printing images and using an obsolete (color?) postscript level 1 print= er > is > very rare. Is the code put in only when "set term post level1" is > specified? No, when level1 is specified, a level one readable image is included, not an ASCII86 filtered image. It is bulkier, but viewable to level 1 devices. The patch turns out to be fairly big because I put the ASCII85 encoding and in its own function, thereby shuffling around a lot of code. So ther= e is an ASCII85 routine, a regular level 1 image routine--both with the sam= e input/output structure. If someone wants a new encoding, say runlength (which some have asked for) this works out nicely because all it means no= w is a new subroutine similar to the existing two. Dan |