Skip to content

Commit e3f9e42

Browse files
committed
Added service menu for editing PDFs.
1 parent 72f06e0 commit e3f9e42

38 files changed

Lines changed: 2438 additions & 41 deletions

README.md

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,43 @@
1414

1515
BigOcrPDF is a powerful, all-in-one OCR application that adds searchable text layers to scanned PDFs, extracts text from images, and provides a full-featured PDF editor — all from a modern, native Linux interface.
1616

17-
## Why BigOcrPDF?
17+
## Three Interfaces, One Toolkit
1818

19-
- **AI-Powered OCR** — Uses **RapidOCR PP-OCRv5** with OpenVINO hardware acceleration for fast, accurate text recognition across **130+ languages**
20-
- **Edit, Merge & Organize PDFs** — Reorder pages, rotate, delete, and combine multiple PDFs and images into a single document
21-
- **Smart Preprocessing** — Automatic perspective correction, deskew, dewarping, and illumination normalization — even photos of documents come out clean
22-
- **Multiple Export Formats** — Searchable PDF, PDF/A-2b archival, plain text, and ODF/ODT with layout-aware formatting
23-
- **Screen Capture OCR** — Select any region on screen and instantly extract text
24-
- **Batch Processing** — Process dozens of files at once with checkpoint/resume support
25-
- **File Manager Integration** — Right-click any PDF or image to OCR it directly
19+
BigOcrPDF offers three independent interfaces that cover every stage of document work:
2620

27-
---
21+
### 1. PDF OCR (`bigocrpdf`)
2822

29-
## Key Features
23+
The main interface. Drop your scanned PDFs, choose your settings, and get searchable documents back. Ideal for:
24+
25+
- Turning scanned paperwork, contracts, and books into searchable PDFs
26+
- Archiving documents as PDF/A-2b for long-term preservation
27+
- Batch-processing dozens of files with checkpoint/resume
28+
- Re-OCR'ing documents that already have a poor text layer
29+
- Exporting extracted text as TXT or ODF/ODT with layout detection
30+
31+
### 2. PDF Editor (`bigocrpdf --edit` or `bigocrpdf -e`)
3032

31-
### PDF Editor
33+
A standalone page editor that runs independently of the OCR window. Use it to organize your PDFs before or after OCR:
3234

33-
Manage your documents before and after OCR — no need for a separate tool.
35+
- Reorder, rotate, flip, and delete pages with drag-and-drop
36+
- Merge multiple PDFs and images into a single document
37+
- Import photos (JPEG, PNG, TIFF, WebP, RAW) with automatic EXIF rotation
38+
- Split large PDFs by page count or target file size
39+
- Compress PDFs with configurable quality and DPI
40+
- Save individual pages as images or separate PDFs
3441

35-
- **Drag-and-drop page reordering** with thumbnail previews
36-
- **Rotate & flip pages** — left, right, horizontal, and vertical
37-
- **Delete pages** you don't need
38-
- **Merge files** — combine pages from multiple PDFs and images into one document
39-
- **Create PDFs from images** — import JPEG, PNG, TIFF, WebP, RAW photos, and more
40-
- **EXIF-aware import** — automatically applies correct orientation from camera metadata
41-
- **Zoom control** — 50% to 200% thumbnail scaling with keyboard shortcuts
42-
- **Select pages for OCR** — choose exactly which pages to process
43-
- **Context menu** — right-click any page to save as image or PDF
44-
- **Compress PDF** — reduce file size with configurable quality and DPI
45-
- **Split PDF** — by page count or target file size
46-
- **Undo support** — revert page operations with Ctrl+Z
47-
- **Window size persistence** — remembers your preferred dimensions
42+
### 3. Image OCR (`bigocrimage`)
43+
44+
A lightweight window for quick text extraction from images and screenshots:
45+
46+
- Open any image — JPEG, PNG, WebP, TIFF, or RAW (CR2, DNG, NEF, ARW…)
47+
- Capture a screen region and extract the text instantly
48+
- Copy results to clipboard with one click
49+
- Works with Spectacle (KDE), GNOME Screenshot, and Flameshot
50+
51+
---
52+
53+
## Key Features
4854

4955
### OCR Engine
5056

@@ -84,20 +90,10 @@ Get your text out in the format you need.
8490
| **Custom Quality PDF** | Choose JPEG quality: 30%, 50%, 70%, 85%, or 95% |
8591
| **Black & White (JBIG2)** | Pure black-and-white output using JBIG2 — the most compact format for text-only documents |
8692
| **Plain Text (.txt)** | Extracted text from all pages |
87-
| **ODF/ODT** ⚠️ | 4 modes: formatted + images, images + simple text, formatted text only, or plain text *(experimental — formatting quality may vary)* |
93+
| **ODF/ODT** | Formatted text with optional embedded images *(experimental — formatting quality may vary)* |
8894

8995
ODF export includes **layout analysis**: automatic paragraph/heading detection, table detection, image embedding, and proper page breaks. Note: ODF/ODT export is experimental and formatting results may not always be accurate.
9096

91-
### Screen Capture & Image OCR
92-
93-
Extract text from anything on your screen.
94-
95-
- **Region capture** — select an area and get the text instantly
96-
- **Works with**: Spectacle (KDE), GNOME Screenshot, Flameshot
97-
- **Open any image** — JPEG, PNG, WebP, TIFF, RAW formats (CR2, DNG, NEF, ARW, and more)
98-
- **Copy to clipboard** with one click
99-
- **Standalone mode** — run `bigocrimage` for a dedicated image OCR window
100-
10197
### Batch Processing & Session Management
10298

10399
Handle large workloads efficiently.
@@ -145,8 +141,10 @@ pip install -e .
145141
### GUI
146142

147143
```bash
148-
bigocrpdf # PDF OCR interface
149-
bigocrimage # Image OCR window
144+
bigocrpdf # PDF OCR — main interface
145+
bigocrpdf --edit file.pdf # PDF Editor — standalone page editor
146+
bigocrpdf -e file.pdf # (short form)
147+
bigocrimage # Image OCR — quick text extraction
150148
```
151149

152150
### Command Line
@@ -155,6 +153,7 @@ bigocrimage # Image OCR window
155153
bigocrpdf [OPTIONS] [FILES...]
156154
157155
Options:
156+
-e, --edit Open the PDF editor instead of the OCR interface
158157
-v, --version Show version and exit
159158
-d, --debug Enable debug logging
160159
--verbose Verbose output
@@ -233,7 +232,7 @@ graph TD
233232

234233
## Quality & Testing
235234

236-
- **311 automated tests** covering OCR pipeline, PDF operations, export, preprocessing, editor logic, and utilities
235+
- **303 automated tests** covering OCR pipeline, PDF operations, export, preprocessing, editor logic, and utilities
237236
- **100% i18n coverage** — all 28 languages fully translated (604 strings each)
238237
- **Ruff-enforced** code style and linting
239238
- **WCAG 2.1 Level AA** accessibility considerations

locale/bg.po

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3782,3 +3782,71 @@ msgstr "OCR обработката е отменена от потребител
37823782
#: src/bigocrpdf/window_processing.py:446
37833783
msgid "OCR processing cancelled"
37843784
msgstr "OCR обработката е отменена."
3785+
3786+
#: src/bigocrpdf/ui/export_dialog.py
3787+
msgid "Export to ODT or TXT"
3788+
msgstr "Експорт в ODT или TXT"
3789+
3790+
#: src/bigocrpdf/ui/export_dialog.py
3791+
msgid "Export format"
3792+
msgstr "Формат за експортиране"
3793+
3794+
#: src/bigocrpdf/ui/export_dialog.py
3795+
msgid "Choose the output format for the extracted text."
3796+
msgstr "Изберете изходен формат за извлечения текст."
3797+
3798+
#: src/bigocrpdf/ui/export_dialog.py
3799+
msgid "ODF Document (.odt)"
3800+
msgstr "ODF документ (.odt)"
3801+
3802+
#: src/bigocrpdf/ui/export_dialog.py
3803+
msgid "Preserves text formatting, paragraphs and layout. Editable in LibreOffice, Google Docs and Microsoft Word."
3804+
msgstr "Запазва форматирането, абзаците и оформлението на текста. Може да се редактира в LibreOffice, Google Docs и Microsoft Word."
3805+
3806+
#: src/bigocrpdf/ui/export_dialog.py
3807+
msgid "Export ODF"
3808+
msgstr "Експортиране в ODF"
3809+
3810+
#: src/bigocrpdf/ui/export_dialog.py
3811+
msgid "Plain Text (.txt)"
3812+
msgstr "Обикновен текст (.txt)"
3813+
3814+
#: src/bigocrpdf/ui/export_dialog.py
3815+
msgid "Raw text without any formatting. Lightweight and universal — works everywhere."
3816+
msgstr "Необработен текст без форматиране. Лек и универсален — работи навсякъде."
3817+
3818+
#: src/bigocrpdf/ui/export_dialog.py
3819+
msgid "Export TXT"
3820+
msgstr "Експортиране в TXT"
3821+
3822+
#: src/bigocrpdf/ui/export_dialog.py
3823+
msgid "This PDF contains %d image(s)"
3824+
msgstr "Този PDF съдържа %d изображение(я)"
3825+
3826+
#: src/bigocrpdf/ui/export_dialog.py
3827+
msgid "PDF content analysis"
3828+
msgstr "Анализ на съдържанието на PDF"
3829+
3830+
#: src/bigocrpdf/ui/export_dialog.py
3831+
msgid "Apply OCR first"
3832+
msgstr "Приложете OCR първо"
3833+
3834+
#: src/bigocrpdf/ui/export_dialog.py
3835+
msgid "If the images contain text (scanned pages or photos), applying OCR first will produce much better export results."
3836+
msgstr "Ако изображенията съдържат текст (сканирани страници или снимки), прилагането на OCR първо ще даде много по-добри резултати от експортирането."
3837+
3838+
#: src/bigocrpdf/ui/export_dialog.py
3839+
msgid "Open OCR"
3840+
msgstr "Отваряне на OCR"
3841+
3842+
#: src/bigocrpdf/ui/export_dialog.py
3843+
msgid "Export as ODF document"
3844+
msgstr "Експортиране като ODF документ"
3845+
3846+
#: src/bigocrpdf/ui/export_dialog.py
3847+
msgid "Export as plain text"
3848+
msgstr "Експортиране като обикновен текст"
3849+
3850+
#: src/bigocrpdf/ui/export_dialog.py
3851+
msgid "Open OCR application to recognize text in images"
3852+
msgstr "Отваряне на OCR приложението за разпознаване на текст в изображения"

locale/bigocrpdf.pot

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3447,3 +3447,71 @@ msgstr ""
34473447
# File: bigocrpdf/src/bigocrpdf/window_processing.py, line: 446
34483448
msgid "OCR processing cancelled"
34493449
msgstr ""
3450+
3451+
#: src/bigocrpdf/ui/export_dialog.py
3452+
msgid "Export to ODT or TXT"
3453+
msgstr ""
3454+
3455+
#: src/bigocrpdf/ui/export_dialog.py
3456+
msgid "Export format"
3457+
msgstr ""
3458+
3459+
#: src/bigocrpdf/ui/export_dialog.py
3460+
msgid "Choose the output format for the extracted text."
3461+
msgstr ""
3462+
3463+
#: src/bigocrpdf/ui/export_dialog.py
3464+
msgid "ODF Document (.odt)"
3465+
msgstr ""
3466+
3467+
#: src/bigocrpdf/ui/export_dialog.py
3468+
msgid "Preserves text formatting, paragraphs and layout. Editable in LibreOffice, Google Docs and Microsoft Word."
3469+
msgstr ""
3470+
3471+
#: src/bigocrpdf/ui/export_dialog.py
3472+
msgid "Export ODF"
3473+
msgstr ""
3474+
3475+
#: src/bigocrpdf/ui/export_dialog.py
3476+
msgid "Plain Text (.txt)"
3477+
msgstr ""
3478+
3479+
#: src/bigocrpdf/ui/export_dialog.py
3480+
msgid "Raw text without any formatting. Lightweight and universal — works everywhere."
3481+
msgstr ""
3482+
3483+
#: src/bigocrpdf/ui/export_dialog.py
3484+
msgid "Export TXT"
3485+
msgstr ""
3486+
3487+
#: src/bigocrpdf/ui/export_dialog.py
3488+
msgid "This PDF contains %d image(s)"
3489+
msgstr ""
3490+
3491+
#: src/bigocrpdf/ui/export_dialog.py
3492+
msgid "PDF content analysis"
3493+
msgstr ""
3494+
3495+
#: src/bigocrpdf/ui/export_dialog.py
3496+
msgid "Apply OCR first"
3497+
msgstr ""
3498+
3499+
#: src/bigocrpdf/ui/export_dialog.py
3500+
msgid "If the images contain text (scanned pages or photos), applying OCR first will produce much better export results."
3501+
msgstr ""
3502+
3503+
#: src/bigocrpdf/ui/export_dialog.py
3504+
msgid "Open OCR"
3505+
msgstr ""
3506+
3507+
#: src/bigocrpdf/ui/export_dialog.py
3508+
msgid "Export as ODF document"
3509+
msgstr ""
3510+
3511+
#: src/bigocrpdf/ui/export_dialog.py
3512+
msgid "Export as plain text"
3513+
msgstr ""
3514+
3515+
#: src/bigocrpdf/ui/export_dialog.py
3516+
msgid "Open OCR application to recognize text in images"
3517+
msgstr ""

locale/cs.po

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3439,3 +3439,71 @@ msgstr "Zpracování OCR zrušeno uživatelem"
34393439
#: src/bigocrpdf/window_processing.py:446
34403440
msgid "OCR processing cancelled"
34413441
msgstr "Zpracování OCR bylo zrušeno."
3442+
3443+
#: src/bigocrpdf/ui/export_dialog.py
3444+
msgid "Export to ODT or TXT"
3445+
msgstr "Exportovat do ODT nebo TXT"
3446+
3447+
#: src/bigocrpdf/ui/export_dialog.py
3448+
msgid "Export format"
3449+
msgstr "Formát exportu"
3450+
3451+
#: src/bigocrpdf/ui/export_dialog.py
3452+
msgid "Choose the output format for the extracted text."
3453+
msgstr "Vyberte výstupní formát pro extrahovaný text."
3454+
3455+
#: src/bigocrpdf/ui/export_dialog.py
3456+
msgid "ODF Document (.odt)"
3457+
msgstr "ODF dokument (.odt)"
3458+
3459+
#: src/bigocrpdf/ui/export_dialog.py
3460+
msgid "Preserves text formatting, paragraphs and layout. Editable in LibreOffice, Google Docs and Microsoft Word."
3461+
msgstr "Zachovává formátování textu, odstavce a rozložení. Upravitelné v LibreOffice, Google Docs a Microsoft Word."
3462+
3463+
#: src/bigocrpdf/ui/export_dialog.py
3464+
msgid "Export ODF"
3465+
msgstr "Exportovat ODF"
3466+
3467+
#: src/bigocrpdf/ui/export_dialog.py
3468+
msgid "Plain Text (.txt)"
3469+
msgstr "Prostý text (.txt)"
3470+
3471+
#: src/bigocrpdf/ui/export_dialog.py
3472+
msgid "Raw text without any formatting. Lightweight and universal — works everywhere."
3473+
msgstr "Surový text bez formátování. Lehký a univerzální — funguje všude."
3474+
3475+
#: src/bigocrpdf/ui/export_dialog.py
3476+
msgid "Export TXT"
3477+
msgstr "Exportovat TXT"
3478+
3479+
#: src/bigocrpdf/ui/export_dialog.py
3480+
msgid "This PDF contains %d image(s)"
3481+
msgstr "Tento PDF obsahuje %d obrázek(ů)"
3482+
3483+
#: src/bigocrpdf/ui/export_dialog.py
3484+
msgid "PDF content analysis"
3485+
msgstr "Analýza obsahu PDF"
3486+
3487+
#: src/bigocrpdf/ui/export_dialog.py
3488+
msgid "Apply OCR first"
3489+
msgstr "Nejprve použijte OCR"
3490+
3491+
#: src/bigocrpdf/ui/export_dialog.py
3492+
msgid "If the images contain text (scanned pages or photos), applying OCR first will produce much better export results."
3493+
msgstr "Pokud obrázky obsahují text (naskenované stránky nebo fotografie), použití OCR nejprve přinese mnohem lepší výsledky exportu."
3494+
3495+
#: src/bigocrpdf/ui/export_dialog.py
3496+
msgid "Open OCR"
3497+
msgstr "Otevřít OCR"
3498+
3499+
#: src/bigocrpdf/ui/export_dialog.py
3500+
msgid "Export as ODF document"
3501+
msgstr "Exportovat jako ODF dokument"
3502+
3503+
#: src/bigocrpdf/ui/export_dialog.py
3504+
msgid "Export as plain text"
3505+
msgstr "Exportovat jako prostý text"
3506+
3507+
#: src/bigocrpdf/ui/export_dialog.py
3508+
msgid "Open OCR application to recognize text in images"
3509+
msgstr "Otevřít aplikaci OCR pro rozpoznávání textu v obrázcích"

0 commit comments

Comments
 (0)