ข้ามไปยังเนื้อหา

ทำ OCR ให้ PDF

เพิ่มชั้นข้อความที่ค้นหาได้ให้เอกสารที่สแกนมา

ประมวลผลบนเครื่องของคุณ

เครื่องมือนี้ทำงานในเบราว์เซอร์ของคุณทั้งหมด ไฟล์ของคุณไม่ถูกอัปโหลดเลย และคุณตรวจสอบได้เองในแท็บเครือข่ายของเบราว์เซอร์ ตรวจสอบด้วยตัวเอง เปิดแท็บเครือข่ายของเบราว์เซอร์แล้วดู คุณจะเห็นคำขอเล็ก ๆ หนึ่งรายการที่ถามว่าคุณยังมีโควตางานเหลืออยู่หรือไม่ ซึ่งมีแค่ชื่อเครื่องมือกับค่าแฮช ไม่ใช่ตัวไฟล์

เครื่องมือนี้ทำอะไร

A scanned PDF is a picture of a document, so searching it finds nothing and selecting a word selects nothing. This renders each page, recognises the words on it, and draws them back over the image invisibly, so the page looks as it did and the words are suddenly there. Recognised pages are rebuilt from that rendering: they come out grayscale at the resolution you chose, and any links, form fields or annotations they carried do not survive. Pages that already have real text are left alone, byte for byte.

Reach for it whenever a document arrived as pictures rather than words: a contract someone scanned and emailed, a receipt photographed on a phone, a fifty-page report from an office machine, or an old paper you need to quote from without retyping it.

วิธีทำงาน

  1. Drop the scan onto this page. PDFs work, and so do JPEG, PNG, WebP and TIFF images - an image becomes a one-page PDF first.
  2. Choose the language. English and Indonesian are installed, and the combined mode recognises both at once in a document that mixes them.
  3. Leave the mode on only pages without text unless you know for certain that every page is a scan.
  4. Set the resolution if you need to. 300 dpi suits ordinary print; go towards 400 for very small type, or down towards 150 for a long document on a slow machine.
  5. Choose whether you want the searchable PDF, a plain text file, or both, then press Run OCR.

Recognition costs something on the pages it touches, and it is better to know before than after. Each recognised page is rendered to a grayscale image at your chosen resolution, and the new page is that image with the invisible words drawn over it. Colour on those pages is gone, and their links, form fields and annotations are not carried across. Skipped pages are copied untouched. The file usually grows, sometimes a lot, because a 300 dpi page image is bigger than the compressed scan it replaced - Compress PDF is the normal second step.

The words have to land in the right place or a text layer is worse than none. The recogniser returns each word's box in the pixels of the rendered image, counting down from the top, while a PDF page counts up from the bottom, so every box is scaled by the render ratio and flipped. Words scored below 40 out of 100 are left out entirely: a confidently wrong word sends search to the wrong page, while a gap only sends it nowhere.

Nothing is uploaded, and that includes the recogniser itself. tesseract.js fetches its WebAssembly core and its language data from a third-party CDN unless told otherwise, which would have meant your scan quietly announcing itself to a third party the first time anyone here ran OCR, so all of it is served from this site instead. The cost is a one-off download. The benefit is that recognition involves nobody else at all, which you are welcome to check in the network tab.

Resolution decides both how accurate the reading is and how long you wait for it. Below about 200 dpi, thin serifs and small print break up and accuracy falls away quickly. Above 300 the gains get small while render time and output size keep climbing. 300 is the default because that is roughly where the curve flattens for ordinary body text.

สิ่งที่เครื่องมือนี้ทำไม่ได้

  • Handwriting is not recognised. The engine is trained on printed type, and a handwritten page comes back as scattered nonsense rather than words.
  • Only English and Indonesian models are installed, so a document in another language cannot be read properly here.
  • Recognised pages are rebuilt as grayscale images, so colour is lost on them and their links, form fields and annotations do not survive.
  • The output is a machine's reading, not a proofread transcript. Faint scans, unusual typefaces, tables and tight columns all produce mistakes.

คำถามที่คนมักถาม

การรู้จำแม่นแค่ไหน
กับไฟล์สแกนสะอาดที่ 300 dpi ของข้อความที่พิมพ์มา หนึ่งหน้ามักกลับมาพร้อมข้อผิดพลาดเพียงไม่กี่จุด และผลลัพธ์จะรายงานคะแนนความมั่นใจเฉลี่ยให้คุณเห็นว่าเอนจินตัดสินงานของตัวเองอย่างไร สำเนาถ่ายเอกสารที่จาง หน้าที่เอียง คอลัมน์ที่ชิดกัน และตัวอักษรประดิษฐ์ ล้วนดึงคะแนนนั้นลง คำที่ได้คะแนนต่ำกว่า 40 จาก 100 จะถูกตัดทิ้งแทนที่จะเดา
มันอ่านภาษาอะไรได้บ้าง
อังกฤษและอินโดนีเซีย รวมถึงโหมดผสมที่รับมือทั้งสองภาษาในเอกสารเดียวกันได้ ซึ่งมีประโยชน์กับสัญญาที่พิมพ์คู่กับคำแปลของมัน แบบจำลองภาษาคือสิ่งที่ทำให้การรู้จำทำงานได้เลย และมีมาให้เพียงสองภาษานี้ เอกสารในภาษาอื่นจึงไม่ใช่สิ่งที่เครื่องมือนี้ทำได้ดี
ทำไมครั้งแรกมันถึงดาวน์โหลดข้อมูลหลายเมกะไบต์
นั่นคือตัวรู้จำและข้อมูลภาษาของมัน ซึ่งเสิร์ฟจากเว็บไซต์นี้เอง ไม่ใช่จาก CDN ของบุคคลที่สาม การทำ OCR จึงไม่ได้แอบไปติดต่อใครอื่น ภาษาอังกฤษราว 11 MB อินโดนีเซียราว 4 MB เบราว์เซอร์ของคุณเก็บแคชไว้ รอบที่สองจึงเริ่มได้ทันที และจากนั้น OCR ก็ทำงานได้โดยไม่ต้องเชื่อมต่อเลย
ตัวเลือกเฉพาะหน้าที่ไม่มีข้อความทำอะไรกันแน่
มันตรวจแต่ละหน้าว่ามีชั้นข้อความอยู่แล้วหรือไม่ แล้วรู้จำเฉพาะหน้าที่ไม่มี เอกสารที่สแกนมาส่วนใหญ่มีอย่างน้อยหนึ่งหน้าที่ไม่เคยผ่านการสแกน และการทำ OCR ทับหน้านั้นคือการแทนข้อความที่ถูกต้องด้วยค่าประมาณ ถ้าทั้งเอกสารมีข้อความอยู่แล้ว เครื่องมือจะบอกคุณแทนที่จะทำงานแล้วให้ผลลัพธ์ที่แย่กว่าจุดตั้งต้น
มันอ่านลายมือได้ไหม
ไม่ได้ เอนจินถูกฝึกมากับตัวพิมพ์ ลายมือจึงกลับมาเป็นสัญญาณรบกวน คืออักษรที่คล้ายรูปทรงมากกว่าคล้ายคำ ลายเซ็น บันทึกที่เขียนไว้ริมหน้า หรือฟอร์มที่กรอกด้วยมือ จะไม่ถูกรู้จำ ส่วนข้อความที่พิมพ์อยู่บนหน้าเดียวกันยังถูกรู้จำได้
ไฟล์สแกนถูกอัปโหลดไปที่ไหนไหม
ไม่ การเรนเดอร์เกิดขึ้นใน Web Worker ตัวหนึ่งในเบราว์เซอร์ของคุณ และการรู้จำเกิดขึ้นในอีกตัวหนึ่ง แม้แต่แกน WebAssembly และข้อมูลภาษาก็มาจากต้นทางของเว็บไซต์นี้เอง ไม่ใช่จาก CDN ตรวจสอบได้โดยตรง เปิดหน้านี้หนึ่งครั้ง ปิดการเชื่อมต่อ แล้วลองรันไฟล์สแกนดู

เครื่องมือที่เกี่ยวข้อง