![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2008
Posts: 2
Rep Power: 0
![]() |
Convert list?!
Hi. Need some urgent help, beeing fairly new to programming. I have a list of files containing pdf files with a barcode. They are scanned invoices with a barcode label on the first page of every invoice (one invoice can consist of one or many pages). I can extract all pages to single pdf files, and i can scan each file for a barcode, i have come so far as a list like this:
1 1 0 0 1 0 1 1 1 0 1 Where 1 is Barcode found, and 0 is barcode not found, easy enough?! Well, i need to convert this list to somthing that will look like this: 1 2-4 5-6 7 8 9-10 11 Have been trying for a long time, and my eyes are about to pop out of their sockets, not beeing able to solve the problem. And it's probably easy too... for someone who have the knowledge. So please, please help me out here! Thanks. |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
Re: Convert list?!
not sure I understand what you want. What does the second list represent?
|
|
|
|
|
|
#3 |
|
Programmer
Join Date: Oct 2007
Posts: 41
Rep Power: 0
![]() |
Re: Convert list?!
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Jun 2008
Posts: 2
Rep Power: 0
![]() |
Re: Convert list?!
Sorry for the poor explenation.
What i am trying do accomplish is this: a user scans a batch of paper invoices, the output from the scanner is one PDF with x pages. An invoice can consist of one more pages, but the first page for every invoice has a barcode on it with an id. I want to create some kind of page separation, extracting the invoices by the barcodes. So far, i have managed to separate all the pages to files, scan for barcode and verify them, and i have the results in some stringlists, one list with the filenames, one list with barcode status, one list with the barcodes and so on. And in the barcode status string list, i have the numbers representing on/off if barcode is found. I will then take the first input file and do the actual separation. When i will extract the invoices from the first input file, i use PDFToolkit, and the code for extraction is: pdf1.extractpages('filename','1-2'); // Where 1-2 is page range. TStringList (barcode status) 1 1 1 0 0 1 0 1 1 -> TStringList (PAGES TO EXTRACT) 1 2 3-5 6-7 8 9 Better understanding? ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| linked list problems | bl00dninja | C++ | 6 | Feb 17th, 2008 10:30 AM |
| singly-linked list templaste class in C++ w/ example driver | bl00dninja | Show Off Your Open Source Projects | 0 | Sep 11th, 2006 1:05 AM |
| Singly Linked List Help | Firebar | Java | 3 | May 22nd, 2005 10:56 AM |
| User-defined creatNode and deleteNode functions for a doubly-linked list | jgs | C | 2 | Apr 28th, 2005 8:53 AM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |