You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by Apache Wiki <wi...@apache.org> on 2007/04/17 14:06:25 UTC
[Xmlgraphics-fop Wiki] Update of "ExtensionsForPostScript" by AdrianCumiskey
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.
The following page has been changed by AdrianCumiskey:
http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript
------------------------------------------------------------------------------
PostScript file instead of the actual media selection code. This comment
will then be expanded later.
+ = Proposed additional extensions =
+
+ See [http://issues.apache.org/bugzilla/show_bug.cgi?id=42144]
+
+ == ps:ps-setpagedevice ==
+
+ Content:
+ (#CDATA)
+
+ Where the page device dictionary is to be set, use the new ps-setpagedevice declaration instead of ps:ps-setup-code. This is because directly invoking the setpagedevice postscript command can cause the postscript interpreter on some printers to perform an init-graphics call. This init-graphics call can annoyingly cause unwanted blank pages to be printed.
+
+ The FOP postscript renderer now has the ability to hold an internal representation of the printer's page device dictionary. Any additional dictionary items added to this dictionary using the ps-setpagedevice mechanism result in a safe setting of parameters to the postscript page device dictionary. This new ps-setpagedevice mechanism provides a safer way to issue the same instructions to the printer. Cumulative duplicate dictionary values should never be issued more than once to the printer during postscript output rendition.
+
+ == ps:ps-title-line ==
+
+ A ps-title-line element if declared, should be a child of the fo:root node. On rendition, it will cause a DSC Title comment to appear before the EndComments DSC comment in the header section of the postscript output.
+
+ == ps:ps-page-info ==
+
+ A ps-page-info if delcared, should be a child of the fo:simple-page-master node. On rendition, it will cause a %FOPPageInfo: comment to appear directly following the BeginPageSetup DSC comment.
+
+ = Example Usage =
+
+ {{{
+ <?xml version="1.0"?>
+ <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="template1" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
+ <fo:region-body margin-top="3cm"/>
+ <fo:region-before extent="3cm"/>
+ <fo:region-after extent="1.5cm"/>
+ <ps:ps-setpagedevice name="lower tray"><![CDATA[
+ <<
+ /MediaPosition /4
+ >>
+ ]]></ps:ps-setpagedevice>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="template2" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
+ <fo:region-body margin-top="2cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2.5cm"/>
+ <ps:ps-page-info>template2 page info</ps:ps-page-info>
+ <ps:ps-setpagedevice name="upper tray"><![CDATA[
+ <<
+ /MediaPosition /1
+ >>
+ ]]></ps:ps-setpagedevice>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="template3" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
+ <fo:region-body margin-top="2cm"/>
+ <fo:region-before extent="2cm"/>
+ <fo:region-after extent="2.5cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:declarations>
+ <ps:ps-title-line>test document title</ps:ps-title-line>
+ <ps:ps-page-info>test default page info</ps:ps-page-info>
+ <ps:ps-setpagedevice name="autofeed"><![CDATA[
+ <<
+ /ManualFeed false
+ >>
+ ]]></ps:ps-setpagedevice>
+ </fo:declarations>
+ <fo:page-sequence master-reference="template1">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Some text.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="template2">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Some more text.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="template3">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Even more text.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ }}}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org