Thread View: adobe.postscript.programming
4 messages
4 total messages
Started by Carole Depelchin
Mon, 18 Nov 2002 14:45
code fragment applied to every page
Author: Carole Depelchin
Date: Mon, 18 Nov 2002 14:45
Date: Mon, 18 Nov 2002 14:45
11 lines
1109 bytes
1109 bytes
Hello! I'd like some precisions about PostScript fragments in the prolog of a PS file. I know that the code inserted in the prolog is applied to each page of the document printed. I 'd like to know if it is possible to encounter a PostScript file with a code fragment to apply to every page, but defined at the end of the PS file? Thanks in advance Carole
Re: code fragment applied to every page
Author: Aandi Inston
Date: Mon, 18 Nov 2002 15:05
Date: Mon, 18 Nov 2002 15:05
12 lines
1371 bytes
1371 bytes
>I know that the code inserted in the prolog is applied to each page of the document printed. No, it isn't. It is executed once only, before the first page. Prologues must not mark the first or any page, but can define procedures that do this. >I 'd like to know if it is possible to encounter a PostScript file with a code fragment to apply to every page, but defined at the end of the PS file? No. PostScript is executed sequentially (in order) and once a page is finished there is no way to later change it. Aandi Inston
Re: code fragment applied to every page
Author: Carole Depelchin
Date: Wed, 20 Nov 2002 12:15
Date: Wed, 20 Nov 2002 12:15
9 lines
1368 bytes
1368 bytes
Thanks, that's right; Could you tell me if this is correct? So, if we want to print on each page the same object, we have to put its description in the prolog, and embed each page with the PS instructions 'save' and 'restore'. So the current page with the prolog code executed (saved on the stack) will be restored before each page execution. There is no way to define some parts of the description of these objects at the end of the file (or somewhere else than in the prolog). Thanks in advance to tell me if I have well understood, Carole
Re: code fragment applied to every page
Author: Aandi Inston
Date: Wed, 20 Nov 2002 18:13
Date: Wed, 20 Nov 2002 18:13
8 lines
1261 bytes
1261 bytes
Indeed: you cannot define shared objects at the end, because PostScript is read only from start to finish. Your description does not mention it but you need to actually mark each page. Also, you do not usually need save and restore unless you include an EPS. Aandi Inston
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