Hi Ahmed,

If all you need are comments to be inserted at the beginning of the postscript file you could define a series of <ps:ps-comment-before/> inside your <fo:declarations/>.

Here is an example that should work for your purposes :-

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";
  xmlns:ps="http://xmlgraphics.apache.org/fop/postscript";>
  <fo:layout-master-set>
<fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin="2cm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:declarations>
<ps:ps-comment-before>%DocumentMedia: anything 595 842 0 MAIN ()</ps:ps-comment-before> <ps:ps-comment-before>%+ anything 595 842 0 AUX ()</ps:ps-comment-before>%+ anything 595 842 0 MAG3 ()</ps:ps-comment-before> <ps:ps-comment-before>%+ anything 595 842 0 MAG4 ()</ps:ps-comment-before> <ps:ps-comment-before>%+ anything 595 842 0 MAG5 ()</ps:ps-comment-before>
  </fo:declarations>
  <fo:page-sequence master-reference="A4">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>Hello World!</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Again, see http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript for details. Hope this helps,

Adrian.

[EMAIL PROTECTED] wrote:
Hi,

I remarked that among ps tags ("ps-setup-code", "ps-page-setup-code" and
"ps-setpagedevice") there is no one which allows to inject PS instruction
only once in the document. I have a case where following code comes only
at the beguinning of the ps file:

%%DocumentMedia: anything 595 842 0 MAIN ()
%%+ anything 595 842 0 AUX ()
%%+ anything 595 842 0 MAG3 ()
%%+ anything 595 842 0 MAG4 ()
%%+ anything 595 842 0 MAG5 ()

and not in every page.

The generated ps file is correctally opened by gsView for the moment: I
dont know yet if it will be "accepted" by Xerox printer. Anyway, there is
a risk that ps file will be enormous when programs will be deployed...

A+. Ahmed HADDAD.






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to