You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jeremias Maerki <de...@jeremias-maerki.ch> on 2007/10/01 08:38:40 UTC

Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

The problem here is testing. I don't have a duplex-capable printer so I
can test the behaviour. You obviously do. Can you please try to fix the
problem in code yourself and post a patch?

Jeremias Maerki



On 28.09.2007 10:18:02 Thomas Margreiter wrote:
> we have updated from FOP 0.20.5 to 0.94 FOP and since this update we cannot
> print in duplex-mode because the fop-renderers send on every page a page-Size
> statement 
> for example in PCL we get on each side a 'ESC &l1O'  for landscapeA4 ! 
> when we print this on HP-Printers (HP 4530, HP 4000, Brother Printers ... ) the
> printer disables the duplex-mode because it recognizes a new Page-size ) only
> xerox printers ignore the page-size command on every page ! 
> 
> the same problem is with postcript renderer ! 
> you test this by creating a simplex job to a file and insert a few PJL -lines
> before the job for activating the duplex mode ! 
> 
> 
> Here is our short xsl-code-snippet:  maybe there is something wrong !?!?
> 
> --------------------------------------------------------------------
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
> 	<xsl:template match="WorkTimeLog">
> 		
> 		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> 		
> 			<fo:layout-master-set>
> 				<fo:simple-page-master master-name="landscapeA4" page-height="21cm"
> page-width="29.7cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.8cm"
> margin-right="0.8cm">
> 					<fo:region-body margin-top="2.2cm" margin-bottom="1.0cm"/>
> 					<fo:region-before extent="3cm"/>
> 				</fo:simple-page-master>
> 			</fo:layout-master-set>
> 			<fo:declarations>
> 				<ps:ps-setup-code name="duplex"
> xmlns:ps="http://xmlgraphics.apache.org/fop/postscript">
> 					&lt;&lt;
> 					/Duplex true
> 					&gt;&gt; setpagedevice
> 				</ps:ps-setup-code>
> 			</fo:declarations>
> 			<fo:page-sequence master-reference="landscapeA4">
> 				<fo:static-content flow-name="xsl-region-before">
> 					<xsl:call-template name="Header"/>
> 				</fo:static-content>
> 				<fo:flow flow-name="xsl-region-body">
> 					<fo:block font-size="8pt">
> 						<xsl:apply-templates select="Data"/>
> 					</fo:block>
> 					<fo:block>
> 						<xsl:value-of select="/WorkTimeLog/Label/EndOfPrint"/>
> 					</fo:block>
> 				</fo:flow>
> 			</fo:page-sequence>
> 		</fo:root>
> 	</xsl:template>
> 
> 
> 
> .....
> 
> 
> ----------------------------------------------------------------------
>    
> thanks for help
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Thomas Margreiter <tm...@felder.at>.
Thanks for your help ! 
I didn't see this 
now it works fine 





---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Chris Bowditch <bo...@hotmail.com>.
Thomas Margreiter wrote:

> Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:
> 
> 
>>The problem here is testing. I don't have a duplex-capable printer so I
>>can test the behaviour. You obviously do. Can you please try to fix the
>>problem in code yourself and post a patch?
>>
>>Jeremias Maerki
> 
> 
> The same problem exists in the PS-Renderer ... 

Did you not see my post from yesterday?

http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200710.mbox/%3cBAY117-DAV1396CC3E635521A6F6EB65FB9E0@phx.gbl%3e

In short this bug does *NOT* exist in the PSRenderer.

> here is the Path for the PS-Renderer
> http://issues.apache.org/bugzilla/attachment.cgi?id=21011&action=edit

Your patch is invalid since it replicates existing functionality and 
won't be applied. The PSPageDeviceDictionary already takes care of 
de-duplicating settings in the page dictionary. If you look at line 768 
in the PSRenderer you will see the setting dsc-compliance is used to 
tell the PSPageDeviceDictionary to avoid putting out the same 
information on every page.

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Thomas Margreiter <tm...@felder.at>.
Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:

> 
> The problem here is testing. I don't have a duplex-capable printer so I
> can test the behaviour. You obviously do. Can you please try to fix the
> problem in code yourself and post a patch?
> 
> Jeremias Maerki

The same problem exists in the PS-Renderer ... 
here is the Path for the PS-Renderer
http://issues.apache.org/bugzilla/attachment.cgi?id=21011&action=edit



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Rodrigo Reyes <re...@gmail.com>.
Nevermind, I just read the mail of Thomas, it was post-processed in the PJL
section, which is OK if there is only one document per fo file.

Rodrigo


2007/10/1, Rodrigo Reyes <re...@gmail.com>:
>
> Hi,
>
> I've implemented a duplex-support for PCL on the svn trunk, because I
> needed it, but, out-of-curiosity, how was it possible to select the duplex
> mode with the 0.2x branch ? Was it done at the spooler level ?
>
> I'll submit the patch for the PCL duplex once I've tested more
> intensively, but if someone needs it in the meantime, I can send the patch.
>
> Rodrigo
>
> 2007/10/1, Chris Bowditch <bo...@hotmail.com>:
> >
> > Jeremias Maerki wrote:
> > > The problem here is testing. I don't have a duplex-capable printer so
> > I
> > > can test the behaviour. You obviously do. Can you please try to fix
> > the
> > > problem in code yourself and post a patch?
> >
> > This is a known problem with the PS Renderer for which is there is
> > already a patch to fix the issue (Bugzilla 42144). The patch will change
> >
> > the PS Renderer so that it only outputs page size if the page size
> > actually changes.
> >
> > Note: that not putting the page size information on every page breaks
> > DSC compliance, so the patch makes turning off page size being put into
> > every page configurable rather than always doing it.
> >
> > I wasn't aware that the same problem existed in PCL Renderer :(
> >
> >
> >

Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Chris Bowditch <bo...@hotmail.com>.
Thomas Margreiter wrote:

<snip/>

> thanks for your help ! 
> we checked-out the trunk and made a test with PS-Printers
> but nothing was changed, xerox-printers print double-sided
> documents and HP-Printers print single-sided Documents.
> may be the bug 42144 is not fixed correctly 

Can you clarify exactly what you did in your test?

The latest FOP code from SVN Trunk can be used to print duplex 
successfully on my local HP printer.

You need to configure FOP correctly to get it working though. In your FO 
file you need to enable duplex for the whole document with the following 
fo:declarations element:

	<fo:declarations>
		<ps:ps-setpagedevice>
			&lt;&lt; /Duplex true &gt;&gt;
		</ps:ps-setpagedevice>
	</fo:declarations>	

Then in your fop.xconf file you need to turn off DSC compliance using 
the following element as a child of the PS Renderer element:

<dsc-compliant>false</dsc-compliant>

HTH!

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Thomas Margreiter <tm...@felder.at>.
Rodrigo Reyes <reyes.fopml <at> gmail.com> writes:

> 
> 
> Hi,
>  
> I've implemented a duplex-support for PCL on the svn trunk, because I needed
it, but, out-of-curiosity, how was it possible to select the duplex mode with
the 0.2x branch ? Was it done at the spooler level ?
> 
>  
> I'll submit the patch for the PCL duplex once I've tested more intensively,
but if someone needs it in the meantime, I can send the patch. 
> Rodrigo 
> 
> 2007/10/1, Chris Bowditch <bowditch_chris <at> hotmail.com>:
> Jeremias Maerki wrote:> The problem here is testing. I don't have a
duplex-capable printer so I
> > can test the behaviour. You obviously do. Can you please try to fix the>
problem in code yourself and post a patch?This is a known problem with the PS
Renderer for which is there isalready a patch to fix the issue (Bugzilla 42144).
The patch will change
> the PS Renderer so that it only outputs page size if the page sizeactually
changes.Note: that not putting the page size information on every page breaksDSC
compliance, so the patch makes turning off page size being put into
> every page configurable rather than always doing it.I wasn't aware that the
same problem existed in PCL Renderer :(
> 
> 
> 


thanks for your help ! 
we checked-out the trunk and made a test with PS-Printers
but nothing was changed, xerox-printers print double-sided
documents and HP-Printers print single-sided Documents.
may be the bug 42144 is not fixed correctly 





---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Rodrigo Reyes <re...@gmail.com>.
Hi,

I've implemented a duplex-support for PCL on the svn trunk, because I needed
it, but, out-of-curiosity, how was it possible to select the duplex
mode with the 0.2x branch ? Was it done at the spooler level ?

I'll submit the patch for the PCL duplex once I've tested more intensively,
but if someone needs it in the meantime, I can send the patch.

Rodrigo

2007/10/1, Chris Bowditch <bo...@hotmail.com>:
>
> Jeremias Maerki wrote:
> > The problem here is testing. I don't have a duplex-capable printer so I
> > can test the behaviour. You obviously do. Can you please try to fix the
> > problem in code yourself and post a patch?
>
> This is a known problem with the PS Renderer for which is there is
> already a patch to fix the issue (Bugzilla 42144). The patch will change
> the PS Renderer so that it only outputs page size if the page size
> actually changes.
>
> Note: that not putting the page size information on every page breaks
> DSC compliance, so the patch makes turning off page size being put into
> every page configurable rather than always doing it.
>
> I wasn't aware that the same problem existed in PCL Renderer :(
>
>
>

Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Chris Bowditch <bo...@hotmail.com>.
Jeremias Maerki wrote:
> The problem here is testing. I don't have a duplex-capable printer so I
> can test the behaviour. You obviously do. Can you please try to fix the
> problem in code yourself and post a patch?

This is a known problem with the PS Renderer for which is there is 
already a patch to fix the issue (Bugzilla 42144). The patch will change 
the PS Renderer so that it only outputs page size if the page size 
actually changes.

Note: that not putting the page size information on every page breaks 
DSC compliance, so the patch makes turning off page size being put into 
every page configurable rather than always doing it.

I wasn't aware that the same problem existed in PCL Renderer :(

Chris

> 
> Jeremias Maerki
> 
> 
> 
> On 28.09.2007 10:18:02 Thomas Margreiter wrote:
> 
>>we have updated from FOP 0.20.5 to 0.94 FOP and since this update we cannot
>>print in duplex-mode because the fop-renderers send on every page a page-Size
>>statement 
>>for example in PCL we get on each side a 'ESC &l1O'  for landscapeA4 ! 
>>when we print this on HP-Printers (HP 4530, HP 4000, Brother Printers ... ) the
>>printer disables the duplex-mode because it recognizes a new Page-size ) only
>>xerox printers ignore the page-size command on every page ! 
>>
>>the same problem is with postcript renderer ! 
>>you test this by creating a simplex job to a file and insert a few PJL -lines
>>before the job for activating the duplex mode ! 
>>
>>
>>Here is our short xsl-code-snippet:  maybe there is something wrong !?!?
>>
>>--------------------------------------------------------------------
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
>>	<xsl:template match="WorkTimeLog">
>>		
>>		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>		
>>			<fo:layout-master-set>
>>				<fo:simple-page-master master-name="landscapeA4" page-height="21cm"
>>page-width="29.7cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.8cm"
>>margin-right="0.8cm">
>>					<fo:region-body margin-top="2.2cm" margin-bottom="1.0cm"/>
>>					<fo:region-before extent="3cm"/>
>>				</fo:simple-page-master>
>>			</fo:layout-master-set>
>>			<fo:declarations>
>>				<ps:ps-setup-code name="duplex"
>>xmlns:ps="http://xmlgraphics.apache.org/fop/postscript">
>>					&lt;&lt;
>>					/Duplex true
>>					&gt;&gt; setpagedevice
>>				</ps:ps-setup-code>
>>			</fo:declarations>
>>			<fo:page-sequence master-reference="landscapeA4">
>>				<fo:static-content flow-name="xsl-region-before">
>>					<xsl:call-template name="Header"/>
>>				</fo:static-content>
>>				<fo:flow flow-name="xsl-region-body">
>>					<fo:block font-size="8pt">
>>						<xsl:apply-templates select="Data"/>
>>					</fo:block>
>>					<fo:block>
>>						<xsl:value-of select="/WorkTimeLog/Label/EndOfPrint"/>
>>					</fo:block>
>>				</fo:flow>
>>			</fo:page-sequence>
>>		</fo:root>
>>	</xsl:template>
>>
>>
>>
>>.....
>>
>>
>>----------------------------------------------------------------------
>>   
>>thanks for help
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: BUG in FOP 0.94 PS Renderer and PCL Renderer ? or wrong XSL ?

Posted by Thomas Margreiter <tm...@felder.at>.
Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:

> 
> The problem here is testing. I don't have a duplex-capable printer so I
> can test the behaviour. You obviously do. Can you please try to fix the
> problem in code yourself and post a patch?
> 
> Jeremias Maerki
> 
> On 28.09.2007 10:18:02 Thomas Margreiter wrote:



here is the patch:
http://issues.apache.org/bugzilla/attachment.cgi?id=21005



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org