For the last page I'm planning on putting in a block with a id attribute
then use the page-number-citation with ref-id attribute.

put a block like this on last page (I have a summary record that goes on
the end of the document so I'll tack it on there)
<fo:block id="endofdoc"/>

Then for the page number on top of the page I could put
<fo:page-number/> of <fo:page-number-citation ref-id="endofdoc"/>  (1 of 3)

I'm guessing I could try to traverse the tree and try to find id "endofdoc"
and compare that page number with the current page number.  Will that
element exist in the tree if I have 3 pages and I'm on page 1?  I know the
"endofdoc" tag is not the cleanest way, any thoughts?

I agree the sax events are not the right way.  It worked for proof of
concept, but the extension tag is needed.  I took at look at your counter
example, thats a lot better starting place than reverse engineering Table
right off the bat.



                    APACHE.ORG                                                 To:     
[EMAIL PROTECTED]                                  
                    09/07/01 05:07 AM                                          
Subject:     Re: producing OMR marks (Optical Mark Reading)     
                    Please respond to fop-dev                                          

Hi John,

I think that for this type of thing using sax events is at the wrong end of
the processing. For your situation it still may be a complementary part of
the process to insert the necessary information.

A while back I posted a simple example of how you can include custom tags
in a separate namespace in order to create things on the output or do other

If you want to contribute to this approach you can look at the example
(attached to the message). I'm sure others will also want to know how to do
this sort of thing, ie. probably needs better code and documentation.
Currently can can add any sort of area to the passed in area, for example
you could make svg and/or tables.

This approach could be improved to include a better way to handle putting
"things" in the area tree, such as how the bookmark extension works.

The only problem I think you may have is the last page, unless you know
exactly how many pages are in your documents.

On Thu, 06 Sep 2001 17:38:28 [EMAIL PROTECTED] wrote:
> I'm writing a DB reporting class that extends org.apache.fop.apps.Driver
> and fires SAX events to the Drivers ContentHandler (FOTreeBuilder).
> I have a method that produces the correct OMR mark with SAX events when
> the
> page number is passed in as a parameter.  The problem with this is that I
> need the current page number passed into this method as the page is
> processed?  (callbacks?)
> What I need is a tag that performs a lot like <page-number>.  The OMR
> mark
> is just the page number in binary (well 85% of it is).  The last page has
> an extra mark to say it's the last page, etc.  I need some help getting
> stared on creating this tag.  It requires access to the page number and
> has
> to know when it gets to the last page.  The mark is a 1 cell by 10 row
> table (picture a real simple verticle barcode) so I need help with using
> the Table Area too.
> Thanks,
> JohnPT
> More info:
> I'm generating PDF's ( you probably guessed that one :)
> OMR is just a vertical table with one column and 10 rows.  The table is
> placed 1/4 inch from either edge of the page.  Mininum mark sizes are
> 0.01
> inch high and 0.1 inch long.
> The first cell is the GRV (Gate Read Verify, ie:it's always marked).  The
> second cell is not used.  The third cell is marked when the last page is
> reached.  The remaining cells count the page number in binary.
> These marks are used when printing in bulk to keep documents grouped.
> They
> can also be used to print the first page with perforated paper and the
> rest
> on plain paper, tell the operator a page is missing, etc.  Picture
> keeping
> a run of 70,000 1-5 page reports organized.

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

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

Reply via email to