diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index ab3c96fdd..d34c96dfd 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -504,14 +504,15 @@ hidden rows and manual breaks, then see the PDF that those settings will produce - `SpreadsheetPrintPackage` makes a disposable XLSX under `JobQueue.DefaultWorkRoot`. It keeps every worksheet and named range so cross-sheet formulas remain valid, hides the sheets not being rendered, and changes only the chosen sheet's print settings. A new print area is written only after the user explicitly changes or accepts the range. -- `SpreadsheetPrintService` runs LibreOffice once for each region. Preview and export use the same disposable-workbook +- `SpreadsheetPrintService` prints each region once with Filee's sheet printer (`SheetPrintConverter`), or with + LibreOffice when it is chosen for spreadsheets in Settings → Engines and installed. Preview and export use the same disposable-workbook path; export then joins the region PDFs in the chosen order with PDFsharp, or, with **One PDF per sheet**, writes each region as `_.pdf` (`PerSheetPaths` cleans the names, adds `_2` for repeats, and applies the tool preset's conflict policy to files - already there). The ordinary XLSX → PDF donut conversion - can still differ because route planning may select Filee's built-in spreadsheet reader instead of LibreOffice. -- `PdfPreviewDocument` caches a PDF's bytes and page geometry. The studio asks PDFium/PDFtoImage for small thumbnails - and only one large selected page, all decoded away from the UI thread; exporting never performs preview rendering. - Cancellation closes LibreOffice and the temporary job folder is removed on success, error or window close. + already there). +- `PdfPreviewDocument` caches a PDF's bytes and page geometry. The studio asks PDFium/PDFtoImage for the thumbnails + of the pages its virtualised strip shows (a few per document load) and only one large selected page, all decoded + away from the UI thread; exporting never performs preview rendering. Cancellation stops the printer (or closes + LibreOffice) and the temporary job folder is removed on success, error or window close. ## Settings and data diff --git a/docs/ENGINES.md b/docs/ENGINES.md index fdd7f9f7e..2ec22312c 100644 --- a/docs/ENGINES.md +++ b/docs/ENGINES.md @@ -858,12 +858,16 @@ the text the spreadsheet shows, the value behind it and its Excel number format. conditional formatting, data validation, print areas and page breaks (the print engine reads the page setup, print areas, breaks, conditional formats and pictures for PDF). -The XLSX donut also offers **PDF + Edit** (`tool-sheet-studio`). Unlike an ordinary routed XLSX → PDF conversion, -this interactive tool always requires LibreOffice regardless of engine priority: it preserves the original workbook, -makes one disposable copy per selected sheet region, applies that region's print settings, and asks LibreOffice to -render it. PDFsharp combines the resulting PDFs. The live preview follows this exact studio export path and uses -PDFium/PDFtoImage for lazy thumbnails and the selected large page; the ordinary donut's PDF can differ because it -is printed by Filee's own print engine (below). +The XLSX donut also offers **PDF + Edit** (`tool-sheet-studio`). This interactive tool preserves the original +workbook, makes one disposable copy per selected sheet region, applies that region's print settings, and prints it +with the same engine as an ordinary XLSX → PDF: Filee's own print engine (below), or LibreOffice when **Use +LibreOffice for spreadsheets → PDF** is on and it is installed (and, as in a conversion, for a workbook with charts or +other objects the print engine doesn't draw yet; without LibreOffice the studio shows the printer's notice). Every +studio setting (paper, orientation, margins, scale or fit to pages, page order, print area, hidden rows and columns, +manual breaks, sheet choice) is written into the copy and read by the print engine; the sheet's own gridlines, +headings, centring and headers / footers are kept. PDFsharp combines the resulting PDFs. The live preview follows +this exact studio export path and uses PDFium/PDFtoImage for the thumbnails of the pages the strip shows and the +selected large page. ## Spreadsheet printing @@ -941,7 +945,7 @@ services (FontResolver with font fallback, the HarfBuzz shaper, the UAX #14 line - **Not printed yet.** Charts, shapes, text boxes, comments, sparklines; data bars, icon sets and conditional formats with formulas of their own; conditional formats of XLS and ODS files; rich text in XLS cells; text running past the edge of a page onto the next one; black-and-white and draft printing; the margins a real printer can't print in - (a PDF has none). The studio (*PDF + Edit*) still renders through LibreOffice. + (a PDF has none). `tests/Filee.Engines.Tests/SheetPrintTests.cs` builds workbooks in code and checks the page count and where each page starts against the numbers Excel's units give (10 default columns and 48 default rows on A4 with the Normal margins, diff --git a/src/Filee.App/Assets/i18n/ar.json b/src/Filee.App/Assets/i18n/ar.json index de66edb91..106cec092 100644 --- a/src/Filee.App/Assets/i18n/ar.json +++ b/src/Filee.App/Assets/i18n/ar.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "تحتفظ Shapefile بنوع واحد من الأشكال، لذا حُفظت النقاط والخطوط والمضلعات في ملفات منفصلة", "notice.geo_heights_dropped": "بعض النقاط بلا ارتفاع، ولا يمكن لملف Shapefile ترك ارتفاع نقطة واحدة فارغًا، لذا حُذفت جميع الارتفاعات", "notice.osm_incomplete": "بعض الخطوط والمساحات تستخدم نقاطًا غير موجودة في الملف (مقتطف مقصوص)، لذا حُذفت", + "notice.renderer_left_out": "لم يستطع مُصيِّر Filee رسم هذا المستند كاملًا: {0}", + "notice.renderer_left_out_libreoffice": "لم يستطع مُصيِّر Filee رسم هذا المستند كاملًا: {0}. ثبّت LibreOffice من الإعدادات ← المحركات للحصول على نسخة مطابقة", + "notice.renderer_left_out.separator": "، ", + "notice.renderer_left_out.charts": "مخططات محذوفة: {0}", + "notice.renderer_left_out.charts_one": "حُذف مخطط واحد", + "notice.renderer_left_out.smartart": "رسومات SmartArt محذوفة: {0}", + "notice.renderer_left_out.smartart_one": "حُذف رسم SmartArt واحد", + "notice.renderer_left_out.objects": "كائنات مضمّنة محذوفة: {0}", + "notice.renderer_left_out.objects_one": "حُذف كائن مضمّن واحد", + "notice.renderer_left_out.form_controls": "عناصر تحكم نماذج محذوفة: {0}", + "notice.renderer_left_out.form_controls_one": "حُذف عنصر تحكم نموذج واحد", + "notice.renderer_left_out.videos": "مقاطع فيديو محذوفة: {0}", + "notice.renderer_left_out.videos_one": "حُذف مقطع فيديو واحد", + "notice.renderer_left_out.objects_pictured": "كائنات مضمّنة رُسمت من صورها المحفوظة: {0}", + "notice.renderer_left_out.objects_pictured_one": "رُسم كائن مضمّن واحد من صورته المحفوظة", + "notice.renderer_left_out.formulas": "صيغ كُتبت نصًا عاديًا: {0}", + "notice.renderer_left_out.formulas_one": "كُتبت صيغة واحدة نصًا عاديًا", + "notice.renderer_left_out.vertical_text": "وُضع النص العمودي أفقيًا", + "notice.renderer_left_out.more": "وغير ذلك", "engine.reason.not_installed": "غير مثبّت", "engine.reason.error": "خطأ أثناء التحقق", "engine.reason.unsupported_platform": "غير متاح على هذا النظام", diff --git a/src/Filee.App/Assets/i18n/bn-BD.json b/src/Filee.App/Assets/i18n/bn-BD.json index c147332bb..61f58d739 100644 --- a/src/Filee.App/Assets/i18n/bn-BD.json +++ b/src/Filee.App/Assets/i18n/bn-BD.json @@ -246,6 +246,25 @@ "notice.geo_shapefile_split": "একটি Shapefile-এ এক ধরনের আকৃতি থাকে, তাই পয়েন্ট, রেখা ও বহুভুজ আলাদা ফাইল হিসেবে সংরক্ষণ করা হয়েছে", "notice.geo_heights_dropped": "কিছু পয়েন্টের কোনো উচ্চতা নেই এবং Shapefile একটি বাদ দিতে পারে না, তাই সব উচ্চতা বাদ দেওয়া হয়েছে", "notice.osm_incomplete": "কিছু রেখা ও এলাকা এমন পয়েন্ট ব্যবহার করে যা ফাইলে নেই (কেটে নেওয়া অংশ), তাই সেগুলো বাদ দেওয়া হয়েছে", + "notice.renderer_left_out": "Filee রেন্ডারার এই ডকুমেন্টের সবকিছু আঁকতে পারেনি: {0}", + "notice.renderer_left_out_libreoffice": "Filee রেন্ডারার এই ডকুমেন্টের সবকিছু আঁকতে পারেনি: {0}. হুবহু কপির জন্য সেটিংস → ইঞ্জিন-এ LibreOffice ইনস্টল করুন", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0}টি চার্ট বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.charts_one": "1টি চার্ট বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.smartart": "{0}টি SmartArt গ্রাফিক বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.smartart_one": "1টি SmartArt গ্রাফিক বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.objects": "{0}টি এমবেড করা অবজেক্ট বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.objects_one": "1টি এমবেড করা অবজেক্ট বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.form_controls": "{0}টি ফর্ম কন্ট্রোল বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.form_controls_one": "1টি ফর্ম কন্ট্রোল বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.videos": "{0}টি ভিডিও বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.videos_one": "1টি ভিডিও বাদ দেওয়া হয়েছে", + "notice.renderer_left_out.objects_pictured": "{0}টি এমবেড করা অবজেক্ট তাদের সংরক্ষিত ছবি থেকে আঁকা হয়েছে", + "notice.renderer_left_out.objects_pictured_one": "1টি এমবেড করা অবজেক্ট তার সংরক্ষিত ছবি থেকে আঁকা হয়েছে", + "notice.renderer_left_out.formulas": "{0}টি সূত্র সাধারণ লেখা হিসেবে লেখা হয়েছে", + "notice.renderer_left_out.formulas_one": "1টি সূত্র সাধারণ লেখা হিসেবে লেখা হয়েছে", + "notice.renderer_left_out.vertical_text": "খাড়া লেখা আড়াআড়ি বসানো হয়েছে", + "notice.renderer_left_out.more": "আরও কিছু", "engine.reason.not_installed": "ইনস্টল করা নেই", "engine.reason.error": "যাচাই করার সময় ত্রুটি", "engine.reason.unsupported_platform": "এই প্ল্যাটফর্মে উপলব্ধ নয়", diff --git a/src/Filee.App/Assets/i18n/de.json b/src/Filee.App/Assets/i18n/de.json index d83b0e944..a43119873 100644 --- a/src/Filee.App/Assets/i18n/de.json +++ b/src/Filee.App/Assets/i18n/de.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "Ein Shapefile enthält nur einen Geometrietyp. Punkte, Linien und Polygone wurden deshalb in getrennten Dateien gespeichert", "notice.geo_heights_dropped": "Einige Punkte haben keine Höhe, und ein Shapefile kann sie nicht einzeln weglassen. Deshalb wurden alle Höhen weggelassen", "notice.osm_incomplete": "Einige Linien und Flächen nutzen Punkte, die nicht in der Datei sind (ein zugeschnittener Ausschnitt), und wurden weggelassen", + "notice.renderer_left_out": "Der Filee-Renderer konnte nicht alles in diesem Dokument zeichnen: {0}", + "notice.renderer_left_out_libreoffice": "Der Filee-Renderer konnte nicht alles in diesem Dokument zeichnen: {0}. Installiere LibreOffice unter Einstellungen → Module für eine originalgetreue Kopie", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} Diagramme weggelassen", + "notice.renderer_left_out.charts_one": "1 Diagramm weggelassen", + "notice.renderer_left_out.smartart": "{0} SmartArt-Grafiken weggelassen", + "notice.renderer_left_out.smartart_one": "1 SmartArt-Grafik weggelassen", + "notice.renderer_left_out.objects": "{0} eingebettete Objekte weggelassen", + "notice.renderer_left_out.objects_one": "1 eingebettetes Objekt weggelassen", + "notice.renderer_left_out.form_controls": "{0} Formularsteuerelemente weggelassen", + "notice.renderer_left_out.form_controls_one": "1 Formularsteuerelement weggelassen", + "notice.renderer_left_out.videos": "{0} Videos weggelassen", + "notice.renderer_left_out.videos_one": "1 Video weggelassen", + "notice.renderer_left_out.objects_pictured": "{0} eingebettete Objekte aus ihrem gespeicherten Bild gezeichnet", + "notice.renderer_left_out.objects_pictured_one": "1 eingebettetes Objekt aus seinem gespeicherten Bild gezeichnet", + "notice.renderer_left_out.formulas": "{0} Formeln als einfacher Text geschrieben", + "notice.renderer_left_out.formulas_one": "1 Formel als einfacher Text geschrieben", + "notice.renderer_left_out.vertical_text": "senkrechter Text waagerecht gesetzt", + "notice.renderer_left_out.more": "und mehr", "engine.reason.not_installed": "Nicht installiert", "engine.reason.error": "Fehler bei der Prüfung", "engine.reason.unsupported_platform": "Auf dieser Plattform nicht verfügbar", diff --git a/src/Filee.App/Assets/i18n/en.json b/src/Filee.App/Assets/i18n/en.json index 36cac182a..66a3b2bae 100644 --- a/src/Filee.App/Assets/i18n/en.json +++ b/src/Filee.App/Assets/i18n/en.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "A Shapefile holds one kind of shape, so points, lines and polygons were saved as separate files", "notice.geo_heights_dropped": "Some points have no height and a Shapefile can't leave one out, so all heights were left out", "notice.osm_incomplete": "Some lines and areas use points that aren't in the file (a cut-out extract) and were left out", + "notice.renderer_left_out": "The Filee renderer couldn't draw all of this document: {0}", + "notice.renderer_left_out_libreoffice": "The Filee renderer couldn't draw all of this document: {0}. Install LibreOffice in Settings → Engines for a faithful copy", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} charts left out", + "notice.renderer_left_out.charts_one": "1 chart left out", + "notice.renderer_left_out.smartart": "{0} SmartArt graphics left out", + "notice.renderer_left_out.smartart_one": "1 SmartArt graphic left out", + "notice.renderer_left_out.objects": "{0} embedded objects left out", + "notice.renderer_left_out.objects_one": "1 embedded object left out", + "notice.renderer_left_out.form_controls": "{0} form controls left out", + "notice.renderer_left_out.form_controls_one": "1 form control left out", + "notice.renderer_left_out.videos": "{0} videos left out", + "notice.renderer_left_out.videos_one": "1 video left out", + "notice.renderer_left_out.objects_pictured": "{0} embedded objects drawn from their saved pictures", + "notice.renderer_left_out.objects_pictured_one": "1 embedded object drawn from its saved picture", + "notice.renderer_left_out.formulas": "{0} formulas written as plain text", + "notice.renderer_left_out.formulas_one": "1 formula written as plain text", + "notice.renderer_left_out.vertical_text": "vertical text set horizontally", + "notice.renderer_left_out.more": "and more", "engine.reason.not_installed": "Not installed", "engine.reason.error": "Error while checking", diff --git a/src/Filee.App/Assets/i18n/es.json b/src/Filee.App/Assets/i18n/es.json index 09354bb94..981a77e3c 100644 --- a/src/Filee.App/Assets/i18n/es.json +++ b/src/Filee.App/Assets/i18n/es.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "Un Shapefile guarda un solo tipo de forma, así que puntos, líneas y polígonos se guardaron en archivos separados", "notice.geo_heights_dropped": "Algunos puntos no tienen altura y Shapefile no puede omitirla en uno solo, así que se omitieron todas las alturas", "notice.osm_incomplete": "Algunas líneas y áreas usan puntos que no están en el archivo (un recorte del mapa) y se omitieron", + "notice.renderer_left_out": "El renderizador de Filee no pudo dibujar todo este documento: {0}", + "notice.renderer_left_out_libreoffice": "El renderizador de Filee no pudo dibujar todo este documento: {0}. Instala LibreOffice en Ajustes → Motores para obtener una copia fiel", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} gráficos omitidos", + "notice.renderer_left_out.charts_one": "1 gráfico omitido", + "notice.renderer_left_out.smartart": "{0} gráficos SmartArt omitidos", + "notice.renderer_left_out.smartart_one": "1 gráfico SmartArt omitido", + "notice.renderer_left_out.objects": "{0} objetos incrustados omitidos", + "notice.renderer_left_out.objects_one": "1 objeto incrustado omitido", + "notice.renderer_left_out.form_controls": "{0} controles de formulario omitidos", + "notice.renderer_left_out.form_controls_one": "1 control de formulario omitido", + "notice.renderer_left_out.videos": "{0} vídeos omitidos", + "notice.renderer_left_out.videos_one": "1 vídeo omitido", + "notice.renderer_left_out.objects_pictured": "{0} objetos incrustados dibujados a partir de su imagen guardada", + "notice.renderer_left_out.objects_pictured_one": "1 objeto incrustado dibujado a partir de su imagen guardada", + "notice.renderer_left_out.formulas": "{0} fórmulas escritas como texto sin formato", + "notice.renderer_left_out.formulas_one": "1 fórmula escrita como texto sin formato", + "notice.renderer_left_out.vertical_text": "texto vertical colocado en horizontal", + "notice.renderer_left_out.more": "y más", "engine.reason.not_installed": "No instalado", "engine.reason.error": "Error al comprobar", "engine.reason.unsupported_platform": "No disponible en esta plataforma", diff --git a/src/Filee.App/Assets/i18n/fa.json b/src/Filee.App/Assets/i18n/fa.json index 35f04486c..2eb60c118 100644 --- a/src/Filee.App/Assets/i18n/fa.json +++ b/src/Filee.App/Assets/i18n/fa.json @@ -246,6 +246,25 @@ "notice.geo_shapefile_split": "یک فایل Shapefile تنها یک نوع شکل هندسی را نگه می‌دارد، بنابراین نقاط، خطوط و چندضلعی‌ها در فایل‌های جداگانه ذخیره شدند", "notice.geo_heights_dropped": "برخی نقاط ارتفاع ندارند و در Shapefile نمی‌توان ارتفاع را خالی گذاشت، بنابراین تمام مقادیر ارتفاع حذف شدند", "notice.osm_incomplete": "برخی خطوط و محدوده‌ها از نقاطی استفاده می‌کنند که در فایل نیستند (یک برش از نقشه)، بنابراین حذف شدند", + "notice.renderer_left_out": "رندرکننده Filee نتوانست همه این سند را رسم کند: {0}", + "notice.renderer_left_out_libreoffice": "رندرکننده Filee نتوانست همه این سند را رسم کند: {0}. برای نسخه‌ای وفادار به اصل، LibreOffice را در تنظیمات ← موتورها نصب کنید", + "notice.renderer_left_out.separator": "، ", + "notice.renderer_left_out.charts": "{0} نمودار حذف شد", + "notice.renderer_left_out.charts_one": "یک نمودار حذف شد", + "notice.renderer_left_out.smartart": "{0} گرافیک SmartArt حذف شد", + "notice.renderer_left_out.smartart_one": "یک گرافیک SmartArt حذف شد", + "notice.renderer_left_out.objects": "{0} شیء جاسازی‌شده حذف شد", + "notice.renderer_left_out.objects_one": "یک شیء جاسازی‌شده حذف شد", + "notice.renderer_left_out.form_controls": "{0} کنترل فرم حذف شد", + "notice.renderer_left_out.form_controls_one": "یک کنترل فرم حذف شد", + "notice.renderer_left_out.videos": "{0} ویدیو حذف شد", + "notice.renderer_left_out.videos_one": "یک ویدیو حذف شد", + "notice.renderer_left_out.objects_pictured": "{0} شیء جاسازی‌شده از تصویر ذخیره‌شده‌اش رسم شد", + "notice.renderer_left_out.objects_pictured_one": "یک شیء جاسازی‌شده از تصویر ذخیره‌شده‌اش رسم شد", + "notice.renderer_left_out.formulas": "{0} فرمول به‌صورت متن ساده نوشته شد", + "notice.renderer_left_out.formulas_one": "یک فرمول به‌صورت متن ساده نوشته شد", + "notice.renderer_left_out.vertical_text": "متن عمودی افقی چیده شد", + "notice.renderer_left_out.more": "و موارد دیگر", "engine.reason.not_installed": "نصب نشده است", "engine.reason.error": "خطا در بررسی", "engine.reason.unsupported_platform": "روی این پلتفرم در دسترس نیست", diff --git a/src/Filee.App/Assets/i18n/fr.json b/src/Filee.App/Assets/i18n/fr.json index ce3260063..289c11f6a 100644 --- a/src/Filee.App/Assets/i18n/fr.json +++ b/src/Filee.App/Assets/i18n/fr.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Un Shapefile ne contient qu'un type de forme : les points, lignes et polygones ont été enregistrés dans des fichiers distincts", "notice.geo_heights_dropped": "Certains points n'ont pas de hauteur et Shapefile ne peut pas en omettre une seule : toutes les hauteurs ont donc été omises", "notice.osm_incomplete": "Certaines lignes et surfaces utilisent des points absents du fichier (un extrait découpé) : elles ont été omises", + "notice.renderer_left_out": "Le moteur de rendu Filee n'a pas pu dessiner tout ce document : {0}", + "notice.renderer_left_out_libreoffice": "Le moteur de rendu Filee n'a pas pu dessiner tout ce document : {0}. Installez LibreOffice dans Paramètres → Moteurs pour une copie fidèle", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} graphiques omis", + "notice.renderer_left_out.charts_one": "1 graphique omis", + "notice.renderer_left_out.smartart": "{0} graphiques SmartArt omis", + "notice.renderer_left_out.smartart_one": "1 graphique SmartArt omis", + "notice.renderer_left_out.objects": "{0} objets incorporés omis", + "notice.renderer_left_out.objects_one": "1 objet incorporé omis", + "notice.renderer_left_out.form_controls": "{0} contrôles de formulaire omis", + "notice.renderer_left_out.form_controls_one": "1 contrôle de formulaire omis", + "notice.renderer_left_out.videos": "{0} vidéos omises", + "notice.renderer_left_out.videos_one": "1 vidéo omise", + "notice.renderer_left_out.objects_pictured": "{0} objets incorporés dessinés d'après leur image enregistrée", + "notice.renderer_left_out.objects_pictured_one": "1 objet incorporé dessiné d'après son image enregistrée", + "notice.renderer_left_out.formulas": "{0} formules écrites en texte brut", + "notice.renderer_left_out.formulas_one": "1 formule écrite en texte brut", + "notice.renderer_left_out.vertical_text": "texte vertical mis à l'horizontale", + "notice.renderer_left_out.more": "et plus", "engine.reason.not_installed": "Non installé", "engine.reason.error": "Erreur lors de la vérification", diff --git a/src/Filee.App/Assets/i18n/hi.json b/src/Filee.App/Assets/i18n/hi.json index 065e6357a..afade73cc 100644 --- a/src/Filee.App/Assets/i18n/hi.json +++ b/src/Filee.App/Assets/i18n/hi.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "Shapefile में एक ही तरह का आकार रहता है, इसलिए पॉइंट, लाइन और पॉलीगॉन अलग-अलग फ़ाइलों में सहेजे गए", "notice.geo_heights_dropped": "कुछ बिंदुओं की ऊँचाई नहीं है और Shapefile किसी एक की ऊँचाई खाली नहीं छोड़ सकता, इसलिए सभी ऊँचाइयाँ हटा दी गईं", "notice.osm_incomplete": "कुछ लाइनें और क्षेत्र ऐसे पॉइंट इस्तेमाल करते हैं जो फ़ाइल में नहीं हैं (काटा गया हिस्सा), इसलिए उन्हें हटा दिया गया", + "notice.renderer_left_out": "Filee रेंडरर इस दस्तावेज़ का सब कुछ नहीं बना सका: {0}", + "notice.renderer_left_out_libreoffice": "Filee रेंडरर इस दस्तावेज़ का सब कुछ नहीं बना सका: {0}. हूबहू कॉपी के लिए सेटिंग्स → इंजन में LibreOffice इंस्टॉल करें", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} चार्ट छोड़ दिए गए", + "notice.renderer_left_out.charts_one": "1 चार्ट छोड़ दिया गया", + "notice.renderer_left_out.smartart": "{0} SmartArt ग्राफ़िक छोड़ दिए गए", + "notice.renderer_left_out.smartart_one": "1 SmartArt ग्राफ़िक छोड़ दिया गया", + "notice.renderer_left_out.objects": "{0} एम्बेड किए गए ऑब्जेक्ट छोड़ दिए गए", + "notice.renderer_left_out.objects_one": "1 एम्बेड किया गया ऑब्जेक्ट छोड़ दिया गया", + "notice.renderer_left_out.form_controls": "{0} फ़ॉर्म कंट्रोल छोड़ दिए गए", + "notice.renderer_left_out.form_controls_one": "1 फ़ॉर्म कंट्रोल छोड़ दिया गया", + "notice.renderer_left_out.videos": "{0} वीडियो छोड़ दिए गए", + "notice.renderer_left_out.videos_one": "1 वीडियो छोड़ दिया गया", + "notice.renderer_left_out.objects_pictured": "{0} एम्बेड किए गए ऑब्जेक्ट उनकी सहेजी गई तस्वीर से बनाए गए", + "notice.renderer_left_out.objects_pictured_one": "1 एम्बेड किया गया ऑब्जेक्ट उसकी सहेजी गई तस्वीर से बनाया गया", + "notice.renderer_left_out.formulas": "{0} सूत्र सादे टेक्स्ट के रूप में लिखे गए", + "notice.renderer_left_out.formulas_one": "1 सूत्र सादे टेक्स्ट के रूप में लिखा गया", + "notice.renderer_left_out.vertical_text": "खड़ा टेक्स्ट आड़ा रखा गया", + "notice.renderer_left_out.more": "और भी", "engine.reason.not_installed": "इंस्टॉल नहीं है", "engine.reason.error": "जाँच के दौरान त्रुटि", "engine.reason.unsupported_platform": "इस प्लेटफ़ॉर्म पर उपलब्ध नहीं है", diff --git a/src/Filee.App/Assets/i18n/id.json b/src/Filee.App/Assets/i18n/id.json index e20de5552..c47b231c2 100644 --- a/src/Filee.App/Assets/i18n/id.json +++ b/src/Filee.App/Assets/i18n/id.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "Shapefile hanya menampung satu jenis bentuk, sehingga titik, garis, dan poligon disimpan sebagai file terpisah", "notice.geo_heights_dropped": "Beberapa titik tidak memiliki ketinggian dan Shapefile tidak dapat mengosongkannya, sehingga semua nilai ketinggian tidak disertakan", "notice.osm_incomplete": "Beberapa garis dan area memakai titik yang tidak ada di file (potongan peta), sehingga tidak disertakan", + "notice.renderer_left_out": "Perender Filee tidak dapat menggambar seluruh dokumen ini: {0}", + "notice.renderer_left_out_libreoffice": "Perender Filee tidak dapat menggambar seluruh dokumen ini: {0}. Pasang LibreOffice di Pengaturan → Engine untuk salinan yang setia", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} diagram tidak disertakan", + "notice.renderer_left_out.charts_one": "1 diagram tidak disertakan", + "notice.renderer_left_out.smartart": "{0} grafik SmartArt tidak disertakan", + "notice.renderer_left_out.smartart_one": "1 grafik SmartArt tidak disertakan", + "notice.renderer_left_out.objects": "{0} objek tersemat tidak disertakan", + "notice.renderer_left_out.objects_one": "1 objek tersemat tidak disertakan", + "notice.renderer_left_out.form_controls": "{0} kontrol formulir tidak disertakan", + "notice.renderer_left_out.form_controls_one": "1 kontrol formulir tidak disertakan", + "notice.renderer_left_out.videos": "{0} video tidak disertakan", + "notice.renderer_left_out.videos_one": "1 video tidak disertakan", + "notice.renderer_left_out.objects_pictured": "{0} objek tersemat digambar dari gambar tersimpannya", + "notice.renderer_left_out.objects_pictured_one": "1 objek tersemat digambar dari gambar tersimpannya", + "notice.renderer_left_out.formulas": "{0} rumus ditulis sebagai teks biasa", + "notice.renderer_left_out.formulas_one": "1 rumus ditulis sebagai teks biasa", + "notice.renderer_left_out.vertical_text": "teks vertikal ditata mendatar", + "notice.renderer_left_out.more": "dan lainnya", "engine.reason.not_installed": "Belum terpasang", "engine.reason.error": "Kesalahan saat memeriksa", "engine.reason.unsupported_platform": "Tidak tersedia di platform ini", diff --git a/src/Filee.App/Assets/i18n/it.json b/src/Filee.App/Assets/i18n/it.json index 3e68c989f..41716ed6b 100644 --- a/src/Filee.App/Assets/i18n/it.json +++ b/src/Filee.App/Assets/i18n/it.json @@ -231,6 +231,25 @@ "notice.geo_shapefile_split": "Uno Shapefile contiene un solo tipo di forma, quindi punti, linee e poligoni sono stati salvati in file separati", "notice.geo_heights_dropped": "Alcuni punti non hanno quota e uno Shapefile non può ometterla, quindi tutte le quote sono state omesse", "notice.osm_incomplete": "Alcune linee e aree usano punti che non sono nel file (un estratto ritagliato) e sono state omesse", +"notice.renderer_left_out": "Il renderer di Filee non è riuscito a disegnare tutto il documento: {0}", +"notice.renderer_left_out_libreoffice": "Il renderer di Filee non è riuscito a disegnare tutto il documento: {0}. Installa LibreOffice in Impostazioni → Motori per una copia fedele", +"notice.renderer_left_out.separator": ", ", +"notice.renderer_left_out.charts": "{0} grafici omessi", +"notice.renderer_left_out.charts_one": "1 grafico omesso", +"notice.renderer_left_out.smartart": "{0} elementi SmartArt omessi", +"notice.renderer_left_out.smartart_one": "1 elemento SmartArt omesso", +"notice.renderer_left_out.objects": "{0} oggetti incorporati omessi", +"notice.renderer_left_out.objects_one": "1 oggetto incorporato omesso", +"notice.renderer_left_out.form_controls": "{0} controlli modulo omessi", +"notice.renderer_left_out.form_controls_one": "1 controllo modulo omesso", +"notice.renderer_left_out.videos": "{0} video omessi", +"notice.renderer_left_out.videos_one": "1 video omesso", +"notice.renderer_left_out.objects_pictured": "{0} oggetti incorporati disegnati dalla loro immagine salvata", +"notice.renderer_left_out.objects_pictured_one": "1 oggetto incorporato disegnato dalla sua immagine salvata", +"notice.renderer_left_out.formulas": "{0} formule scritte come testo semplice", +"notice.renderer_left_out.formulas_one": "1 formula scritta come testo semplice", +"notice.renderer_left_out.vertical_text": "testo verticale reso in orizzontale", +"notice.renderer_left_out.more": "e altro", "engine.reason.not_installed": "Non installato", "engine.reason.error": "Errore durante la verifica", "engine.reason.unsupported_platform": "Non disponibile su questa piattaforma", diff --git a/src/Filee.App/Assets/i18n/ja.json b/src/Filee.App/Assets/i18n/ja.json index 4e36d11ac..24ee0c8da 100644 --- a/src/Filee.App/Assets/i18n/ja.json +++ b/src/Filee.App/Assets/i18n/ja.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "Shapefileには1種類の図形しか入らないため、ポイント、ライン、ポリゴンを別々のファイルに保存しました", "notice.geo_heights_dropped": "高さが記録されていない点があり、Shapefileでは一部の高さだけ省けないため、すべての高さを省きました", "notice.osm_incomplete": "ファイルにない点を使うラインやエリアがあったため(切り出したデータ)、それらを省きました", + "notice.renderer_left_out": "Fileeレンダラーでは、この文書の一部を描画できませんでした:{0}", + "notice.renderer_left_out_libreoffice": "Fileeレンダラーでは、この文書の一部を描画できませんでした:{0}。忠実に変換するには「設定」→「変換エンジン」で LibreOffice をインストールしてください", + "notice.renderer_left_out.separator": "、", + "notice.renderer_left_out.charts": "グラフ {0} 個を省略", + "notice.renderer_left_out.charts_one": "グラフ 1 個を省略", + "notice.renderer_left_out.smartart": "SmartArt {0} 個を省略", + "notice.renderer_left_out.smartart_one": "SmartArt 1 個を省略", + "notice.renderer_left_out.objects": "埋め込みオブジェクト {0} 個を省略", + "notice.renderer_left_out.objects_one": "埋め込みオブジェクト 1 個を省略", + "notice.renderer_left_out.form_controls": "フォームコントロール {0} 個を省略", + "notice.renderer_left_out.form_controls_one": "フォームコントロール 1 個を省略", + "notice.renderer_left_out.videos": "動画 {0} 本を省略", + "notice.renderer_left_out.videos_one": "動画 1 本を省略", + "notice.renderer_left_out.objects_pictured": "埋め込みオブジェクト {0} 個を保存済みの画像で描画", + "notice.renderer_left_out.objects_pictured_one": "埋め込みオブジェクト 1 個を保存済みの画像で描画", + "notice.renderer_left_out.formulas": "数式 {0} 個をプレーンテキストで表示", + "notice.renderer_left_out.formulas_one": "数式 1 個をプレーンテキストで表示", + "notice.renderer_left_out.vertical_text": "縦書きを横書きで表示", + "notice.renderer_left_out.more": "ほか", "engine.reason.not_installed": "未インストール", "engine.reason.error": "確認中にエラーが発生しました", "engine.reason.unsupported_platform": "このプラットフォームでは利用できません", diff --git a/src/Filee.App/Assets/i18n/ko.json b/src/Filee.App/Assets/i18n/ko.json index 353fd8d9c..4bb97cb8f 100644 --- a/src/Filee.App/Assets/i18n/ko.json +++ b/src/Filee.App/Assets/i18n/ko.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Shapefile은 한 종류의 도형만 담아서 점·선·면을 파일로 나눠 저장했어요", "notice.geo_heights_dropped": "일부 점에 높이가 없는데 Shapefile은 점마다 비워 둘 수 없어서 높이를 모두 뺐어요", "notice.osm_incomplete": "파일에 없는 점을 쓰는 선과 영역이 있어서(잘라 낸 지역) 뺐어요", + "notice.renderer_left_out": "Filee 렌더러가 이 문서를 다 그리지 못했어요: {0}", + "notice.renderer_left_out_libreoffice": "Filee 렌더러가 이 문서를 다 그리지 못했어요: {0}. 원본 그대로 변환하려면 설정 → 변환 엔진에서 LibreOffice를 설치하세요", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "차트 {0}개 빠짐", + "notice.renderer_left_out.charts_one": "차트 1개 빠짐", + "notice.renderer_left_out.smartart": "SmartArt {0}개 빠짐", + "notice.renderer_left_out.smartart_one": "SmartArt 1개 빠짐", + "notice.renderer_left_out.objects": "삽입된 개체 {0}개 빠짐", + "notice.renderer_left_out.objects_one": "삽입된 개체 1개 빠짐", + "notice.renderer_left_out.form_controls": "양식 컨트롤 {0}개 빠짐", + "notice.renderer_left_out.form_controls_one": "양식 컨트롤 1개 빠짐", + "notice.renderer_left_out.videos": "동영상 {0}개 빠짐", + "notice.renderer_left_out.videos_one": "동영상 1개 빠짐", + "notice.renderer_left_out.objects_pictured": "삽입된 개체 {0}개는 저장된 그림으로 그림", + "notice.renderer_left_out.objects_pictured_one": "삽입된 개체 1개는 저장된 그림으로 그림", + "notice.renderer_left_out.formulas": "수식 {0}개는 일반 글자로 씀", + "notice.renderer_left_out.formulas_one": "수식 1개는 일반 글자로 씀", + "notice.renderer_left_out.vertical_text": "세로쓰기는 가로로 씀", + "notice.renderer_left_out.more": "그 밖에 더 있음", "engine.reason.not_installed": "설치되지 않음", "engine.reason.error": "확인 중 오류", diff --git a/src/Filee.App/Assets/i18n/mn.json b/src/Filee.App/Assets/i18n/mn.json index ce7ad5a93..191c4fa47 100644 --- a/src/Filee.App/Assets/i18n/mn.json +++ b/src/Filee.App/Assets/i18n/mn.json @@ -231,6 +231,25 @@ "notice.geo_shapefile_split": "Shapefile нь зөвхөн нэг төрлийн дүрс агуулдаг тул цэг, шугам, олон өнцөгтийг тусдаа файл болгон хадгаллаа", "notice.geo_heights_dropped": "Зарим цэгт өндрийн утга байхгүй бөгөөд Shapefile нэгийг нь ч орхиж чаддаггүй тул бүх өндрийн утгыг хаслаа", "notice.osm_incomplete": "Зарим шугам болон талбай нь файлд байхгүй цэгүүдийг (хайчилж авсан хэсэг) ашигласан тул орхигдлоо", + "notice.renderer_left_out": "Filee буулгагч энэ баримтыг бүтэн зурж чадсангүй: {0}", + "notice.renderer_left_out_libreoffice": "Filee буулгагч энэ баримтыг бүтэн зурж чадсангүй: {0}. Эх хувьтай ижил хуулбар авахын тулд Тохиргоо → Хөдөлгүүрүүд хэсгээс LibreOffice суулгана уу", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} график орхигдлоо", + "notice.renderer_left_out.charts_one": "1 график орхигдлоо", + "notice.renderer_left_out.smartart": "{0} SmartArt график орхигдлоо", + "notice.renderer_left_out.smartart_one": "1 SmartArt график орхигдлоо", + "notice.renderer_left_out.objects": "{0} шигтгэсэн объект орхигдлоо", + "notice.renderer_left_out.objects_one": "1 шигтгэсэн объект орхигдлоо", + "notice.renderer_left_out.form_controls": "{0} маягтын удирдлага орхигдлоо", + "notice.renderer_left_out.form_controls_one": "1 маягтын удирдлага орхигдлоо", + "notice.renderer_left_out.videos": "{0} видео орхигдлоо", + "notice.renderer_left_out.videos_one": "1 видео орхигдлоо", + "notice.renderer_left_out.objects_pictured": "{0} шигтгэсэн объектыг хадгалсан зургаас нь зурлаа", + "notice.renderer_left_out.objects_pictured_one": "1 шигтгэсэн объектыг хадгалсан зургаас нь зурлаа", + "notice.renderer_left_out.formulas": "{0} томьёог энгийн текстээр бичлээ", + "notice.renderer_left_out.formulas_one": "1 томьёог энгийн текстээр бичлээ", + "notice.renderer_left_out.vertical_text": "босоо текстийг хэвтээгээр байрлууллаа", + "notice.renderer_left_out.more": "болон бусад", "engine.reason.not_installed": "Суулгаагүй", "engine.reason.error": "Шалгах үед алдаа гарлаа", "engine.reason.unsupported_platform": "Энэ платформ дээр боломжгүй", diff --git a/src/Filee.App/Assets/i18n/ne.json b/src/Filee.App/Assets/i18n/ne.json index 702f571d7..6fe76091c 100644 --- a/src/Filee.App/Assets/i18n/ne.json +++ b/src/Filee.App/Assets/i18n/ne.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "Shapefile मा एक प्रकारको आकार मात्र रहन्छ, त्यसैले पोइन्ट, रेखा र पोलिगनहरू छुट्टाछुट्टै फाइलमा सुरक्षित गरिए", "notice.geo_heights_dropped": "केही बिन्दुमा उचाइ छैन र Shapefile ले कुनै एउटाको उचाइ मात्र खाली राख्न सक्दैन, त्यसैले सबै उचाइ हटाइए", "notice.osm_incomplete": "केही रेखा र क्षेत्रले फाइलमा नभएका बिन्दु प्रयोग गर्छन् (काटिएको भाग), त्यसैले ती हटाइए", + "notice.renderer_left_out": "Filee रेन्डररले यो कागजातको सबै भाग कोर्न सकेन: {0}", + "notice.renderer_left_out_libreoffice": "Filee रेन्डररले यो कागजातको सबै भाग कोर्न सकेन: {0}. मूलजस्तै प्रतिलिपिका लागि सेटिङहरू → इन्जिनहरूमा LibreOffice स्थापना गर्नुहोस्", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} चार्ट छोडिए", + "notice.renderer_left_out.charts_one": "1 चार्ट छोडियो", + "notice.renderer_left_out.smartart": "{0} SmartArt ग्राफिक छोडिए", + "notice.renderer_left_out.smartart_one": "1 SmartArt ग्राफिक छोडियो", + "notice.renderer_left_out.objects": "{0} सम्मिलित वस्तु छोडिए", + "notice.renderer_left_out.objects_one": "1 सम्मिलित वस्तु छोडियो", + "notice.renderer_left_out.form_controls": "{0} फारम नियन्त्रण छोडिए", + "notice.renderer_left_out.form_controls_one": "1 फारम नियन्त्रण छोडियो", + "notice.renderer_left_out.videos": "{0} भिडियो छोडिए", + "notice.renderer_left_out.videos_one": "1 भिडियो छोडियो", + "notice.renderer_left_out.objects_pictured": "{0} सम्मिलित वस्तु तिनको सुरक्षित चित्रबाट कोरिए", + "notice.renderer_left_out.objects_pictured_one": "1 सम्मिलित वस्तु यसको सुरक्षित चित्रबाट कोरियो", + "notice.renderer_left_out.formulas": "{0} सूत्र सादा पाठका रूपमा लेखिए", + "notice.renderer_left_out.formulas_one": "1 सूत्र सादा पाठका रूपमा लेखियो", + "notice.renderer_left_out.vertical_text": "ठाडो पाठ तेर्सो राखियो", + "notice.renderer_left_out.more": "र अन्य", "engine.reason.not_installed": "स्थापना गरिएको छैन", "engine.reason.error": "जाँच गर्दा त्रुटि भयो", "engine.reason.unsupported_platform": "यस प्लेटफर्ममा उपलब्ध छैन", diff --git a/src/Filee.App/Assets/i18n/pl.json b/src/Filee.App/Assets/i18n/pl.json index 543ec3061..af5494ef7 100644 --- a/src/Filee.App/Assets/i18n/pl.json +++ b/src/Filee.App/Assets/i18n/pl.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Shapefile przechowuje jeden rodzaj kształtu, więc punkty, linie i poligony zapisano w osobnych plikach", "notice.geo_heights_dropped": "Niektóre punkty nie mają wysokości, a Shapefile nie może pominąć tylko jednej, więc pominięto wszystkie wysokości", "notice.osm_incomplete": "Niektóre linie i obszary używają punktów, których nie ma w pliku (wycięty fragment), więc je pominięto", + "notice.renderer_left_out": "Renderer Filee nie zdołał narysować całego dokumentu: {0}", + "notice.renderer_left_out_libreoffice": "Renderer Filee nie zdołał narysować całego dokumentu: {0}. Aby uzyskać wierną kopię, zainstaluj LibreOffice w Ustawienia → Silniki", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "pominięte wykresy: {0}", + "notice.renderer_left_out.charts_one": "pominięty 1 wykres", + "notice.renderer_left_out.smartart": "pominięte grafiki SmartArt: {0}", + "notice.renderer_left_out.smartart_one": "pominięta 1 grafika SmartArt", + "notice.renderer_left_out.objects": "pominięte obiekty osadzone: {0}", + "notice.renderer_left_out.objects_one": "pominięty 1 obiekt osadzony", + "notice.renderer_left_out.form_controls": "pominięte kontrolki formularza: {0}", + "notice.renderer_left_out.form_controls_one": "pominięta 1 kontrolka formularza", + "notice.renderer_left_out.videos": "pominięte filmy: {0}", + "notice.renderer_left_out.videos_one": "pominięty 1 film", + "notice.renderer_left_out.objects_pictured": "obiekty osadzone narysowane z zapisanych obrazów: {0}", + "notice.renderer_left_out.objects_pictured_one": "1 obiekt osadzony narysowany z zapisanego obrazu", + "notice.renderer_left_out.formulas": "formuły zapisane zwykłym tekstem: {0}", + "notice.renderer_left_out.formulas_one": "1 formuła zapisana zwykłym tekstem", + "notice.renderer_left_out.vertical_text": "tekst pionowy złożony poziomo", + "notice.renderer_left_out.more": "i inne", "engine.reason.not_installed": "Nie zainstalowano", "engine.reason.error": "Błąd podczas sprawdzania", diff --git a/src/Filee.App/Assets/i18n/pt-BR.json b/src/Filee.App/Assets/i18n/pt-BR.json index 8ae062af4..e445f101e 100644 --- a/src/Filee.App/Assets/i18n/pt-BR.json +++ b/src/Filee.App/Assets/i18n/pt-BR.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Um Shapefile guarda um tipo de forma, então pontos, linhas e polígonos foram salvos em arquivos separados", "notice.geo_heights_dropped": "Alguns pontos não têm altura e o Shapefile não pode deixá-la de fora em apenas um, então todas as alturas foram omitidas", "notice.osm_incomplete": "Algumas linhas e áreas usam pontos que não estão no arquivo (um recorte do mapa) e foram omitidas", + "notice.renderer_left_out": "O renderizador do Filee não conseguiu desenhar todo este documento: {0}", + "notice.renderer_left_out_libreoffice": "O renderizador do Filee não conseguiu desenhar todo este documento: {0}. Instale o LibreOffice em Configurações → Motores para uma cópia fiel", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} gráficos deixados de fora", + "notice.renderer_left_out.charts_one": "1 gráfico deixado de fora", + "notice.renderer_left_out.smartart": "{0} elementos gráficos SmartArt deixados de fora", + "notice.renderer_left_out.smartart_one": "1 elemento gráfico SmartArt deixado de fora", + "notice.renderer_left_out.objects": "{0} objetos incorporados deixados de fora", + "notice.renderer_left_out.objects_one": "1 objeto incorporado deixado de fora", + "notice.renderer_left_out.form_controls": "{0} controles de formulário deixados de fora", + "notice.renderer_left_out.form_controls_one": "1 controle de formulário deixado de fora", + "notice.renderer_left_out.videos": "{0} vídeos deixados de fora", + "notice.renderer_left_out.videos_one": "1 vídeo deixado de fora", + "notice.renderer_left_out.objects_pictured": "{0} objetos incorporados desenhados a partir da imagem salva", + "notice.renderer_left_out.objects_pictured_one": "1 objeto incorporado desenhado a partir da imagem salva", + "notice.renderer_left_out.formulas": "{0} fórmulas escritas como texto simples", + "notice.renderer_left_out.formulas_one": "1 fórmula escrita como texto simples", + "notice.renderer_left_out.vertical_text": "texto vertical posto na horizontal", + "notice.renderer_left_out.more": "e mais", "engine.reason.not_installed": "Não instalado", "engine.reason.error": "Erro ao verificar", diff --git a/src/Filee.App/Assets/i18n/pt-PT.json b/src/Filee.App/Assets/i18n/pt-PT.json index 52933c108..5648079ed 100644 --- a/src/Filee.App/Assets/i18n/pt-PT.json +++ b/src/Filee.App/Assets/i18n/pt-PT.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Um Shapefile guarda apenas um tipo de geometria, pelo que os pontos, linhas e polígonos foram guardados em ficheiros separados", "notice.geo_heights_dropped": "Alguns pontos não têm altura e um Shapefile não pode omiti-la apenas em alguns, pelo que todas as alturas foram omitidas", "notice.osm_incomplete": "Algumas linhas e áreas usam pontos que não estão no ficheiro (um recorte do mapa) e foram omitidas", + "notice.renderer_left_out": "O renderizador do Filee não conseguiu desenhar todo este documento: {0}", + "notice.renderer_left_out_libreoffice": "O renderizador do Filee não conseguiu desenhar todo este documento: {0}. Instala o LibreOffice em Definições → Motores para obteres uma cópia fiel", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} gráficos omitidos", + "notice.renderer_left_out.charts_one": "1 gráfico omitido", + "notice.renderer_left_out.smartart": "{0} gráficos SmartArt omitidos", + "notice.renderer_left_out.smartart_one": "1 gráfico SmartArt omitido", + "notice.renderer_left_out.objects": "{0} objetos incorporados omitidos", + "notice.renderer_left_out.objects_one": "1 objeto incorporado omitido", + "notice.renderer_left_out.form_controls": "{0} controlos de formulário omitidos", + "notice.renderer_left_out.form_controls_one": "1 controlo de formulário omitido", + "notice.renderer_left_out.videos": "{0} vídeos omitidos", + "notice.renderer_left_out.videos_one": "1 vídeo omitido", + "notice.renderer_left_out.objects_pictured": "{0} objetos incorporados desenhados a partir da imagem guardada", + "notice.renderer_left_out.objects_pictured_one": "1 objeto incorporado desenhado a partir da imagem guardada", + "notice.renderer_left_out.formulas": "{0} fórmulas escritas como texto simples", + "notice.renderer_left_out.formulas_one": "1 fórmula escrita como texto simples", + "notice.renderer_left_out.vertical_text": "texto vertical colocado na horizontal", + "notice.renderer_left_out.more": "e mais", "engine.reason.not_installed": "Não instalado", "engine.reason.error": "Erro na verificação", diff --git a/src/Filee.App/Assets/i18n/ru.json b/src/Filee.App/Assets/i18n/ru.json index 85140e2e7..c40e284cb 100644 --- a/src/Filee.App/Assets/i18n/ru.json +++ b/src/Filee.App/Assets/i18n/ru.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Shapefile хранит фигуры только одного вида, поэтому точки, линии и полигоны сохранены в отдельные файлы", "notice.geo_heights_dropped": "У некоторых точек нет высоты, а Shapefile не может пропустить высоту только у одной точки, поэтому убраны все высоты", "notice.osm_incomplete": "Некоторые линии и области используют точки, которых нет в файле (вырезанный фрагмент), поэтому они пропущены", + "notice.renderer_left_out": "Рендерер Filee не смог нарисовать весь документ: {0}", + "notice.renderer_left_out_libreoffice": "Рендерер Filee не смог нарисовать весь документ: {0}. Для точной копии установите LibreOffice в разделе Настройки → Движки", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "пропущено диаграмм: {0}", + "notice.renderer_left_out.charts_one": "пропущена 1 диаграмма", + "notice.renderer_left_out.smartart": "пропущено графических элементов SmartArt: {0}", + "notice.renderer_left_out.smartart_one": "пропущен 1 графический элемент SmartArt", + "notice.renderer_left_out.objects": "пропущено внедрённых объектов: {0}", + "notice.renderer_left_out.objects_one": "пропущен 1 внедрённый объект", + "notice.renderer_left_out.form_controls": "пропущено элементов управления формы: {0}", + "notice.renderer_left_out.form_controls_one": "пропущен 1 элемент управления формы", + "notice.renderer_left_out.videos": "пропущено видео: {0}", + "notice.renderer_left_out.videos_one": "пропущено 1 видео", + "notice.renderer_left_out.objects_pictured": "внедрённых объектов нарисовано по сохранённым изображениям: {0}", + "notice.renderer_left_out.objects_pictured_one": "1 внедрённый объект нарисован по сохранённому изображению", + "notice.renderer_left_out.formulas": "формул записано обычным текстом: {0}", + "notice.renderer_left_out.formulas_one": "1 формула записана обычным текстом", + "notice.renderer_left_out.vertical_text": "вертикальный текст набран горизонтально", + "notice.renderer_left_out.more": "и другое", "engine.reason.not_installed": "Не установлен", "engine.reason.error": "Ошибка при проверке", diff --git a/src/Filee.App/Assets/i18n/th.json b/src/Filee.App/Assets/i18n/th.json index 47d2e29a5..ad797dcb4 100644 --- a/src/Filee.App/Assets/i18n/th.json +++ b/src/Filee.App/Assets/i18n/th.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "Shapefile เก็บรูปทรงเรขาคณิตได้ชนิดเดียวต่อไฟล์ จุด เส้น และโพลีกอนจึงถูกบันทึกแยกเป็นคนละไฟล์", "notice.geo_heights_dropped": "บางจุดไม่มีค่าความสูง และ Shapefile เว้นค่าความสูงไว้เพียงจุดเดียวไม่ได้ จึงตัดค่าความสูงทั้งหมดออก", "notice.osm_incomplete": "เส้นและพื้นที่บางส่วนใช้จุดที่ไม่มีอยู่ในไฟล์ (ข้อมูลที่ตัดมาบางส่วน) จึงถูกตัดออก", + "notice.renderer_left_out": "ตัวเรนเดอร์ของ Filee วาดเอกสารนี้ได้ไม่ครบ: {0}", + "notice.renderer_left_out_libreoffice": "ตัวเรนเดอร์ของ Filee วาดเอกสารนี้ได้ไม่ครบ: {0} ติดตั้ง LibreOffice ในการตั้งค่า → เครื่องมือแปลงไฟล์ เพื่อให้ได้สำเนาที่ตรงต้นฉบับ", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "ละแผนภูมิ {0} รายการ", + "notice.renderer_left_out.charts_one": "ละแผนภูมิ 1 รายการ", + "notice.renderer_left_out.smartart": "ละกราฟิก SmartArt {0} รายการ", + "notice.renderer_left_out.smartart_one": "ละกราฟิก SmartArt 1 รายการ", + "notice.renderer_left_out.objects": "ละวัตถุที่ฝังไว้ {0} รายการ", + "notice.renderer_left_out.objects_one": "ละวัตถุที่ฝังไว้ 1 รายการ", + "notice.renderer_left_out.form_controls": "ละตัวควบคุมฟอร์ม {0} รายการ", + "notice.renderer_left_out.form_controls_one": "ละตัวควบคุมฟอร์ม 1 รายการ", + "notice.renderer_left_out.videos": "ละวิดีโอ {0} รายการ", + "notice.renderer_left_out.videos_one": "ละวิดีโอ 1 รายการ", + "notice.renderer_left_out.objects_pictured": "วาดวัตถุที่ฝังไว้ {0} รายการจากรูปที่บันทึกไว้", + "notice.renderer_left_out.objects_pictured_one": "วาดวัตถุที่ฝังไว้ 1 รายการจากรูปที่บันทึกไว้", + "notice.renderer_left_out.formulas": "เขียนสูตร {0} รายการเป็นข้อความธรรมดา", + "notice.renderer_left_out.formulas_one": "เขียนสูตร 1 รายการเป็นข้อความธรรมดา", + "notice.renderer_left_out.vertical_text": "จัดข้อความแนวตั้งเป็นแนวนอน", + "notice.renderer_left_out.more": "และอื่น ๆ", "engine.reason.not_installed": "ยังไม่ได้ติดตั้ง", "engine.reason.error": "เกิดข้อผิดพลาดขณะตรวจสอบ", "engine.reason.unsupported_platform": "ไม่พร้อมใช้งานบนแพลตฟอร์มนี้", diff --git a/src/Filee.App/Assets/i18n/tr.json b/src/Filee.App/Assets/i18n/tr.json index e18ef97c5..0a28ddc25 100644 --- a/src/Filee.App/Assets/i18n/tr.json +++ b/src/Filee.App/Assets/i18n/tr.json @@ -232,6 +232,25 @@ "notice.geo_shapefile_split": "Shapefile tek bir geometri türü tutar; noktalar, çizgiler ve çokgenler ayrı dosyalara kaydedildi", "notice.geo_heights_dropped": "Bazı noktalarda yükseklik yok ve Shapefile tek bir noktanın yüksekliğini boş bırakamıyor; bu nedenle tüm yükseklikler çıkarıldı", "notice.osm_incomplete": "Bazı çizgiler ve alanlar dosyada olmayan noktaları kullanıyor (kırpılmış bir kesit); bu nedenle çıkarıldı", + "notice.renderer_left_out": "Filee işleyicisi bu belgenin tamamını çizemedi: {0}", + "notice.renderer_left_out_libreoffice": "Filee işleyicisi bu belgenin tamamını çizemedi: {0}. Aslına uygun bir kopya için Ayarlar → Dönüştürme motorları'ndan LibreOffice'i yükleyin", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "{0} grafik çıkarıldı", + "notice.renderer_left_out.charts_one": "1 grafik çıkarıldı", + "notice.renderer_left_out.smartart": "{0} SmartArt grafiği çıkarıldı", + "notice.renderer_left_out.smartart_one": "1 SmartArt grafiği çıkarıldı", + "notice.renderer_left_out.objects": "{0} gömülü nesne çıkarıldı", + "notice.renderer_left_out.objects_one": "1 gömülü nesne çıkarıldı", + "notice.renderer_left_out.form_controls": "{0} form denetimi çıkarıldı", + "notice.renderer_left_out.form_controls_one": "1 form denetimi çıkarıldı", + "notice.renderer_left_out.videos": "{0} video çıkarıldı", + "notice.renderer_left_out.videos_one": "1 video çıkarıldı", + "notice.renderer_left_out.objects_pictured": "{0} gömülü nesne kayıtlı resminden çizildi", + "notice.renderer_left_out.objects_pictured_one": "1 gömülü nesne kayıtlı resminden çizildi", + "notice.renderer_left_out.formulas": "{0} formül düz metin olarak yazıldı", + "notice.renderer_left_out.formulas_one": "1 formül düz metin olarak yazıldı", + "notice.renderer_left_out.vertical_text": "dikey metin yatay dizildi", + "notice.renderer_left_out.more": "ve dahası", "engine.reason.not_installed": "Kurulu değil", "engine.reason.error": "Denetim sırasında hata", "engine.reason.unsupported_platform": "Bu platformda kullanılamıyor", diff --git a/src/Filee.App/Assets/i18n/vi.json b/src/Filee.App/Assets/i18n/vi.json index 4ddc2f27d..54b3d126a 100644 --- a/src/Filee.App/Assets/i18n/vi.json +++ b/src/Filee.App/Assets/i18n/vi.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Shapefile chỉ chứa một loại hình, nên điểm, đường và đa giác đã được lưu thành các tệp riêng", "notice.geo_heights_dropped": "Một số điểm không có độ cao mà Shapefile không thể bỏ trống, nên mọi độ cao đã bị bỏ qua", "notice.osm_incomplete": "Một số đường và vùng dùng các điểm không có trong tệp (một vùng cắt ra), nên đã bị bỏ qua", + "notice.renderer_left_out": "Trình kết xuất Filee không vẽ được toàn bộ tài liệu này: {0}", + "notice.renderer_left_out_libreoffice": "Trình kết xuất Filee không vẽ được toàn bộ tài liệu này: {0}. Hãy cài LibreOffice trong Cài đặt → Bộ xử lý để có bản sao đúng với bản gốc", + "notice.renderer_left_out.separator": ", ", + "notice.renderer_left_out.charts": "bỏ qua {0} biểu đồ", + "notice.renderer_left_out.charts_one": "bỏ qua 1 biểu đồ", + "notice.renderer_left_out.smartart": "bỏ qua {0} đồ họa SmartArt", + "notice.renderer_left_out.smartart_one": "bỏ qua 1 đồ họa SmartArt", + "notice.renderer_left_out.objects": "bỏ qua {0} đối tượng nhúng", + "notice.renderer_left_out.objects_one": "bỏ qua 1 đối tượng nhúng", + "notice.renderer_left_out.form_controls": "bỏ qua {0} điều khiển biểu mẫu", + "notice.renderer_left_out.form_controls_one": "bỏ qua 1 điều khiển biểu mẫu", + "notice.renderer_left_out.videos": "bỏ qua {0} video", + "notice.renderer_left_out.videos_one": "bỏ qua 1 video", + "notice.renderer_left_out.objects_pictured": "{0} đối tượng nhúng được vẽ từ ảnh đã lưu của chúng", + "notice.renderer_left_out.objects_pictured_one": "1 đối tượng nhúng được vẽ từ ảnh đã lưu của nó", + "notice.renderer_left_out.formulas": "{0} công thức được viết dưới dạng văn bản thường", + "notice.renderer_left_out.formulas_one": "1 công thức được viết dưới dạng văn bản thường", + "notice.renderer_left_out.vertical_text": "chữ dọc được đặt nằm ngang", + "notice.renderer_left_out.more": "và các mục khác", "engine.reason.not_installed": "Chưa cài đặt", "engine.reason.error": "Lỗi khi kiểm tra", diff --git a/src/Filee.App/Assets/i18n/zh-CN.json b/src/Filee.App/Assets/i18n/zh-CN.json index 95c53c3fd..85714b4b9 100644 --- a/src/Filee.App/Assets/i18n/zh-CN.json +++ b/src/Filee.App/Assets/i18n/zh-CN.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Shapefile 只能保存一种形状,因此点、线、面被分别存成了多个文件", "notice.geo_heights_dropped": "部分点没有高度,而 Shapefile 无法只省略其中一个点的高度,因此已省略所有高度", "notice.osm_incomplete": "部分线和区域用到了文件中没有的点(截取的局部数据),因此已省略", + "notice.renderer_left_out": "Filee 渲染器无法完整绘制此文档:{0}", + "notice.renderer_left_out_libreoffice": "Filee 渲染器无法完整绘制此文档:{0}。要忠实转换,请在 设置 → 转换引擎 中安装 LibreOffice", + "notice.renderer_left_out.separator": "、", + "notice.renderer_left_out.charts": "省略了 {0} 个图表", + "notice.renderer_left_out.charts_one": "省略了 1 个图表", + "notice.renderer_left_out.smartart": "省略了 {0} 个 SmartArt 图形", + "notice.renderer_left_out.smartart_one": "省略了 1 个 SmartArt 图形", + "notice.renderer_left_out.objects": "省略了 {0} 个嵌入对象", + "notice.renderer_left_out.objects_one": "省略了 1 个嵌入对象", + "notice.renderer_left_out.form_controls": "省略了 {0} 个表单控件", + "notice.renderer_left_out.form_controls_one": "省略了 1 个表单控件", + "notice.renderer_left_out.videos": "省略了 {0} 个视频", + "notice.renderer_left_out.videos_one": "省略了 1 个视频", + "notice.renderer_left_out.objects_pictured": "{0} 个嵌入对象按其保存的图片绘制", + "notice.renderer_left_out.objects_pictured_one": "1 个嵌入对象按其保存的图片绘制", + "notice.renderer_left_out.formulas": "{0} 个公式以纯文本显示", + "notice.renderer_left_out.formulas_one": "1 个公式以纯文本显示", + "notice.renderer_left_out.vertical_text": "竖排文字按横排显示", + "notice.renderer_left_out.more": "等", "engine.reason.not_installed": "未安装", "engine.reason.error": "检查时出错", diff --git a/src/Filee.App/Assets/i18n/zh-TW.json b/src/Filee.App/Assets/i18n/zh-TW.json index c1ec53303..63259deb5 100644 --- a/src/Filee.App/Assets/i18n/zh-TW.json +++ b/src/Filee.App/Assets/i18n/zh-TW.json @@ -238,6 +238,25 @@ "notice.geo_shapefile_split": "Shapefile 只能儲存一種形狀,因此點、線、面被分別存成了多個檔案", "notice.geo_heights_dropped": "部分點沒有高度,而 Shapefile 無法只省略其中一個點的高度,因此已省略所有高度", "notice.osm_incomplete": "部分線和區域用到了檔案中沒有的點(擷取的局部資料),因此已省略", + "notice.renderer_left_out": "Filee 轉譯器無法完整繪製此文件:{0}", + "notice.renderer_left_out_libreoffice": "Filee 轉譯器無法完整繪製此文件:{0}。要忠實轉換,請在「設定 → 轉換引擎」中安裝 LibreOffice", + "notice.renderer_left_out.separator": "、", + "notice.renderer_left_out.charts": "略過了 {0} 個圖表", + "notice.renderer_left_out.charts_one": "略過了 1 個圖表", + "notice.renderer_left_out.smartart": "略過了 {0} 個 SmartArt 圖形", + "notice.renderer_left_out.smartart_one": "略過了 1 個 SmartArt 圖形", + "notice.renderer_left_out.objects": "略過了 {0} 個內嵌物件", + "notice.renderer_left_out.objects_one": "略過了 1 個內嵌物件", + "notice.renderer_left_out.form_controls": "略過了 {0} 個表單控制項", + "notice.renderer_left_out.form_controls_one": "略過了 1 個表單控制項", + "notice.renderer_left_out.videos": "略過了 {0} 個影片", + "notice.renderer_left_out.videos_one": "略過了 1 個影片", + "notice.renderer_left_out.objects_pictured": "{0} 個內嵌物件以其儲存的圖片繪製", + "notice.renderer_left_out.objects_pictured_one": "1 個內嵌物件以其儲存的圖片繪製", + "notice.renderer_left_out.formulas": "{0} 個公式以純文字顯示", + "notice.renderer_left_out.formulas_one": "1 個公式以純文字顯示", + "notice.renderer_left_out.vertical_text": "直書文字以橫書顯示", + "notice.renderer_left_out.more": "等", "engine.reason.not_installed": "未安裝", "engine.reason.error": "檢查時出錯", diff --git a/src/Filee.App/Services/PresetAvailability.cs b/src/Filee.App/Services/PresetAvailability.cs index 8ffa643f6..4558bd8d7 100644 --- a/src/Filee.App/Services/PresetAvailability.cs +++ b/src/Filee.App/Services/PresetAvailability.cs @@ -184,8 +184,10 @@ private PresetJudgement Evaluate(Preset preset, IReadOnlyList format { if (formats.Count > 0 && formats.All(format => format.Id == "xlsx")) { - var libreOffice = _catalog.All.FirstOrDefault(converter => converter.Id == "libreoffice"); - if (libreOffice?.GetStatus().IsAvailable == true) + // Filee's own sheet printer prints the studio's pages; LibreOffice only where it's missing. + var printer = _catalog.All.FirstOrDefault(converter => converter.Id is "sheet-print" or "libreoffice" + && converter.GetStatus().IsAvailable); + if (printer is not null) return new(PresetUse.Usable, null); var libreOfficePackage = _packages.FirstOrDefault(item => !item.IsInstalled && item.Package.ConverterIds.Contains("libreoffice")); diff --git a/src/Filee.App/Services/SpreadsheetPrintService.cs b/src/Filee.App/Services/SpreadsheetPrintService.cs index f65b8f67f..6a4a24f19 100644 --- a/src/Filee.App/Services/SpreadsheetPrintService.cs +++ b/src/Filee.App/Services/SpreadsheetPrintService.cs @@ -1,34 +1,82 @@ // The spreadsheet print studio's conversion boundary. Every preview and export is made from a disposable copy of // the workbook, so changing a print area, page size or hidden-row option can never touch the user's original file. +// +// The copy is printed by the same engine as every other spreadsheet → PDF: Filee's own sheet printer +// (SheetPrintConverter), or LibreOffice when Settings → Engines → "Use LibreOffice for spreadsheets → PDF" is on and +// LibreOffice is installed. The printer reads every setting the studio writes into the copy (paper, orientation, +// margins, scale or fit to pages, page order, print area, hidden rows and columns, manual breaks, the one sheet left +// visible) and keeps the sheet's own gridlines, headings, centring and headers / footers. A workbook with what the +// printer doesn't draw yet (charts, text in shapes, form controls: SheetCapabilities) goes to LibreOffice when it is +// installed, as in a normal conversion; without it the pages are printed all the same and the region carries the +// printer's notice, which the studio shows. using Filee.Core.Conversion; using Filee.Core.Presets; +using Filee.Engines.Infrastructure; using Filee.Engines.Office; using Filee.Engines.Office.Sheets; using Filee.Engines.Pdf; namespace Filee.App.Services; -public sealed record SpreadsheetRenderedRegion(string PdfPath, PdfPreviewDocument Preview, string TemporaryDirectory); +/// Localization keys of what the printer said about the region (something left out). +public sealed record SpreadsheetRenderedRegion(string PdfPath, PdfPreviewDocument Preview, string TemporaryDirectory, + IReadOnlyList Notices); + +/// Which engine prints the studio's pages. +public enum SpreadsheetPrintEngine +{ + /// Filee's own sheet printer (SheetPrintConverter): the default. + BuiltIn, + + /// LibreOffice Calc, when chosen for spreadsheets in Settings → Engines and installed. + LibreOffice, +} public sealed class SpreadsheetPrintService(IReadOnlyList converters) { + private readonly SheetPrintConverter? _sheetPrinter = converters.OfType().FirstOrDefault(); private readonly LibreOfficeConverter? _libreOffice = converters.OfType().FirstOrDefault(); private readonly IPdfMerger? _pdfMerger = converters.OfType().FirstOrDefault(); public SpreadsheetWorkbookInfo Inspect(string path) => SpreadsheetPrintInspector.Read(path); - public EngineStatus Status => _libreOffice?.GetStatus() - ?? EngineStatus.Unavailable("engine.reason.not_installed"); + /// The engine the next preview or export uses; null when neither is there. + public SpreadsheetPrintEngine? Engine + { + get + { + var prefer = EngineEnvironment.LibreOfficeForSheets; + // LibreOffice is only looked for when it could be the one. + var libreOffice = (prefer || _sheetPrinter is null) && _libreOffice?.GetStatus().IsAvailable == true; + return Choose(_sheetPrinter is not null, libreOffice, prefer); + } + } + + /// + /// The sheet printer, like the spreadsheet → PDF route: LibreOffice only when the user chose it for spreadsheets + /// () and it is installed, or when there is no sheet printer at all. + /// + internal static SpreadsheetPrintEngine? Choose(bool builtIn, bool libreOffice, bool preferLibreOffice) => + libreOffice && (preferLibreOffice || !builtIn) ? SpreadsheetPrintEngine.LibreOffice + : builtIn ? SpreadsheetPrintEngine.BuiltIn + : null; + + public EngineStatus Status => Engine switch + { + SpreadsheetPrintEngine.BuiltIn => _sheetPrinter!.GetStatus(), + SpreadsheetPrintEngine.LibreOffice => _libreOffice!.GetStatus(), + _ => EngineStatus.Unavailable("engine.reason.not_installed"), + }; public async Task RenderAsync(SpreadsheetWorkbookInfo workbook, SpreadsheetPrintRegion region, CancellationToken cancellationToken = default) { - var (output, folder) = await MakePdfAsync(workbook, region, cancellationToken); + var (output, folder, notices) = await MakePdfAsync(workbook, region, cancellationToken); try { var preview = await Task.Run(() => PdfPreviewDocument.Open(output), cancellationToken); - return new SpreadsheetRenderedRegion(output, preview, folder); + return new SpreadsheetRenderedRegion(output, preview, folder, notices); } catch { @@ -41,12 +89,13 @@ public async Task RenderAsync(SpreadsheetWorkbookInfo /// Renders every region and writes them to as one merged PDF, or, with /// , as one PDF per region named after and the sheet /// (see ), where decides about files already there. Returns - /// the files written; empty when the policy skipped every sheet. + /// the files written; empty when the policy skipped every sheet. hears each notice key + /// the printer gave (once per key). /// public async Task> ExportAsync(SpreadsheetWorkbookInfo workbook, IReadOnlyList regions, string outputPath, bool onePerSheet = false, ConflictPolicy conflict = ConflictPolicy.Rename, IProgress? progress = null, - CancellationToken cancellationToken = default) + Action? notice = null, CancellationToken cancellationToken = default) { if (regions.Count == 0) throw new ArgumentException("At least one region must be exported.", nameof(regions)); @@ -65,13 +114,16 @@ public async Task> ExportAsync(SpreadsheetWorkbookInfo wor return []; } var overwrite = !onePerSheet || conflict == ConflictPolicy.Overwrite; - var rendered = new List<(string PdfPath, string TemporaryDirectory)>(); + var rendered = new List<(string PdfPath, string TemporaryDirectory, IReadOnlyList Notices)>(); var temporaryOutputs = targets.Select(target => target + ".filee-tmp").ToArray(); try { for (var index = 0; index < parts.Count; index++) { - rendered.Add(await MakePdfAsync(workbook, parts[index], cancellationToken)); + var done = index; + var part = progress is null ? null + : new SubProgress(value => progress.Report(0.85 * (done + Math.Clamp(value, 0, 1)) / parts.Count)); + rendered.Add(await MakePdfAsync(workbook, parts[index], cancellationToken, part)); progress?.Report(0.85 * (index + 1) / parts.Count); } foreach (var temporary in temporaryOutputs) @@ -91,6 +143,8 @@ public async Task> ExportAsync(SpreadsheetWorkbookInfo wor // Without Overwrite, a file that appeared there since the names were chosen is never replaced. for (var index = 0; index < targets.Count; index++) File.Move(temporaryOutputs[index], targets[index], overwrite); + foreach (var key in rendered.SelectMany(item => item.Notices).Distinct()) + notice?.Invoke(key); progress?.Report(1); return targets; } @@ -147,23 +201,31 @@ public async Task> ExportAsync(SpreadsheetWorkbookInfo wor return paths; } - private async Task<(string PdfPath, string TemporaryDirectory)> MakePdfAsync(SpreadsheetWorkbookInfo workbook, - SpreadsheetPrintRegion region, CancellationToken cancellationToken) + private async Task<(string PdfPath, string TemporaryDirectory, IReadOnlyList Notices)> MakePdfAsync( + SpreadsheetWorkbookInfo workbook, SpreadsheetPrintRegion region, CancellationToken cancellationToken, + IProgress? progress = null) { - if (_libreOffice is null) - throw new InvalidOperationException("LibreOffice is not available."); + IConverter engine = Engine switch + { + SpreadsheetPrintEngine.BuiltIn => _sheetPrinter!, + SpreadsheetPrintEngine.LibreOffice => _libreOffice!, + _ => throw new InvalidOperationException("No spreadsheet printer is available."), + }; var folder = CreateWorkFolder(); try { var input = Path.Combine(folder, "sheet.xlsx"); var output = Path.Combine(folder, "sheet.pdf"); await Task.Run(() => SpreadsheetPrintPackage.Create(workbook.Path, input, workbook, region), cancellationToken); - var results = await _libreOffice.ConvertAsync(new ConversionStep( + var notices = new List(); + // The original's path names the workbook in the &F / &Z header fields and finds the fonts it lacks. + var results = await engine.ConvertAsync(new ConversionStep( input, "xlsx", "pdf", new Preset { TargetFormat = "pdf" }, - new ExactOutput(output), folder), null, cancellationToken); + new ExactOutput(output), folder, Notice: key => { lock (notices) notices.Add(key); }, + OriginalSourcePath: workbook.Path), progress, cancellationToken); if (results.Count != 1 || !File.Exists(output)) - throw new InvalidOperationException("LibreOffice did not create the requested PDF."); - return (output, folder); + throw new InvalidOperationException($"{engine.DisplayName} did not create the requested PDF."); + return (output, folder, notices); } catch { @@ -199,6 +261,12 @@ private static void TryDelete(string path) catch (UnauthorizedAccessException) { } } + /// Passes a region's progress on as its share of the export, on the thread that reports it. + private sealed class SubProgress(Action report) : IProgress + { + public void Report(double value) => report(value); + } + private sealed class ExactOutput(string path) : IOutputAllocator { public string? Allocate(string extension, string? suffix = null) => path; diff --git a/src/Filee.App/ViewModels/SpreadsheetPrintStudioViewModel.cs b/src/Filee.App/ViewModels/SpreadsheetPrintStudioViewModel.cs index 16890aa9f..a5b08d109 100644 --- a/src/Filee.App/ViewModels/SpreadsheetPrintStudioViewModel.cs +++ b/src/Filee.App/ViewModels/SpreadsheetPrintStudioViewModel.cs @@ -1,5 +1,6 @@ -// State for the Excel → PDF print studio: a non-destructive plan per sheet and previews rendered by the same -// LibreOffice path as the final PDF. +// State for the Excel → PDF print studio: a non-destructive plan per sheet and previews rendered by the same engine +// as the final PDF (Filee's sheet printer, or LibreOffice when chosen: SpreadsheetPrintService). The thumbnail strip +// only renders the pages its list shows (RequestThumbnail). using System.Collections.ObjectModel; using Avalonia.Media.Imaging; @@ -157,8 +158,15 @@ public sealed partial class SpreadsheetPrintStudioViewModel : ObservableObject, private CancellationTokenSource? _pageCancellation; private CancellationTokenSource? _exportCancellation; private SpreadsheetRenderedRegion? _rendered; + private CancellationTokenSource? _thumbnailCancellation; + private readonly List _wantedThumbnails = []; + /// The region whose thumbnails are being rendered; null when none are. + private SpreadsheetRenderedRegion? _thumbnailsFor; private bool _closed; + /// Thumbnails rendered per PDFium document load. + private const int ThumbnailBatch = 8; + public SpreadsheetPrintStudioViewModel(string file, SpreadsheetPrintService service, ILocalizer loc, UserDataStore store, ILogger? log = null) { @@ -213,6 +221,13 @@ public SpreadsheetPrintStudioViewModel(string file, SpreadsheetPrintService serv [ObservableProperty] private double _exportProgress; [ObservableProperty] private bool _onePdfPerSheet; + /// What the printer left out of the previewed or exported pages (charts, …); empty when nothing. + [ObservableProperty] + [NotifyPropertyChangedFor(nameof(HasNotice))] + private string _notice = ""; + + public bool HasNotice => Notice.Length > 0; + public bool CanExport => _workbook is not null && !IsBusy && !IsExporting && Sheets.Any(sheet => sheet.Included); public bool CanRemoveSelectedRegion => SelectedSheet is { } selected && selected.IsAddedRegion; @@ -323,8 +338,10 @@ public async Task ExportAsync(string outputPath) var progress = new Progress(value => ExportProgress = value * 100); // The tool's own output setting, as for every other Filee output; Rename when it was never changed. var conflict = _store.FindPreset(PresetId)?.Output.Conflict ?? ConflictPolicy.Rename; + var notices = new List(); var outputs = await _service.ExportAsync(_workbook, regions, outputPath, onePerSheet, conflict, progress, - _exportCancellation.Token); + notices.Add, _exportCancellation.Token); + Notice = NoticeText(notices); if (outputs.Count == 0) { Status = _loc["toast.skipped"]; @@ -359,7 +376,7 @@ public async Task ExportAsync(string outputPath) catch (Exception ex) when (ex is not OutOfMemoryException) { _log?.LogError(ex, "Could not export spreadsheet print plan for {File}", _workbook.Path); - Status = _loc["error.conversion_failed"]; + Status = FailureStatus(ex); } finally { @@ -373,6 +390,13 @@ public async Task ExportAsync(string outputPath) public void CancelExport() => _exportCancellation?.Cancel(); + /// The usual reasoned error for a refused workbook (too large, too complex), else "conversion failed". + private string FailureStatus(Exception ex) => ex.GetBaseException() is ConversionRefusedException refused + ? FailureText.Reason(_loc, refused.ErrorKey, refused.Detail) + : _loc["error.conversion_failed"]; + + private string NoticeText(IEnumerable keys) => string.Join(" ", keys.Distinct().Select(key => _loc[key])); + private void SchedulePreview() { OnPropertyChanged(nameof(CanExport)); @@ -409,17 +433,19 @@ private async Task PreviewAfterDelayAsync(SpreadsheetSheetPlan sheet, Cancellati ClearPages(); SpreadsheetPrintService.Release(_rendered); _rendered = rendered; + _thumbnailCancellation = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); for (var pageNumber = 1; pageNumber <= rendered.Preview.PageCount; pageNumber++) Pages.Add(new SpreadsheetPreviewPage(pageNumber)); SelectedPage = Pages.FirstOrDefault(); Status = _loc.Format("sheet_studio.page_count", Pages.Count); - await LoadThumbnailsAsync(rendered, cancellationToken); + Notice = NoticeText(rendered.Notices); } catch (OperationCanceledException) { } catch (Exception ex) when (ex is not OutOfMemoryException) { _log?.LogWarning(ex, "Could not render spreadsheet preview for {File}", _file); - Status = _loc["error.conversion_failed"]; + Status = FailureStatus(ex); + Notice = ""; } finally { @@ -454,21 +480,61 @@ private async Task InitializeAsync() } } + /// + /// Asks for the thumbnail of a page the strip shows (its list realised the page's item): a long sheet's hundreds + /// of pages are only rendered as they scroll into view, a few at a time. + /// + public void RequestThumbnail(SpreadsheetPreviewPage page) + { + if (_closed || page.Thumbnail is not null || _rendered is not { } rendered + || _thumbnailCancellation is not { IsCancellationRequested: false } cancellation + || !Pages.Contains(page) || _wantedThumbnails.Contains(page)) + return; + _wantedThumbnails.Add(page); + if (_thumbnailsFor != rendered) + _ = LoadThumbnailsAsync(rendered, cancellation.Token); + } + private async Task LoadThumbnailsAsync(SpreadsheetRenderedRegion rendered, CancellationToken cancellationToken) { - var bitmaps = await Task.Run(() => rendered.Preview.RenderThumbnails(220, cancellationToken).Select(page => - { - using var stream = new MemoryStream(page.Png, writable: false); - return (page.PageNumber, Image: new Bitmap(stream)); - }).ToArray(), cancellationToken); - foreach (var (pageNumber, bitmap) in bitmaps) + _thumbnailsFor = rendered; + try { - if (_closed || cancellationToken.IsCancellationRequested || _rendered != rendered) + while (_wantedThumbnails.Count > 0 && !_closed && !cancellationToken.IsCancellationRequested + && _rendered == rendered) { - bitmap.Dispose(); - continue; + var batch = _wantedThumbnails.Take(ThumbnailBatch).ToArray(); + _wantedThumbnails.RemoveRange(0, batch.Length); + var numbers = batch.Select(page => page.Number).ToArray(); + var bitmaps = await Task.Run(() => rendered.Preview.RenderThumbnails(220, numbers, cancellationToken) + .Select(page => + { + using var stream = new MemoryStream(page.Png, writable: false); + return (page.PageNumber, Image: new Bitmap(stream)); + }).ToArray(), cancellationToken); + foreach (var (pageNumber, bitmap) in bitmaps) + { + if (_closed || cancellationToken.IsCancellationRequested || _rendered != rendered + || batch.FirstOrDefault(page => page.Number == pageNumber) is not { } page || !Pages.Contains(page)) + { + bitmap.Dispose(); + continue; + } + var old = page.Thumbnail; + page.Thumbnail = bitmap; + old?.Dispose(); + } } - Pages.FirstOrDefault(page => page.Number == pageNumber)!.Thumbnail = bitmap; + } + catch (OperationCanceledException) { } + catch (Exception ex) when (ex is not OutOfMemoryException) + { + _log?.LogWarning(ex, "Could not render spreadsheet preview thumbnails for {File}", _file); + } + finally + { + if (_thumbnailsFor == rendered) + _thumbnailsFor = null; } } @@ -516,6 +582,10 @@ private static Task RenderBitmapAsync(Filee.Engines.Pdf.PdfPreviewDocume private void ClearPages() { + _thumbnailCancellation?.Cancel(); + _thumbnailCancellation?.Dispose(); + _thumbnailCancellation = null; + _wantedThumbnails.Clear(); foreach (var page in Pages) page.Dispose(); Pages.Clear(); var preview = PreviewImage; diff --git a/src/Filee.App/Views/SpreadsheetPrintStudioWindow.axaml b/src/Filee.App/Views/SpreadsheetPrintStudioWindow.axaml index ecee7b236..750676f18 100644 --- a/src/Filee.App/Views/SpreadsheetPrintStudioWindow.axaml +++ b/src/Filee.App/Views/SpreadsheetPrintStudioWindow.axaml @@ -1,4 +1,5 @@ - + - - + - + @@ -96,6 +97,8 @@ +