On Tuesday, 27 בFebruary 2007 13:42, Peter wrote:
> On Tue, 27 Feb 2007, Shachar Shemesh wrote:
> I don't know how gv pages backwards, it is possible that it saves state 
> and 'redoes' previous pages although I am not sure of this. gv does not 
> have a huge memory footprint even when rendering 200+ page documents and 
> it is very fast. So there must be a way. Imho get the source and take a 
> peek.

What gv does is to count on Postscript DSC (Document Structure
Conventions). This conventions involves both special comments
inserted at the file (e.g: %Page, %Pages, etc.) and rules about
the program structure (Postscript is a programming language).

A Postscript file that obeys DSC rules may be manipulated by
many external programs in interesting ways (e.g: Reverse page
order, n-Up printing [like 4 minipages per page], booklet
printing [page #1 + #n, page #2+#(n-1), ...].

A file that does not obey these rules has no problem in printing
(assuming the Postscript code is legal), but cannot be reliably
manipulated as the above. For an easy demonstration you may
either strip all comments except for the opening comment
(%! PS....) from a valid file. The file can still be printed
or processed by gs in a linear fashion but any program that
tries to do smart things with it like gv fails miserably.

If you want to have some fun, the most common non-DSC conforming
files are those generated by the Windows Postscript drivers...

Hope it helps,

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

"Some people have a life, others have Windows to tell them
where they want to go today" - Ronald C.F. Antony

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to