You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by jt...@oreillyauto.com on 2001/09/06 17:38:28 UTC

producing OMR marks (Optical Mark Reading)

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: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: producing OMR marks (Optical Mark Reading)

Posted by Keiron Liddle <ke...@aftexsw.com>.
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
things.
http://marc.theaimsgroup.com/?l=fop-dev&m=99648766508793&w=2

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 jthaemlitz@oreillyauto.com 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: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org