-
Notifications
You must be signed in to change notification settings - Fork 139
Add Partially scanned PDFs preferences section and OCR shortcut #642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7621d96
b38fb02
4ba3080
086061d
a5eb0cd
37a16ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,22 +12,36 @@ | |
| OCRmyPDF must be installed on your system to use this feature. | ||
| {% endhint %} | ||
|
|
||
| 1. Open JabRef and select the entry with the scanned PDF you want to OCR. | ||
| 2. Open the General Tab of the Entry Editor. | ||
| 3. Right-click on the File and select "Perform OCR and embed text into new PDF file".  | ||
| 1. Open JabRef and select the entry with the PDFs you want to OCR. | ||
| 2. Scroll down the Main Tab of the Entry Editor till you reach the Files and Links section. | ||
| 3. Right-click on the File and select "Perform OCR and embed text into new PDF file", or select the file and use the shortcut `Ctrl+Shift+R`.  | ||
|
|
||
| * After performing OCR, JabRef creates a new PDF file with the OCR text embedded, and it will be linked to all the entries that have the old file linked to them. The original scanned PDF will remain unchanged. | ||
|
|
||
|  | ||
|  | ||
|
|
||
| * Now you can select and search text in the new PDF file. | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ## OCR Preferences | ||
|
|
||
| * The OCR preferences can be accessed via **File → Preferences → OCR**. | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ### Partially scanned PDFs | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatives:
I am not quite sure what is best, but tend to favour 1 or 2. What do you think?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would go with option 1. |
||
|
|
||
| * Some PDFs may contain a mix of pages with and without embedded text. | ||
| * In such cases, you will have three options: | ||
|
|
||
| 1. **Skip pages with text**: Performs OCR only on the pages without already embedded text. This is the default behaviour, if not specified. | ||
| 2. **Redo text in pages containing OCRed text**: Uses OCR on pages containing text created by a prior OCR run. | ||
| 3. **Overwrite text in pages containing text**: Forces OCR with rasterization on all pages, potentially reducing quality or losing vector content, but this technique works, even when the `Redo text in pages containing text` option doesn't work. | ||
|
|
||
| * This can be configured in Partially scanned PDFs section in the OCR preferences. | ||
|
|
||
|  | ||
|
|
||
| ### Engine Path | ||
|
|
||
|
|
@@ -41,13 +55,15 @@ Performing OCR will fail if wrong engine path is provided, make sure that the co | |
|
|
||
| 1. **Type the path manually**: Enter the path directly into the text field. This can be a bare command name (e.g. `ocrmypdf` or `python -m ocrmypdf`) if it is available on your system PATH, or a full absolute path to the executable (e.g. `/home/user/.local/bin/ocrmypdf`). | ||
|
|
||
|  | ||
|  | ||
|
|
||
| 2. **Browse**: Click the folder icon to open a file chooser and navigate to the OCRmyPDF executable on your system. | ||
|
|
||
|  | ||
|  | ||
|
|
||
| 3. **Auto-detect**: Click the magnifier icon to have JabRef automatically search for a working OCRmyPDF installation. JabRef will try the following commands in order and use the first one that works: | ||
|
|
||
|  | ||
|  | ||
|
|
||
| 1. `ocrmypdf` | ||
| 2. `python -m ocrmypdf` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen other apps structure OCR preferences via "Input" vs "Output".