Make sure you are working on the latest FOP Trunk (downloaded from the
SVN repository), then create a patch file using your favourite SVN
client. Or with the command-line client:
svn up
svn diff > /path/to/patchfile.patch

Then follow the procedure here:
http://xmlgraphics.apache.org/fop/dev/index.html#patches

Conventions can be found here:
http://xmlgraphics.apache.org/fop/dev/conventions.html
(The most important part is to use spaces instead of tabs, otherwise
just try to mimic the existing code. We don't mind fixing minor
differences while reviewing the patch.)

BTW, the HP PCL reference lists the following valid values for the ESC&l#S
command:
0 - Simplex
1 - Duplex, Long-Edge Binding
2 - Duplex, Short-Edge Binding
So that contrasts a little with your javadoc.

It would be great if you could also add some documentation for the
website. Otherwise, the new feature won't be much use for others. The
file that would need to be changed is the following:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml?view=log


Good luck!

On 02.06.2008 12:30:52 Martin Edge wrote:
> OK,
> 
> So far in PCLGenerator.java in src\java\org\apache\fop\render\pcl\ under line 
> 230 I have added:
> 
> /**
> * Selects the duplexing type for the page. The parameter is usually 
> printer-specific. 
> * "1" means duplex 
> * "0" means simplex
> * @param selector the integer representing the duplexing status of the page
> * @throws IOException In case of an I/O error
> */
> public void selectDuplexType(int selector) throws IOException {
>       writeCommand("&l" + selector + "S");
> }
> 
> And in PCLRenderer.java in src\java\org\apache\fop\render\pcl\ under line 408 
> I have added:
> 
> // Is Page duplex?
> String pageDuplex = page.getForeignAttributeValue( new 
> QName(PCLElementMapping.NAMESPACE, null, "page-is-duplex"));
> if (pageDuplex != null) {
>       gen.selectDuplexType(Integer.parseInt(pageDuplex));
> }
> 
> Will give it a test and see how we go - I'm not familiar with the procedures 
> and/or naming conventions with modifying Apache code.. what should I do? :)
> 
> Thanks
> Martin.
> 
> 
> 
> -----Original Message-----
> From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
> Sent: Monday, 2 June 2008 7:35 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: best format for high speed printing
> 
> That page sequence itself doesn't have an effect on the PCL file (as it
> doesn't have a concept of page groups). The tray selection extension
> really just inserts the right PCL command at the beginning of each page
> that the extension was specified for. If you omit the extension on one
> page, no command will be inserted.
> 
> On 02.06.2008 11:19:05 Martin Edge wrote:
> > Yeah - doing that now.. Sorry I meant to ask -
> > 
> > What if the combination of Letterhead v Plain Paper tray changes per page 
> > sequence ? (example below)
> > 
> > <areaTree>
> >   <pageSequence> 
> >     <pageViewport bounds="0 0 595275 841889" key="P1" nr="1" 
> > formatted-nr="1" simple-page-master-name="basicPage">
> >       <page> <--- Tray 2
> >       </page>
> >     </pageViewport>
> >     <pageViewport bounds="0 0 595275 841889" key="P2" nr="2" 
> > formatted-nr="2" simple-page-master-name="basicPage">
> >       <page> <--- Tray 1
> >       </page>
> >     </pageViewport>
> >     <pageViewport bounds="0 0 595275 841889" key="P3" nr="3" 
> > formatted-nr="3" simple-page-master-name="basicPage">
> >       <page> <--- Tray 1
> >       </page>
> >     </pageViewport>
> >     <pageViewport bounds="0 0 595275 841889" key="P4" nr="4" 
> > formatted-nr="4" simple-page-master-name="basicPage">
> >       <page> <--- Tray 1
> >       </page>
> >     </pageViewport>
> >   </pageSequence>
> >   <pageSequence>
> >     <pageViewport bounds="0 0 595275 841889" key="P5" nr="5" 
> > formatted-nr="5" simple-page-master-name="basicPage">
> >       <page> <--- Tray 1
> >       </page>
> >     </pageViewport>
> >     <pageViewport bounds="0 0 595275 841889" key="P6" nr="6" 
> > formatted-nr="6" simple-page-master-name="basicPage">
> >       <page> <--- Tray 1
> >       </page>
> >     </pageViewport>
> >     <pageViewport bounds="0 0 595275 841889" key="P7" nr="7" 
> > formatted-nr="7" simple-page-master-name="basicPage">
> >       <page> <--- Tray 2
> >       </page>
> >     </pageViewport>
> >     <pageViewport bounds="0 0 595275 841889" key="P8" nr="8" 
> > formatted-nr="8" simple-page-master-name="basicPage">
> >       <page> <--- Tray 2
> >       </page>
> >     </pageViewport>
> >   </pageSequence>
> > </areaTree>
> > 
> > (obviously duplexing I will have to test.. am downloading the FOP source 
> > now.. (not that I'm a java programmer ;))
> > 
> > I really do appreciate your help by the way - in the last few days I have 
> > made heaps of progress thanks to your combined efforts - 
> > 
> > Thanks again,
> > Martin.
> > 
> > 
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, 2 June 2008 7:10 PM
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: best format for high speed printing
> > 
> > The tray selection extension just results in a command in PCL. If that
> > works with changing duplexing, I don't know. You'll have to do some
> > experiments.
> > 
> > On 02.06.2008 11:02:15 Martin Edge wrote:
> > > Would these extensions work if the duplexing can vary per PageSequence?
> > > 
> > > Or should I see what is put in the intermediate format to define this and 
> > > override it in there?
> > > 
> > > -----Original Message-----
> > > From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
> > > Sent: Monday, 2 June 2008 6:45 PM
> > > To: fop-users@xmlgraphics.apache.org
> > > Subject: Re: best format for high speed printing
> > > 
> > > Tray selection is available: 
> > > http://xmlgraphics.apache.org/fop/0.95/output.html#pcl-extensions
> > > 
> > > A Simplex/Duplex selection (ESC&l#S) extension hasn't been implemented,
> > > yet, but should be easy to add if you take tray selection as a template.
> > > 
> > > On 02.06.2008 10:16:38 Martin Edge wrote:
> > > > Cool - I have converted to the intermediate format, and then happily 
> > > > got it to translate that to PCL..
> > > > 
> > > > Is there any additional functionality in the Intermediate format ?
> > > > 
> > > > For instance, can I set tray selection and duplex selection per 
> > > > PageSequence?
> > > > 
> > > > (Otherwise I will just generate one PCL, split it and add each flag per 
> > > > PCL)
> > > > 
> > > > Thanks
> > > > Martin.
> > > > 
> > > > -----Original Message-----
> > > > From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
> > > > Sent: Monday, 2 June 2008 4:44 PM
> > > > To: fop-users@xmlgraphics.apache.org
> > > > Subject: Re: best format for high speed printing
> > > > 
> > > > PCL is not very easy to post-process. It's possible but probably 
> > > > tedious.
> > > > 
> > > > I'd use FOP's intermediate format [1] to add your barcodes and then
> > > > normally render the processed intermediate format using the PS or PCL
> > > > renderers.
> > > > 
> > > > [1] http://xmlgraphics.apache.org/fop/0.95/intermediate.html
> > > > 
> > > > On 01.06.2008 14:41:33 Martin Edge wrote:
> > > > > OK - A further bit of research suggests - the reason I'm going to PDF
> > > > > first, is I have to rewrite some barcode information which dictates 
> > > > > the
> > > > > page numbering for an intelligent envelope inserter
> > > > > 
> > > > > Can you edit text easily in a PCL page? I'm using .NET
> > > > > 
> > > > <snip/> 
> > > > 
> > > 


Jeremias Maerki


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

Reply via email to