title: ghostscript with a zoom option for tesseract
body: <p>I am using ghostscript and tesseract to extract text data from scanned PDFs. But the scan result for some part of the pdf is not accurate. For testing purpose, I am taking screenshot of pdf and passing it to tesseract. Below is the scenarios and the problem I'm facing.</p>
  
  <p><strong>Scenario 1:</strong></p>
  
  <p>Link to Screenshot: <a href="https://dl.dropbox.com/u/9409594/scenario_1.tif" rel="nofollow">https://dl.dropbox.com/u/9409594/scenario_1.tif</a></p>
  
  <p>Once I pass this image (screenshot from a 125% zoomed pdf) to tesseract, below is the result text I'm getting:</p>
  
  <p>ART\CLE STANDARD 
  NUMBER PFUCE </p>
  
  <p><strong>Scenario 2:</strong></p>
  
  <p>Link to screenshot: <a href="https://dl.dropbox.com/u/9409594/scenario_2.tif" rel="nofollow">https://dl.dropbox.com/u/9409594/scenario_2.tif</a></p>
  
  <p>If I pass the above screenshot (300% zoom) to tesseract, result is good.</p>
  
  <p>ARTICLE NUMBER </p>
  
  <p>Below are the arguments I'm using with ghostscript and tesseract:</p>
  
  <p><strong>Ghostscript:</strong>
  gswin64.exe -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tifflzw -r600 -sOutputFile="C:\test\output.tiff" "C:\test\input.pdf"</p>
  
  <p><strong>Tesseract:</strong>
  tesseract.exe "c:\test\output.tif" "c:\test\output.html" -l eng -psm 6 hocr</p>
  
  <p>From my testing, I feel that if a zoomed version of image is passed to tesseract, result is good. Can I zoom the image using ghostscript before converting it into image? Or is there a better way to do this?</p>
  
  <p>Appreciate your time and help!</p>