[pdftex] hello and color question

Hans Hagen pragma at wxs.nl
Fri Apr 16 09:28:03 CEST 2004


At 21:57 15/04/2004, you wrote:

>or do it in smarter way with TeX definitions, but is there any PDF 
>operator like save_color / restore_color?

since color can end up anywhere and the order of flushing can be any, and 
since there are many color models and occasional interactions with other 
mechanisms, a fool proof color mechanism is very tight to a macro-set 
(feature set).

>2. Graphic state of PDF page is restored to defaults at the begining of 
>each page. Therefore the following code
>
>\pdfliteral{.1 .2 .3 .4 k}
>first page
>\vfill\eject
>second one
>\end
>
>will produce only first page colorized. Is there any way to set some color 
>for the whole documents expect invoking \pdfliteral{...} in output 
>routines? Is it possible to do that with \pdfpagesattr?

you can of course hook it into the shipout: remember the current color and 
reset it at the start of a page (which of course is different for each 
macro package since there are different models for headers/footers/flushing 
these)

the only robust solution for this kind of features is a generic attributes 
handler (like the one for fonts) but even then, additional nodes 
interactions and side effects need to be controlled by the macro package.

Hans  



More information about the pdftex mailing list