- HP Support Forum Home
- >
- Printers & All-In-Ones
- >
- Scanning / Faxing
- >
- Re: How to scan front and back and organize the scans for PD...
HP Support Forums
Join in the conversation.
- Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to scan front and back and organize the scans for PDF generation .
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
06-19-2009 03:16 AM - edited 06-19-2009 03:18 AM
I just recently purchased a HP-6500 All-In-One. I cannot find in the software an option to select front and back for the simplex/ADF scanner. I HP-Digital, Version 12.0 software, however it does not offer the ability scan all the front pages, then all the back pages, and organize them in proper front-to-back sequence. I have written the PERL script below that will do just that, and guide you to the next step to create a searchable PDF file from the software distributed with the printer.
- The first thing you need is PERL installed on your computer. http://www.perl.com/download.csp I used activestate for windows. Just take the defaults when installing. PERL is a powerful scripting language, independant of the platform, though it does support some platform dependencies.
- Place the following script somewhere on your system where you can find it later. Save as eduplex.pl
#!/bin/perl
#eduplex.pl dadof4 2009Jun16
if ( $#ARGV == 0 ) {$ext=$ARGV[0];} else {die "\nduplex.pl extension\n";}
opendir(IN,"./") || die "$!";
while($name=readdir(IN)) {
if ($name =~ /(.$ext)$/) {
$name="$name"; chomp $name;
push @flist,"$name";
}
}
closedir(IN);
$max=$#flist;
$bk=($max+1) / 2;
print "\n";
$front=10000;
$back=10001;
for ($a=0; $a<$bk; $a++) {
print "renaming $flist[$a] duplex$front.$ext\n";
print "renaming $flist[$max - $a ] duplex$back.$ext\n";
rename("$flist[$a]","duplex$front.$ext");
rename("$flist[$max - $a ]", "duplex$back.$ext");
$front += 2;
$back += 2;
}
print "\nNow launch \"C:\\Program Files\\HP\\Digital Imaging\\DocProc\\dpe_ocr.exe\"\n";
print "to import jpg's and select format Adobe Acrobat-PDF image-text for output.\n"; - Starting with Odd page up; top in first, keeping them in order as they pass through and out of the scanner.
- Next, turn the stack over, and scan the back of the stack, top in first, until all pages are scanned.
- So what you have now is a simplex scan session with the sequenced scans containing all the Odd pages for the first half, and all the Even pages the last half of sequence numbers.
- Now go to a command prompt, and the folder where all your scanned images are located.
- Type in the duplex.pl command script, using the extension of the new created; sequenced scans created. I use JPG for mine.
- So from the Windows command prompt, go to the folder containing your scanned images. Mine were in C:\scan_work>
- What this will do is start renaming all the files from Scan_Doc_99999.jpg to duplex99999.jpg where the ends of the list are rename to a new sequence terminating to the last two Scan_Doc's in the middle of the list.
- Now using the OCR application distributed with the printer. Run the following program.
"C:\Program Files\HP\Digital Imaging\DocProc\dpe_ocr.exe"
- It might warn you this is used for debugging, just ignore. The program is initutive, so you will simply import/open your newly sequenced files, and create a Searchable PDF-Image-text document. Note: When marking the files for the OPEN, mark the last in the list first, then using the SHIFT key, mark the first file in the list last. It will naturally order the list for you. )
- That's pretty much it. Enjoy :-).
HP should support something similar in their software suite, whether it's duplex printing or not, for the benefit of duplex scanning emulation whether the hardware support duplex scanning or not.
Re: How to scan front and back and organize the scans for PDF generation .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
10-24-2009 01:09 PM
Thank you for this script. Here is a wish for an improved version:
After scanning all odd pages (1,3,5, ... 25) I wish I could just turn the stack over and go on scanning the even pages as they are ordered now (24, 22, 20, ... 2)
Unfortunately the script expects the even pages ordered the other way around (2,4,6... 24). This means that I have to turn around all 25 pages which takes a lot of time.
I would be very grateful if you changed the script to make this work unnecessary.
Cheers
Karsten
Re: How to scan front and back and organize the scans for PDF generation .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
10-24-2009 07:46 PM
Interesting. You should not have to re-shuffle anything. After scanning the odd pages, the even pages should be ready to scan as-is, hence at the end, the pages are back into their original order.
As odd pages exit the ADF, you should have to do nothing more than flipping them face down, stacking them as more pages are scanned. Then when you are ready for the even pages, they should be in reverse scan sequence. Simply rescanning and flipping them over face down again as they exit the ADF, should put the pages back into their orginal order.
Re: How to scan front and back and organize the scans for PDF generation .
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
10-25-2009 01:10 AM - edited 10-25-2009 01:13 AM
Since I am not a native speaker (I am from Germany) I am not sure if I understood everything correctly. Could you clarify for me how the pages are ordered with your scanner, after scanning the odd pages? With my scanner (HP Officejet Pro 8jet Pro 8500 A909a) the pages are ordered as before (just the stack in itself is flipped).
In case this is the expected behaviour: Should the scanner now scan the even pages beginning with the lowest or highest even page number?
In case it should start with the highest even page number (e.g. 24) everything should be fine. But if I have to start with the lowest number ( e.g. 2) it would mean that I have to flip every page by hand first.
What is the expected sequence of files/pages as input for your script; lets say for a document with 4 pages:
Is it 1-3-2-4 or 1-3-4-2?
My impression is that your script expects the sequence 1-3-2-4, but the sequence of my files is 1-3-4-2.
Re: How to scan front and back and organize the scans for PDF generation .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
10-25-2009 06:58 AM
Correct.
After you scan all the odd pages, 1 through the highest odd page... When the stack is flipped over, the highest even-page should be first, scanning from highest to lowest even page. There should be no reshuffling of pages for the perl script.
Hope this helps.
Re: How to scan front and back and organize the scans for PDF generation .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
08-02-2011 01:23 PM
You can also use Pdfsam (www.pdfsam.org), basic version is open source - free to use.
Merge pdf documents with pdfsam(or Split), it's free and open source.
Start Pdfsam - use the standard Plugin "Alternate mix" to merge the 2 scans (first select the odd pages-scanned PDF and second the even pages-scanned PDF). Select "Destination output file" and the "Run" to merge to one complete "duplex" scanned PDF.
Re: How to scan front and back and organize the scans for PDF generation .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
02-12-2013 06:30 PM
Thanks so much for the great tip! Just what I was looking for.
