Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 04-06-2014, 06:40 AM   #1
u238110
Connoisseur
u238110 began at the beginning.
 
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?
u238110 is offline   Reply With Quote
Old 04-06-2014, 08:59 AM   #2
Lagopus
Member
Lagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with others
 
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
Edit the value for "maxpage" so the script stops when you're out of pages. This will rename your images like this:
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.)
Lagopus is offline   Reply With Quote
Advert
Old 04-06-2014, 09:41 AM   #3
Lagopus
Member
Lagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with others
 
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
Lagopus is offline   Reply With Quote
Old 04-06-2014, 09:56 AM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
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 (
PeterT is offline   Reply With Quote
Old 04-13-2014, 02:52 AM   #5
u238110
Connoisseur
u238110 began at the beginning.
 
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?
u238110 is offline   Reply With Quote
Advert
Old 04-13-2014, 02:57 AM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
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.
HarryT is offline   Reply With Quote
Old 07-05-2014, 08:55 PM   #7
u238110
Connoisseur
u238110 began at the beginning.
 
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.
u238110 is offline   Reply With Quote
Old 07-06-2014, 02:23 AM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 07-14-2014, 03:25 PM   #9
Lagopus
Member
Lagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with others
 
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.
Lagopus is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 10:58 AM.


MobileRead.com is a privately owned, operated and funded community.