양면 문서 더미를 스캔하기 위한 유틸리티

양면 문서 더미를 스캔하기 위한 유틸리티

저는 문서 공급 장치가 있는 단면 스캐너를 가지고 있으며 양면 메모를 스캔하는 가장 좋은 방법을 찾고 있습니다. 동일한 스택을 두 번 스캔하고 한 번 뒤집은 다음 유틸리티가 스캔된 이미지를 자동으로 인터리브하도록 하는 것이 유용할 것입니다. 다중 페이지 PDF 내보내기도 좋을 것입니다. 이를 수행하는 도구가 있습니까?

그렇지 않으면 ADF를 사용할 수 있다면 이미지스캐너 모듈을 사용하여 Python으로 작성하는 것을 고려하고 있습니다.http://pypi.python.org/pypi/imagescanner/0.9

감사해요

답변1

오래된 질문이지만 여전히 관련성이 있습니다.

사용"간단한 스캔". "페이지 재정렬" 기능이 있습니다. 이 힌트를 찾았어요여기.

답변2

스캔된 페이지 순서대로 문서를 PDF로 스캔합니다. 즉, 먼저 홀수 페이지를 모두 스캔한 다음 짝수 페이지를 모두 스캔합니다. 그런 다음 다음을 사용하여 수정하세요.

pdftk raw.pdf cat odd even output ordered.pdf

또한보십시오책의 짝수 페이지와 홀수 페이지가 포함된 두 개의 PDF 파일을 병합합니다..

답변3

자동 문서 공급기(ADF)가 있는 스캐너에서 다음을 수행합니다.

  1. 홀수 페이지를 처음부터 끝까지 스캔하고 첫 번째 PDF 파일로 저장
  2. 페이지 묶음을 뒤집고 짝수 페이지를 마지막부터 두 번째까지 스캔하여 두 번째 PDF 파일로 저장
  3. PDFSharp 라이브러리를 사용하는 작은 PowerShell 스크립트로 두 파일을 병합합니다(바이너리는 PowerShell 스크립트와 나란히 복사해야 함).

여기 내 스크립트가 있습니다. 약간 거칠지만 제게는 효과가 있습니다. 도움이 되길 바랍니다.

# 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 {
}

답변4

낮은 기술 솔루션. ADF 증분을 +2로 설정하여 한 번 스캔하면 홀수 페이지를 얻을 수 있습니다. 스택을 뒤집어 시작 번호를 마지막 홀수 페이지 번호 +1로 설정하고 증분을 -2로 설정하여 짝수 페이지를 역순으로 가져옵니다.

관련 정보