3

I have a simplex scanner with document feeder, and am looking for the best way to scan double-sided notes. It would be useful to be able to scan the same stack twice, once flipped, and have a utility automatically interleave the scanned images. Multi-page PDF export would also be nice. Is there a tool to do this?

Otherwise, I'm considering writing it in Python, with the imagescanner module, if it can use the ADF -- http://pypi.python.org/pypi/imagescanner/0.9

Thanks

4 Answers4

2

Old question, still relevant:

Use "simple scan". It has a "reorder pages" function. I found this hint here.

Will
  • 121
  • 5
0

Scan the document as a PDF with the pages ordered as they were scanned, i.e. first all odd pages, then all even ones. Then fix it with:

pdftk raw.pdf cat odd even output ordered.pdf

See also Merge two PDF files containing even and odd pages of a book.

Nova
  • 780
0

I do the following on my scanner with automatic document feeder (ADF):

  1. Scan odd pages from 1st to last, store as first pdf file
  2. Flip the stack of pages and scan even pages from last to 2nd, store as second pdf file
  3. Merge both files with a little PowerShell script that uses the PDFSharp library (the binaries need to be copied side-by-side with the PowerShell script)

Here's my script - a little rough - but work's for me. I hope it can help.

# Not entirely my code, this is based on Mike Pfeiffer - http://mikepfeiffer.net/2010/03/how-to-merge-pdf-files-using-powershell-and-pdfsharp/
# Requires PDFSharp assembly libraries http://sourceforge.net/projects/pdfsharp/
# You need to load the assembly before you can use the function            
#
# Usage:
# Merge-PDF -firstPdfPath 1.pdf -secondPdfPath 2.pdf -targetPdfPath merged.pdf
[CmdletBinding()]
param 
(
    $firstPdfPath,
    $secondPdfPath,
    $targetPdfPath
)
begin {
    $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
    Add-Type -Path .\PdfSharp.dll
}

process { $output = New-Object PdfSharp.Pdf.PdfDocument
$PdfReader = [PdfSharp.Pdf.IO.PdfReader]
$PdfDocumentOpenMode = [PdfSharp.Pdf.IO.PdfDocumentOpenMode]

$firstPdfPath = Join-Path $PSScriptRoot $firstPdfPath
$secondPdfPath = Join-Path $PSScriptRoot $secondPdfPath
$targetPdfPath = Join-Path $PSScriptRoot $targetPdfPath

$firstPdf = New-Object PdfSharp.Pdf.PdfDocument            
$firstPdf = $PdfReader::Open($firstPdfPath, $PdfDocumentOpenMode::Import)  

$secondPdf = New-Object PdfSharp.Pdf.PdfDocument            
$secondPdf = $PdfReader::Open($secondPdfPath, $PdfDocumentOpenMode::Import)    
$secondIndex = $secondPdf.Pages.Count-1

foreach($page in $firstPdf.Pages) {
    $output.AddPage($page)
    if ($secondIndex -ge 0) {
        $output.AddPage($secondPdf.Pages[$secondIndex--])
    }
}

$output.Save($targetPdfPath)            

}

end { }

Bernd
  • 101
-1

A low-tech solution. Scan once with the ADF increment set to +2 so you get the odd pages. Flip the stack, set the starting number to the last odd page number +1 and the increment to -2 to get the even pages in reverse order.

W_Whalley
  • 3,522
  • 1
  • 21
  • 18