mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
OCR fix and Mobile QR changes (#5433)
# Description of Changes ## OCR / Tesseract path handling Makes tessDataPath resolution deterministic with priority: config > TESSDATA_PREFIX env > default. Updates language discovery to use runtimePathConfig.getTessDataPath() instead of raw config value. Ensure default OCR dir is debian based not alpine ## Mobile scanner: feature gating + new conversion settings Adds system.mobileScannerSettings (convert-to-PDF + resolution + page format + stretch) exposed via backend config and configurable in the proprietary admin UI. Enforces enableMobileScanner on the MobileScannerController endpoints (403 when disabled). Frontend mobile upload flow can now optionally convert received images to PDF (pdf-lib + canvas). ## Desktop/Tauri connectivity work Expands tauri-plugin-http permissions and enables dangerous-settings. Adds a very comprehensive multi-stage server connection diagnostic routine (with lots of logging). <img width="688" height="475" alt="image" src="https://github.com/user-attachments/assets/6f9c1aec-58c7-449b-96b0-52f25430d741" /> --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### Translations (if applicable) - [ ] I ran [`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details.
This commit is contained in:
@@ -441,6 +441,13 @@ currentVersion = "Current Version"
|
||||
latestVersion = "Latest Version"
|
||||
checkForUpdates = "Check for Updates"
|
||||
viewDetails = "View Details"
|
||||
serverNeedsUpdate = "Server needs to be updated by administrator"
|
||||
|
||||
[settings.general.versionInfo]
|
||||
title = "Version Information"
|
||||
description = "Desktop and server version details"
|
||||
desktop = "Desktop Version"
|
||||
server = "Server Version"
|
||||
|
||||
[settings.security]
|
||||
title = "Security"
|
||||
@@ -4277,6 +4284,8 @@ fetchError = "Failed to load settings"
|
||||
saveError = "Failed to save settings"
|
||||
saved = "Settings saved successfully"
|
||||
saveSuccess = "Settings saved successfully"
|
||||
success = "Settings saved successfully"
|
||||
error = "Failed to save settings"
|
||||
save = "Save Changes"
|
||||
discard = "Discard"
|
||||
restartRequired = "Restart Required"
|
||||
@@ -4543,6 +4552,19 @@ connect = "Connect"
|
||||
disconnect = "Disconnect"
|
||||
disconnected = "Provider disconnected successfully"
|
||||
disconnectError = "Failed to disconnect provider"
|
||||
mobileScannerConvertToPdf = "Convert Images to PDF"
|
||||
mobileScannerConvertToPdfDesc = "Automatically convert uploaded images to PDF format. If disabled, images will be kept as-is."
|
||||
mobileScannerImageResolution = "Image Resolution"
|
||||
mobileScannerImageResolutionDesc = "Resolution of uploaded images. \"Reduced\" scales images to max 1200px to reduce file size."
|
||||
imageResolutionFull = "Full (Original Size)"
|
||||
imageResolutionReduced = "Reduced (Max 1200px)"
|
||||
mobileScannerPageFormat = "Page Format"
|
||||
mobileScannerPageFormatDesc = "PDF page size for converted images. \"Keep\" uses original image dimensions."
|
||||
pageFormatKeep = "Keep (Original Dimensions)"
|
||||
pageFormatA4 = "A4 (210×297mm)"
|
||||
pageFormatLetter = "Letter (8.5×11in)"
|
||||
mobileScannerStretchToFit = "Stretch to Fit"
|
||||
mobileScannerStretchToFitDesc = "Stretch images to fill the entire page. If disabled, images are centered with preserved aspect ratio."
|
||||
|
||||
[admin.settings.connections.ssoAutoLogin]
|
||||
label = "SSO Auto Login"
|
||||
@@ -4617,6 +4639,19 @@ enable = "Enable QR Code Upload"
|
||||
description = "Allow users to upload files from mobile devices by scanning a QR code"
|
||||
note = "Note: Requires Frontend URL to be configured. "
|
||||
link = "Configure in System Settings"
|
||||
mobileScannerConvertToPdf = "Convert Images to PDF"
|
||||
mobileScannerConvertToPdfDesc = "Automatically convert uploaded images to PDF format. If disabled, images will be kept as-is."
|
||||
mobileScannerImageResolution = "Image Resolution"
|
||||
mobileScannerImageResolutionDesc = "Resolution of uploaded images. \"Reduced\" scales images to max 1200px to reduce file size."
|
||||
imageResolutionFull = "Full (Original Size)"
|
||||
imageResolutionReduced = "Reduced (Max 1200px)"
|
||||
mobileScannerPageFormat = "Page Format"
|
||||
mobileScannerPageFormatDesc = "PDF page size for converted images. \"Keep\" uses original image dimensions."
|
||||
pageFormatKeep = "Keep (Original Dimensions)"
|
||||
pageFormatA4 = "A4 (210×297mm)"
|
||||
pageFormatLetter = "Letter (8.5×11in)"
|
||||
mobileScannerStretchToFit = "Stretch to Fit"
|
||||
mobileScannerStretchToFitDesc = "Stretch images to fill the entire page. If disabled, images are centered with preserved aspect ratio."
|
||||
|
||||
[admin.settings.database]
|
||||
title = "Database"
|
||||
@@ -4990,6 +5025,7 @@ noRecentFiles = "No recent files found"
|
||||
googleDriveNotAvailable = "Google Drive integration not available"
|
||||
mobileUpload = "Mobile Upload"
|
||||
mobileShort = "Mobile"
|
||||
mobileUploadNotAvailable = "Mobile upload not enabled"
|
||||
downloadSelected = "Download Selected"
|
||||
saveSelected = "Save Selected"
|
||||
openFiles = "Open Files"
|
||||
@@ -6464,7 +6500,8 @@ failed = "An error occurred while adding text to the PDF."
|
||||
|
||||
[mobileUpload]
|
||||
title = "Upload from Mobile"
|
||||
description = "Scan this QR code with your mobile device to upload photos directly to this page."
|
||||
description = "Scan to upload photos. Images auto-convert to PDF."
|
||||
descriptionNoConvert = "Scan to upload photos from your mobile device."
|
||||
error = "Connection Error"
|
||||
pollingError = "Error checking for files"
|
||||
sessionId = "Session ID"
|
||||
@@ -6473,7 +6510,8 @@ expiryWarning = "Session Expiring Soon"
|
||||
expiryWarningMessage = "This QR code will expire in {{seconds}} seconds. A new code will be generated automatically."
|
||||
filesReceived = "{{count}} file(s) received"
|
||||
connected = "Mobile device connected"
|
||||
instructions = "Open the camera app on your phone and scan this code. Files will be transferred directly between devices."
|
||||
instructions = "Scan with your phone camera. Images convert to PDF automatically."
|
||||
instructionsNoConvert = "Scan with your phone camera to upload files."
|
||||
|
||||
[mobileScanner]
|
||||
title = "Mobile Scanner"
|
||||
|
||||
Reference in New Issue
Block a user