Re: Embedding Printer Control parameters
Hello, Jeremias! You wrote to [EMAIL PROTECTED] on Fri, 21 Mar 2003 18:38:15 +0100: JM Two possibilities: JM - Subclass the PostScript renderer and try to find the right place JM for your special commands. You can then set the subclassed JM renderer in the JM Driver using setRenderer(Renderer). JM - Post-process the generated file. If it's just a few leading and JM trailing comments, this is extremely easy. Open a new JM FileOutputStream, create a Writer on that stream, send your JM leading commands, pipe the whole PS file through to the JM OutputStream, then add trailing commands via the Writer and close JM the OutputStream. JM I hope that helps. Thank you for fast response. Is there are somehow possible to embedd PS command in XSL file, and this command will be included in resulting PS file. This approach will be very useful. And by the way, Almost all renderer have a bug. Logger is not setting when renderer is creting. I would suggest to change setRenderer methods in Driver and set the logger for renderer. Or each renderer should set the default logger, as it doing PDFRenderer. If you run a transformation and do not set a logger for Renderer NullPointerException thrown in the method: public void startRenderer(OutputStream outputStream) ... log.debug(rendering areas to PostScript); // here --- Yours sincerely, Ivan Latysh. Ivan[a]yourmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters
On 21.03.2003 19:06:54 IvanLatysh wrote: Is there are somehow possible to embedd PS command in XSL file, and this command will be included in resulting PS file. This approach will be very useful. In the redesign that should be relatively simple. Can't say offhand how difficult this would be in the old FOP. The way to go is to implement an extension. See the website and mailing list archives for more information. And by the way, Almost all renderer have a bug. Logger is not setting when renderer is creting. The code says something else. The Driver.setRenderer() method sets the logger. Maybe you didn't set the logger on the Driver before calling setRenderer. I would suggest to change setRenderer methods in Driver and set the logger for renderer. Or each renderer should set the default logger, as it doing PDFRenderer. If you run a transformation and do not set a logger for Renderer NullPointerException thrown in the method: public void startRenderer(OutputStream outputStream) ... log.debug(rendering areas to PostScript); // here Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters
Hello, Jeremias! You wrote to [EMAIL PROTECTED] on Fri, 21 Mar 2003 20:14:59 +0100: JM In the redesign that should be relatively simple. Can't say offhand JM how difficult this would be in the old FOP. The way to go is to JM implement an extension. See the website and mailing list archives JM for more information. When the new FOP could be available ? :-) And by the way, Almost all renderer have a bug. Logger is not setting when renderer is creting. JM The code says something else. The Driver.setRenderer() method sets JM the logger. Maybe you didn't set the logger on the Driver before JM calling setRenderer. fop-0.20.5rc2 - Driver.java,v 1.36.2.9 2002/12/09 00:34:56 Method public void setRenderer(String rendererClassName) try { _renderer = (Renderer)Class.forName(rendererClassName).newInstance(); _renderer.setProducer(Version.getVersion()); } catch (ClassNotFoundException e) { ... Method public void setRenderer(int renderer) throws IllegalArgumentException { switch (renderer) { case RENDER_PS: setRenderer(new org.apache.fop.render.ps.PSRenderer()); break; ... I am reusing the Driver. I did set the Logger before I set the renderer. --- Yours sincerely, Ivan Latysh. Ivan[a]yourmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters
On 21.03.2003 21:21:46 IvanLatysh wrote: Hello, Jeremias! You wrote to [EMAIL PROTECTED] on Fri, 21 Mar 2003 20:14:59 +0100: JM In the redesign that should be relatively simple. Can't say offhand JM how difficult this would be in the old FOP. The way to go is to JM implement an extension. See the website and mailing list archives JM for more information. When the new FOP could be available ? :-) Immediately, if you download from CVS. Seriously, a release is still some time away. We don't know when that will be. Depends on the help we get and how much time we have to work on FOP. Maybe you should have a look at the redesign and see what it can already do. And by the way, Almost all renderer have a bug. Logger is not setting when renderer is creting. JM The code says something else. The Driver.setRenderer() method sets JM the logger. Maybe you didn't set the logger on the Driver before JM calling setRenderer. fop-0.20.5rc2 - Driver.java,v 1.36.2.9 2002/12/09 00:34:56 Method public void setRenderer(String rendererClassName) try { _renderer = (Renderer)Class.forName(rendererClassName).newInstance(); _renderer.setProducer(Version.getVersion()); } catch (ClassNotFoundException e) { ... Ah yes, this is bad. But I meant setRenderer(Renderer), not setRenderer(String). So instantiate your sublassed renderer yourself and pass it to FOP. It will be assigned a logger. Method public void setRenderer(int renderer) throws IllegalArgumentException { switch (renderer) { case RENDER_PS: setRenderer(new org.apache.fop.render.ps.PSRenderer()); break; ... I am reusing the Driver. I did set the Logger before I set the renderer. You're doing everything right. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters
Hello, Jeremias! You wrote to [EMAIL PROTECTED] on Fri, 21 Mar 2003 21:30:34 +0100: JM Immediately, if you download from CVS. Seriously, a release is still JM some time away. We don't know when that will be. Depends on the help JM we get and how much time we have to work on FOP. Maybe you should JM have a look at the redesign and see what it can already do. I will have a look. For now, I changed PSRenderer and add method writeFeatures(), which simply write my futures. It does fine with duplex. JM Ah yes, this is bad. But I meant setRenderer(Renderer), not JM setRenderer(String). So instantiate your sublassed renderer yourself JM and pass it to FOP. It will be assigned a logger. This is a single method which have it :-) We are using a custom FOPEmmiter for Saxon. And emitter do not instantiate the Renderer, it simply reading a renderer class from XSL and pass it to the Driver. For us, this is a best way to perform a transformation. And thank you again for your help. --- Yours sincerely, Ivan Latysh. Ivan[a]yourmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters in PCL
On Brian T. Wolf wrote: We are working on that as well, though I don't have any good solutions yet either. If you run across something please let me know. Just as an FYI, I tried hardcoding a duplex print escape sequence into PCLRenderer.java and it printed both sides as expected. So I figure once we solve how to pass through the landscape code, this should be resolved as well. There is more to this than a FOP coding issue I believe however. The xsl:fo standard has nothing to do with how a particular printer should behave. So we also need to figure out how to get the information from the stylesheet to the renderer without damaging the integrity of the xsl. Regards, Brian - Original Message - From: Raj [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 7:45 AM Subject: Embedding Printer Control parameters in PCL Hi Art, I am trying to send fop generated PCL from web server to network printers. For each document, we know the print controls(like duplex etc.) Is there a way to embed these controls as part of the PCL stream so that duplex prints are automatically delivered as duplex without any other intervention. All our printers support duplex printing. Thanks -rajendran. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters in PCL
On -MM-ddT Brian T. Wolf wrote: We are working on that as well, though I don't have any good solutions yet either. If you run across something please let me know. Just as an FYI, I tried hardcoding a duplex print escape sequence into PCLRenderer.java and it printed both sides as expected. So I figure once we solve how to pass through the landscape code, this should be resolved as well. There is more to this than a FOP coding issue I believe however. The xsl:fo standard has nothing to do with how a particular printer should behave. So we also need to figure out how to get the information from the stylesheet to the renderer without damaging the integrity of the xsl. Regards, Brian - Original Message - From: Raj [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 7:45 AM Subject: Embedding Printer Control parameters in PCL Hi Art, I am trying to send fop generated PCL from web server to network printers. For each document, we know the print controls(like duplex etc.) Is there a way to embed these controls as part of the PCL stream so that duplex prints are automatically delivered as duplex without any other intervention. All our printers support duplex printing. Thanks -rajendran. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters in PCL
On -MM-ddT Brian T. Wolf wrote: We are working on that as well, though I don't have any good solutions yet either. If you run across something please let me know. Just as an FYI, I tried hardcoding a duplex print escape sequence into PCLRenderer.java and it printed both sides as expected. So I figure once we solve how to pass through the landscape code, this should be resolved as well. There is more to this than a FOP coding issue I believe however. The xsl:fo standard has nothing to do with how a particular printer should behave. So we also need to figure out how to get the information from the stylesheet to the renderer without damaging the integrity of the xsl. Regards, Brian - Original Message - From: Raj [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 7:45 AM Subject: Embedding Printer Control parameters in PCL Hi Art, I am trying to send fop generated PCL from web server to network printers. For each document, we know the print controls(like duplex etc.) Is there a way to embed these controls as part of the PCL stream so that duplex prints are automatically delivered as duplex without any other intervention. All our printers support duplex printing. Thanks -rajendran. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters in PCL
That's also going to be an issue for the PostScript renderer, when we want to apply individual PPDs (Files that contain control commands for individual printers) or controlling the PostScript Level to be used. What comes to my mind as an idea is a FOP extension where we can supply some configuration in form of a (sub-)element tree that gets converted internally into Avalon Configuration objects that can be used to configure a particular renderer. On the other side, this mechanism should only complement (not replace) the configuration possibilities from the system/user configuration supplied to FOP. I think it's also important that the extension can take configuration for several renderers simultaneously. On 12.10.2001 19:52:37 Brian T. Wolf wrote: We are working on that as well, though I don't have any good solutions yet either. If you run across something please let me know. Just as an FYI, I tried hardcoding a duplex print escape sequence into PCLRenderer.java and it printed both sides as expected. So I figure once we solve how to pass through the landscape code, this should be resolved as well. There is more to this than a FOP coding issue I believe however. The xsl:fo standard has nothing to do with how a particular printer should behave. So we also need to figure out how to get the information from the stylesheet to the renderer without damaging the integrity of the xsl. Regards, Brian - Original Message - From: Raj [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 7:45 AM Subject: Embedding Printer Control parameters in PCL Hi Art, I am trying to send fop generated PCL from web server to network printers. For each document, we know the print controls(like duplex etc.) Is there a way to embed these controls as part of the PCL stream so that duplex prints are automatically delivered as duplex without any other intervention. All our printers support duplex printing. Thanks -rajendran. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding Printer Control parameters in PCL
We are working on that as well, though I don't have any good solutions yet either. If you run across something please let me know. Just as an FYI, I tried hardcoding a duplex print escape sequence into PCLRenderer.java and it printed both sides as expected. So I figure once we solve how to pass through the landscape code, this should be resolved as well. There is more to this than a FOP coding issue I believe however. The xsl:fo standard has nothing to do with how a particular printer should behave. So we also need to figure out how to get the information from the stylesheet to the renderer without damaging the integrity of the xsl. Regards, Brian - Original Message - From: Raj [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 7:45 AM Subject: Embedding Printer Control parameters in PCL Hi Art, I am trying to send fop generated PCL from web server to network printers. For each document, we know the print controls(like duplex etc.) Is there a way to embed these controls as part of the PCL stream so that duplex prints are automatically delivered as duplex without any other intervention. All our printers support duplex printing. Thanks -rajendran. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]