Skip to content

Commit 87b8586

Browse files
authored
Merge pull request #1976 from cre8ive-marketing/feature/1930-grayscale-pdf
feat(pdf): Grayscale turns a PDF gray with Ghostscript (#1930)
2 parents d4f1ae3 + 1a16f99 commit 87b8586

28 files changed

Lines changed: 263 additions & 4 deletions

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,21 @@ ko: PDF·Word·웹 페이지의 표를 Excel로 바꿀 때 머리글 병합은
126126
en: Tables from PDF, Word and web pages can keep their header merges in Excel and fill categories into every row, ready for filters and pivot tables (new presets do this by default)
127127
ko: 매크로가 포함된 PowerPoint 슬라이드 쇼(.ppsm)를 PDF와 다른 프레젠테이션 형식으로 변환할 수 있어요
128128
en: Macro-enabled PowerPoint slide shows (.ppsm) convert to PDF and the other presentation formats
129+
ko: 흑백 프리셋으로 PDF를 바꾸면 글자와 도형은 그대로 두고 흑백 PDF가 나와요 (Ghostscript 필요)
130+
en: The Grayscale preset turns a PDF gray and keeps its text, shapes and notes as they are (needs Ghostscript)
129131
ko: 이미지 프리셋에서 크기 조정 방식(Lanczos, Mitchell, Catmull-Rom, 바이리니어, 박스, 최근접 이웃)을 고를 수 있어요
130132
en: Image presets can choose how a resize blends pixels: Lanczos, Mitchell, Catmull-Rom, bilinear, box or nearest neighbour
131133
ko: 설정 → 테마의 진행 링 카드에서 링을 보여 주는 시간(5·10·15초 또는 항상)을 고를 수 있어요
132134
en: The progress ring's time at the cursor (5, 10, 15 seconds or Always) can be set in Settings → Theme
133135
-->
134136

137+
- **Grayscale PDFs** (#1930). The **Grayscale** preset on a PDF used to give back the PDF in colour. It now
138+
comes out gray: text stays text you can select, shapes stay sharp, pictures become gray and notes stay notes, with
139+
no page turned into a picture. Page ranges, splitting, compression and PDF/A work on the gray file. This needs
140+
Ghostscript (**Settings → Engines**); without it the file fails with that reason instead of staying in colour. A
141+
PDF locked with a password still fails with the "password-protected" message. **Merge PDFs** with Grayscale still
142+
gives a merged PDF in colour; that is left for later.
143+
135144
- **Choose the resampling filter** (#1601). An image preset that resizes now has a **Resampling** box under
136145
**Resize**: Automatic (as before: ImageMagick picks Lanczos for shrinking and Mitchell for enlarging), Lanczos,
137146
Mitchell, Catmull-Rom (the sharp bicubic), Bilinear, Box, or Nearest neighbour for pixel art. The same filter is

‎docs/ENGINES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Filee chooses engines automatically. Settings → *Engines* shows their status,
3737
| Archives (7-Zip) | bundled with the installer (`engines/7zip`, ~2.5 MB) + built-in readers | ZIP (including ANSYS Workbench WBPZ), 7Z, RAR, TAR (+ GZ/BZ2/XZ/Z/7Z/LZ), CAB, ISO, DMG, split (.001), Minecraft and Modrinth packs, Garry's Mod addons (GMA), Valve paks (VPK), the files packed into Source maps (BSP), … **→ folder, ZIP, 7Z, TAR, TAR.GZ/BZ2/XZ, the packs, GMA**; ALZ, EGG, lzip, GMA, VPK read in-process; "Compress into one archive" for any files |
3838
| LibreOffice + H2Orestart + Java | **optional download** (~420 MB, 1.3 GB on disk) | older and rare formats only: DOC, XLS, PPT, RTF and OpenDocument → PDF and to each other, output as DOCX/ODT/ODS/ODP; HWP/HWPX → DOCX/ODT; read-only formats (see below) → PDF and their kind's editable formats; FODT, OpenDocument templates (OTT, OTS, OTP) and XLT out; SVG → EMF/WMF/ODG, a PDF page → SVG |
3939
| Pandoc | **optional download** (~42 MB, 240 MB on disk) | Markdown ↔ DOCX/ODT/RTF, DOCX/ODT/HTML/RTF → Markdown, HTML ↔ DOCX/ODT, markup languages (reStructuredText, LaTeX, Org, AsciiDoc, Typst, MediaWiki, DocBook, Jupyter, Textile, man, OPML) ↔ Markdown/HTML/DOCX/ODT and each other (and → RTF, EPUB, TXT), Markdown and markup → PPTX slides |
40-
| Ghostscript | **optional download** (~20 MB, 31 MB on disk) | EPS/PS → PDF, PDF → EPS/PS, PostScript-based AI/AIT → PDF (images through PDF and PDFium); smaller PDFs when a preset asks for it; PDF/A-2b for PDF/A presets; renders CMYK PDF/AI pages for CMYK JPG/TIFF |
40+
| Ghostscript | **optional download** (~20 MB, 31 MB on disk) | EPS/PS → PDF, PDF → EPS/PS, PostScript-based AI/AIT → PDF (images through PDF and PDFium); smaller PDFs when a preset asks for it; PDF/A-2b for PDF/A presets; gray PDFs for the Grayscale preset; renders CMYK PDF/AI pages for CMYK JPG/TIFF |
4141
| Tesseract | **optional download** (~50 MB, 160 MB on disk; each language 0.4–10 MB when first used) | **text recognition (OCR)**: scans and pictures → searchable PDF, and their text into DOCX, TXT, Markdown and HWPX ("Recognize text" in the preset, see below) |
4242
| Apple Vision | part of macOS (Mac only) | **text recognition (OCR) on a Mac**, the same step as Tesseract without a download; Tesseract reads the languages Vision doesn't (see "Apple Vision on macOS") |
4343
| FFmpeg | **optional download** (~100 MB, 272 MB on disk) | **all video and audio**: video ↔ video (H.264, HEVC, AV1), video → animated GIF / APNG / WebP, a still frame or every frame, audio and subtitle extraction, audio ↔ audio (also APE, WavPack, TTA, DSD, DTS, ALAC, …), GIF, APNG and photos → MP4/WEBM/MOV, Live / Motion Photos → their video, a clip of a video → an iPhone Live Photo or Android Motion Photo (experimental), images → HEIC, clips or audio files joined into one, pictures → a slideshow MP4, a video split into parts every so often or into equal parts (copied, not encoded), copies without metadata (see "Media tools") |

‎src/Filee.App/Assets/i18n/ar.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,6 +1890,7 @@
18901890
"engines.package.upscayl-bin.name": "Upscayl (ترقية دقة الصور بالذكاء الاصطناعي)",
18911891
"engines.package.upscayl-bin.description": "ترقية دقة الصور والدقة الفائقة حتى 4 أضعاف بنماذج NCNN محلية.\nتُنزَّل النماذج عند استخدامها أول مرة.",
18921892
"error.upscale_needs_engine": "ثبّت Upscayl من الإعدادات ← المحركات لاستخدام ترقية الدقة بالذكاء الاصطناعي.",
1893+
"error.grayscale_needs_ghostscript": "ثبّت Ghostscript من الإعدادات ← المحركات لتحويل ملفات PDF إلى تدرّج الرمادي.",
18931894
"error.upscale_needs_vulkan": "يتطلب رفع دقة الصور بطاقة رسومات (GPU) متوافقة مع Vulkan.",
18941895
"error.upscale_too_many_frames": "عدد الإطارات كبير جدًا لتكبير الدقة",
18951896
"upscale.model_ready": "جاهز",

‎src/Filee.App/Assets/i18n/bn-BD.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,7 @@
18871887
"engines.package.upscayl-bin.name": "Upscayl (AI ছবি আপস্কেলার)",
18881888
"engines.package.upscayl-bin.description": "স্থানীয় NCNN মডেল দিয়ে AI-এর সাহায্যে ছবি ৪ গুণ পর্যন্ত আপস্কেল ও সুপার-রেজোলিউশন।\nপ্রথমবার ব্যবহারের সময় মডেলগুলো ডাউনলোড হয়।",
18891889
"error.upscale_needs_engine": "AI আপস্কেলিং ব্যবহার করতে সেটিংস → ইঞ্জিন-এ Upscayl ইনস্টল করুন।",
1890+
"error.grayscale_needs_ghostscript": "পিডিএফ ধূসর করতে সেটিংস → ইঞ্জিন-এ Ghostscript ইনস্টল করুন।",
18901891
"error.upscale_needs_vulkan": "আপস্কেল করতে Vulkan-সমর্থিত গ্রাফিক্স কার্ড (GPU) প্রয়োজন।",
18911892
"error.upscale_too_many_frames": "আপস্কেল করার জন্য ফ্রেমের সংখ্যা খুব বেশি",
18921893
"upscale.model_ready": "প্রস্তুত",

‎src/Filee.App/Assets/i18n/de.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,6 +1889,7 @@
18891889
"engines.package.upscayl-bin.name": "Upscayl (KI-Bild-Upscaler)",
18901890
"engines.package.upscayl-bin.description": "KI-Bild-Upscaling und Super-Resolution bis zu 4× mit lokalen NCNN-Modellen.\nModelle werden bei der ersten Verwendung heruntergeladen.",
18911891
"error.upscale_needs_engine": "Installiere Upscayl unter Einstellungen → Module, um KI-Upscaling zu nutzen.",
1892+
"error.grayscale_needs_ghostscript": "Installiere Ghostscript unter Einstellungen → Module, um PDFs in Graustufen umzuwandeln.",
18921893
"error.upscale_needs_vulkan": "Für das Hochskalieren ist eine Vulkan-kompatible Grafikkarte (GPU) erforderlich.",
18931894
"error.upscale_too_many_frames": "Zu viele Einzelbilder zum Hochskalieren",
18941895
"upscale.model_ready": "Bereit",

‎src/Filee.App/Assets/i18n/en.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,7 @@
19111911
"engines.package.upscayl-bin.name": "Upscayl (AI image upscaler)",
19121912
"engines.package.upscayl-bin.description": "AI image upscaling and super-resolution up to 4× with local NCNN models.\nModels download the first time they are used.",
19131913
"error.upscale_needs_engine": "Install Upscayl in Settings → Engines to use AI upscaling.",
1914+
"error.grayscale_needs_ghostscript": "Install Ghostscript in Settings → Engines to turn PDFs grayscale.",
19141915
"error.upscale_needs_vulkan": "Upscaling requires a Vulkan-compatible graphics card (GPU).",
19151916
"error.upscale_too_many_frames": "Too many frames to upscale",
19161917
"upscale.model_ready": "Ready",

‎src/Filee.App/Assets/i18n/es.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,7 @@
18911891
"engines.package.upscayl-bin.name": "Upscayl (escalador de imágenes por IA)",
18921892
"engines.package.upscayl-bin.description": "Escalado de imágenes y superresolución por IA hasta 4× con modelos NCNN locales.\nLos modelos se descargan la primera vez que se usan.",
18931893
"error.upscale_needs_engine": "Instala Upscayl en Ajustes → Motores para usar el escalado por IA.",
1894+
"error.grayscale_needs_ghostscript": "Instala Ghostscript en Ajustes → Motores para pasar PDF a escala de grises.",
18941895
"error.upscale_needs_vulkan": "El escalado requiere una tarjeta gráfica (GPU) compatible con Vulkan.",
18951896
"error.upscale_too_many_frames": "Demasiados fotogramas para escalar",
18961897
"upscale.model_ready": "Listo",

‎src/Filee.App/Assets/i18n/fa.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,7 @@
18871887
"engines.package.upscayl-bin.name": "Upscayl (افزایش وضوح تصویر با هوش مصنوعی)",
18881888
"engines.package.upscayl-bin.description": "افزایش وضوح تصویر با هوش مصنوعی تا ۴ برابر، با مدل‌های محلی NCNN.\nمدل‌ها بار اولی که استفاده می‌شوند دانلود می‌شوند.",
18891889
"error.upscale_needs_engine": "برای افزایش وضوح با هوش مصنوعی، Upscayl را در تنظیمات ← موتورها نصب کنید.",
1890+
"error.grayscale_needs_ghostscript": "برای خاکستری کردن PDF، نرم‌افزار Ghostscript را در تنظیمات ← موتورها نصب کنید.",
18901891
"error.upscale_needs_vulkan": "افزایش وضوح به کارت گرافیک (GPU) سازگار با Vulkan نیاز دارد.",
18911892
"error.upscale_too_many_frames": "تعداد فریم‌ها برای افزایش وضوح بیش از حد زیاد است",
18921893
"upscale.model_ready": "آماده",

‎src/Filee.App/Assets/i18n/fr.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,7 @@
19111911
"engines.package.upscayl-bin.name": "Upscayl (mise à l'échelle d'images par IA)",
19121912
"engines.package.upscayl-bin.description": "Mise à l'échelle et super-résolution d'images par IA jusqu'à 4× avec des modèles NCNN locaux.\nLes modèles sont téléchargés à leur première utilisation.",
19131913
"error.upscale_needs_engine": "Installez Upscayl dans Paramètres → Moteurs pour utiliser la mise à l'échelle par IA.",
1914+
"error.grayscale_needs_ghostscript": "Installez Ghostscript dans Paramètres → Moteurs pour passer des PDF en niveaux de gris.",
19141915
"error.upscale_needs_vulkan": "La mise à l'échelle nécessite une carte graphique (GPU) compatible Vulkan.",
19151916
"error.upscale_too_many_frames": "Trop d'images à mettre à l'échelle",
19161917
"upscale.model_ready": "Prêt",

‎src/Filee.App/Assets/i18n/hi.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,7 @@
18911891
"engines.package.upscayl-bin.name": "Upscayl (AI इमेज अपस्केलर)",
18921892
"engines.package.upscayl-bin.description": "स्थानीय NCNN मॉडल्स के साथ 4× तक AI इमेज अपस्केलिंग और सुपर-रेज़ोल्यूशन।\nमॉडल पहली बार इस्तेमाल पर डाउनलोड होते हैं।",
18931893
"error.upscale_needs_engine": "AI अपस्केलिंग का उपयोग करने के लिए सेटिंग्स → इंजन में Upscayl इंस्टॉल करें।",
1894+
"error.grayscale_needs_ghostscript": "PDF को ग्रेस्केल बनाने के लिए सेटिंग्स → इंजन में Ghostscript इंस्टॉल करें।",
18941895
"error.upscale_needs_vulkan": "अपस्केलिंग के लिए Vulkan-संगत ग्राफ़िक्स कार्ड (GPU) की आवश्यकता होती है।",
18951896
"error.upscale_too_many_frames": "अपस्केल करने के लिए बहुत ज़्यादा फ़्रेम हैं",
18961897
"upscale.model_ready": "तैयार",

0 commit comments

Comments
 (0)