How to use
- Open report-a4-3pages.pdf and read three page lines.
- Open meta-card.pdf and read Harbour report.
- Do not expect words from a page that is only a picture.
Formula / how it works
report-a4-3pages.pdf has three pages of real text. Page 1 reads "report-a4-3pages.pdf page 1", and pages 2 and 3 follow the same pattern. meta-card.pdf has one page and the words "Harbour report". pdf.js reads text operators. It does not OCR a picture. A page that was rebuilt as a JPEG of letters has no text layer, and this page will say so rather than invent words. A password stops the read. Nothing is uploaded. If you need the picture of a page, use PDF to JPG. If you need words from a scan, this page will not invent them.
Three report lines and the words Harbour report are real text operators. A JPEG picture of the same page would come back without those words. That empty result is correct. OCR is a different page and a different kind of mistake. A password stops the read. The PDF is not uploaded.
The report yields three lines, one per page, each naming that page. The card yields the words Harbour report. Those are text operators. A JPEG picture of the same page would come back without them, and that empty result is correct. OCR is the image page, a different job with different mistakes. A password stops the read. The PDF is not uploaded.
Page 1 of the report is the sentence report-a4-3pages.pdf page 1. Pages 2 and 3 follow. The card is the sentence Harbour report. That is the text layer pdf.js can see. A page rebuilt as a JPEG of those same letters has no text layer, and the line will say there is no text rather than guessing. OCR of a picture is the image-to-text page, with its own English limit and its own confidence number. A password stops this read. The PDF stays in the tab.
The report’s three pages each contain one sentence, and the card contains Harbour report. Copy those if you need the text layer. Do not expect the same words from a scanned page or from a JPEG rebuild. Those files have paint, not text operators. OCR is a separate page. A password ends this read immediately. The PDF never leaves the browser.
Work in this order. If the PDF was exported from a writer, expect real sentences. The report gives one sentence a page, naming itself. The card gives Harbour report. If the PDF is a scan or a JPEG rebuild, expect little or no text, and treat that as the truth. This page does not OCR. The image-to-text page is the OCR path, with its own limits. A password stops the extraction. You do not send the file out to be unlocked. Copy the text from the page, or download the text file, and leave the PDF where it was.
Info fields are on PDF metadata viewer. A picture of a page is PDF to JPG.
Worked examples
Three pages of the report
Inputs: p2t-f: report-a4-3pages.pdf
On this page, take report-a4-3pages.pdf and press Extract text. A picture of letters has no text layer.
Result: PDF text, 3 pages.
Page 1: report-a4-3pages.pdf page 1
Page 2: report-a4-3pages.pdf page 2
Page 3: report-a4-3pages.pdf page 3
A page that is only a picture of letters has no text to extract.
The harbour card
Inputs: p2t-f: meta-card.pdf
On this page, take meta-card.pdf and press Extract text. A picture of letters has no text layer.
Result: PDF text, 1 page.
Page 1: Harbour report
A page that is only a picture of letters has no text to extract.
Use cases
- Copying a real text layer.
- Seeing an empty result on a scanned page.
- Stopping on a password.
- Leaving OCR to the image page, which is a different job.
Tips & limitations
- Page 1 of the report names itself.
- The card says Harbour report.
- A JPEG rebuild of a PDF has no text layer.
- Nothing is uploaded.
FAQ
What is page 1 of the report?
report-a4-3pages.pdf page 1.
What is the card?
Harbour report, one page.
Will a scan produce words?
No. A picture of letters has no text operators.
Is this OCR?
No. OCR is the image-to-text page. This page reads a PDF text layer.
Password?
The read stops.
Uploaded?
No.
The three report lines and Harbour report are the samples. A scanned PDF will not grow words here.