cancel
Showing results for 
Search instead for 
Did you mean: 

Need a suggestion about how to implement unusual behaviour

ale_carraro
Champ in-the-making
Champ in-the-making
I have an uncommon requirement.
Alfresco here is used as a simple repository getting (image) documents from a scanner.

So far, I've used the great http://code.google.com/p/zxing/ project to read a barcode written inside those documents, so I can use the barcode number to assign a property to the document (and other properties associated by that number) - it works like a charm (btw, if someone wants snippets to do this, simply ask me)

Now 2 new requirements:
1)if the scanned images are put in a multi-page-capable format (pdf or tiff), my boss want those pages to be merged in a single document. Any hint about this?

2)since we have no control over those documents, we can not choose to apply the barcode on each sheet of paper. So if I had resolved requirement 1, I still have the problem of merging all documents coming from the scanner since after the first sheet I have barcodes anymore. My boss suggested that the merge should occur when we find a document with a new barcode, meaning that the previous one had finishd. I don't like this solution (works only if there is a single user i.e. a single scanner, and is weak since a failure in reading the barcode would not throw an error but simply append the new document to the previous..) but my boss can live with that.
Do you have any suggestion/ideas? I don't need the work done, but I wonder if there is a better solution, or how to implement it at best
(for example, where do you think is the best place to 'record' the current barcode, would you do a SingletonService using Spring or store a type=base property on the sotre?)


thanks to everyone

Alex
4 REPLIES 4

alisaslwe
Champ in-the-making
Champ in-the-making
Sorry for this late reply. I was trying the barcode reader you mentioned. But it can not work. So I download another free trial barcode reader project to read the barcode image. It is successful. But it needs to be paid. I want some free ones.

cindy313
Champ in-the-making
Champ in-the-making
er.. how about this one <a href="http://www.keepautomation.com/products/net_barcode_reader/">barcode reader</a>, i heart it's free.

lucy
Champ in-the-making
Champ in-the-making
how long does the <a href="http://www.keepautomation.com/products/net_barcode_reader/barcode_interleaved25.html">barcode reader project free trail</a> supports?

mrogers
Star Contributor
Star Contributor
To manipulate PDF files have a look at PDF box.   Its what alfresco uses itself to extract meta-data but you can use it to manipulate PDF documents.   I had a quick look and there's a likely looking "addPage" method.   And a "Splitter" class that can go in the other direction.

My thoughts are that you are over-using the "barcode".   Yes its part of your solution but there's a bit of an issue with using it to group several pages together.   For example there is also an issue of page ordering.  Can you get any information from your scanner to batch together pages?  Can you upload the pages into a folder and then run an action to merge them together?    That could work automatically if you can have a simple upload stream but I suspect you will eventually want some sort of review process to check for missing and duplicated pages.