Hi Christian,
Thanks for pointing this out. Can you log a JIRA entry for this issue?
It sounds like the original author of the ps:set-pagedevice extension
assumed the variable would always be the 2nd operand, but that is not a
fair assumption with Postscript. Make sure you include a sample FO File
on the JIRA entry
As a workaround can you use the ps:ps-page-setup-code extension instead?
Thanks,
Chris
On 06/02/2015 16:48, Christian Pestel wrote:
Hi,
I would like to print on a Xerox 7835 printer
With LasetJet Printer trays, this work fine but not with Xerox 7835.
With LaserJet, trays PostScript instruction are
for Tray 1 : /MediaPosition 1
for Tray 2 : /MediaPosition 2
With Xerox :
for Tray 1 : (tray1) xerox$MediaInputTray
for Tray 2 : (tray2) xerox$MediaInputTray
Here is an extract of my IF file (Intermediate Format) for LaserJet :
Page 1 :
<ps-setpagedevice xmlns="apache:fop:extensions:postscript"
name="Paper_1"> << /MediaPosition 1 >> </ps-setpagedevice>
Page 2 :
<ps-setpagedevice xmlns="apache:fop:extensions:postscript"
name="Paper_2"> << /MediaPosition 2 >> </ps-setpagedevice>
PS file for LaserJet :
Page 1 :
%FOPBeginSetPageDevice
<<
/PageSize [595 842]
/MediaPosition 1
/ImagingBBox null
>> setpagedevice
%FOPEndSetPageDevice
Page 2 :
%FOPBeginSetPageDevice
<<
/PageSize [595 842]
/MediaPosition 2
/ImagingBBox null
>> setpagedevice
%FOPEndSetPageDevice
Here is an extract of my IF file (Intermediate Format) for Xerox 7835"
Page 1 :
<ps-setpagedevice xmlns="apache:fop:extensions:postscript"
name="Paper_1"> << (tray1) xerox$MediaInputTray >> </ps-setpagedevice>
Page 2 :
<ps-setpagedevice xmlns="apache:fop:extensions:postscript"
name="Paper_2"> << (tray2) xerox$MediaInputTray >> </ps-setpagedevice>
PS file for Xerox :
Page 1 :
%FOPBeginSetPageDevice
<<
/PageSize [595 842]
(tray1) xerox$MediaInputTray <===== correct/ImagingBBox null
>> setpagedevice
%FOPEndSetPageDevice
Page 2 :
%FOPBeginSetPageDevice
<<
/PageSize [595 842]
(tray1) xerox$MediaInputTray <===== incorrect
(tray2) xerox$MediaInputTray <===== only this line is correct
/ImagingBBox null
>> setpagedevice
%FOPEndSetPageDevice
I have analysed the fop source code.
In fact, Fop use a key/Value HashTable and all new key/value are
cumulative.
Example with LaserJet
Page 1 : key=/MediaPosition and value=1 => Fop write in PostScript :
“/MediaPosition 1”
Page 2 : key=/MediaPosition and value=2 => Fop write in PostScript :
“/MediaPosition 2”
Exemple with Xerox :
Page 1 : key=(tray1) and value=xerox$MediaInputTray => Fop write in
PostScript : “(tray1) xerox$MediaInputTray”
Page 2 : key=(tray2) and value=xerox$MediaInputTray => Fop write in
PostScript all keys/values : “(tray1) xerox$MediaInputTray” +
“(tray2) xerox$MediaInputTray”
Where is the best way to resolve this problem ?
Possibly adding a new key
ClearPreviousTrayInfosBeforeSettingNewPage=true/false in fop config
PostScript section ?
Thank you for your advice.
Christian Pestel
christian.pes...@orange.fr <mailto:cpes...@bdoc.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org