04-06-2014, 06:40 AM | #1 |
Connoisseur
Posts: 91
Karma: 10
Join Date: Feb 2014
Location: Long Island, NY
Device: Aura, N514KUBKKEP, 4.7.10.413
|
Page feeder does single-sided scans only. How to integrate pages...
...It asks me for a file name when the operation is complete, and it adds a number to each file name, in sequential order. So if I choose a for the file name and I've scanned 50 pages, it will be like this: a1.jpg, a2.jpg...
And then I'll flip the stack of pages over to do the other side and I can name them b. So I'll have 50 images with a base name of a and 50 images with a base name of b and I'll need to automatically have all the corresponding pages paired with each other, which will result in a digital copy of the book that's in order. So how can I do this? Perhaps there's a function in ABBYY FineReader for this? |
04-06-2014, 08:59 AM | #2 |
Member
Posts: 21
Karma: 2864
Join Date: Feb 2014
Location: Norway
Device: kindle gen3
|
If I understand you correctly, this .bat file should do the trick:
Code:
echo off SET /a i=1 SET /a p=1 SET /a maxpage=10 :loop IF %i%==%maxpage% GOTO END rename a%i%.jpg page%p%.jpg SET /a p=%p%+1 rename b%i%.jpg page%p%.jpg SET /a i=%i%+1 SET /a p=%p%+1 GOTO LOOP :end rename a1.jpg page1.jpg rename b1.jpg page2.jpg rename a2.jpg page3.jpg rename b2.jpg page4.jpg rename a3.jpg page5.jpg rename b3.jpg page6.jpg ... and so on. (No guarantes. Run it on a test folder first.) |
Advert | |
|
04-06-2014, 09:41 AM | #3 |
Member
Posts: 21
Karma: 2864
Join Date: Feb 2014
Location: Norway
Device: kindle gen3
|
This will give a better result - it will give you filenames like page001, page010, page110 that sorts much better:
Code:
echo off SET /a i=1 SET /a p=1 set /a maxpage=15 :loop IF %i%==%maxpage% GOTO END IF %p% LSS 10 ( rename a%i%.jpg page00%p%.jpg ) ELSE ( IF %p% LSS 100 ( rename a%i%.jpg page0%p%.jpg ) ELSE ( rename a%i%.jpg page%p%.jpg ) ) SET /a p=%p%+1 IF %p% LSS 10 ( rename b%i%.jpg page00%p%.jpg ) ELSE ( IF %p% LSS 100 ( rename b%i%.jpg page0%p%.jpg ) ELSE ( rename b%i%.jpg page%p%.jpg ) ) SET /a i=%i%+1 SET /a p=%p%+1 GOTO LOOP :end |
04-06-2014, 09:56 AM | #4 |
Grand Sorcerer
Posts: 12,117
Karma: 73448614
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Rather than using maxpage why not
Code:
:loop IF NOT EXIST a%i%.jpg GOTO END ... ... SET /a p=%p%+1 IF NOT EXIST b%i%.jpg GOTO END IF %p% LSS 10 ( |
04-13-2014, 02:52 AM | #5 |
Connoisseur
Posts: 91
Karma: 10
Join Date: Feb 2014
Location: Long Island, NY
Device: Aura, N514KUBKKEP, 4.7.10.413
|
What exactly do I use to implement these codes?
|
Advert | |
|
04-13-2014, 02:57 AM | #6 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Type them into a batch file and run it from a command prompt.
|
07-05-2014, 08:55 PM | #7 |
Connoisseur
Posts: 91
Karma: 10
Join Date: Feb 2014
Location: Long Island, NY
Device: Aura, N514KUBKKEP, 4.7.10.413
|
So, there's another issue. I didn't realize that when doing the even numbered pages that they'd be "end to start." In other words, the odd numbered pages are beginning of the book to end, but then I flipped the stack of pages over to do the even pages and so the first scan is the last page of the book and the last scan is the first page of the book. So I need to reverse the order of the even numbered batch of pages before doing the interspersing process.
Last edited by u238110; 07-05-2014 at 09:11 PM. |
07-06-2014, 02:23 AM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
That is the reason why I don't scan direct to jpg, but to jpg encapsulated in pdf. Then I can solve it with one command with PDF Toolkit:
pdftk A=odd.pdf B=even.pdf shuffle A Bend-1 output book.pdf Input the pdf in ABBYY and you are good to go. |
07-14-2014, 03:25 PM | #9 |
Member
Posts: 21
Karma: 2864
Join Date: Feb 2014
Location: Norway
Device: kindle gen3
|
Split the bat file into two different loops. One counts up and renames the even numbered pages, the other counts down and renames the odd numbered pages.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Print page range in viewer outputs single empty page | larzeb | Library Management | 2 | 04-30-2013 05:24 AM |
Printing a Single Page? | foxglove | Calibre | 0 | 11-16-2011 06:24 PM |
Double sided PDF (duplex) to single sided only? | martienne | Workshop | 11 | 10-28-2010 01:18 PM |
Turning Scanned PDFs with facing pages into single pages | jimteacher | Workshop | 5 | 11-09-2009 02:59 PM |
Single page "Invalid Page!" error Sony-505 | 2percentright | Calibre | 5 | 07-29-2009 11:22 AM |