diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index 1d0acb1e..f7837658 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(مثال: 1,3,2 أو 4-8,2,10-12 أو 2n-1) multiTool.title=أداة متعددة PDF multiTool.header=أداة متعددة PDF multiTool.uploadPrompts=اسم الملف - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=عرض PDF viewPdf.header=عرض PDF diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index 4d92ae1f..de9868da 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(напр. 1,3,2 или 4-8,2,10-12 или 2n-1) multiTool.title=PDF Мулти инструмент multiTool.header=PDF Мулти инструмент multiTool.uploadPrompts=Име на файл - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Преглед на PDF viewPdf.header=Преглед на PDF diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index 9820f109..38824767 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -140,7 +140,7 @@ navbar.darkmode=Mode Fosc navbar.language=Idiomes navbar.settings=Opcions navbar.allTools=Eines -navbar.multiTool=Eines Múltiples +navbar.multiTool=Multi Tool navbar.sections.organize=Organitzar navbar.sections.convertTo=Convertir a PDF navbar.sections.convertFrom=Convertir des de PDF @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(p. ex. 1,3,2 o 4-8,2,10-12 o 2n-1) multiTool.title=Eina Multifunció de PDF multiTool.header=Eina Multifunció de PDF multiTool.uploadPrompts=Nom del fitxer - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Visualitza PDF viewPdf.header=Visualitza PDF diff --git a/src/main/resources/messages_cs_CZ.properties b/src/main/resources/messages_cs_CZ.properties index d8282674..e070018d 100644 --- a/src/main/resources/messages_cs_CZ.properties +++ b/src/main/resources/messages_cs_CZ.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(např. 1,3,2 nebo 4-8,2,10-12 nebo 2n-1) multiTool.title=Vícefunkční nástroj pro PDF multiTool.header=Vícefunkční nástroj pro PDF multiTool.uploadPrompts=Název souboru - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Zobrazit PDF viewPdf.header=Zobrazit PDF diff --git a/src/main/resources/messages_da_DK.properties b/src/main/resources/messages_da_DK.properties index 48ad3a9b..ab31b1dd 100644 --- a/src/main/resources/messages_da_DK.properties +++ b/src/main/resources/messages_da_DK.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(f.eks. 1,3,2 eller 4-8,2,10-12 eller 2n-1) multiTool.title=PDF Multi Værktøj multiTool.header=PDF Multi Værktøj multiTool.uploadPrompts=Filnavn - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Se PDF viewPdf.header=Se PDF diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 4a96cc70..62c518ff 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(z.B. 1,3,2 oder 4-8,2,10-12 oder 2n-1) multiTool.title=PDF-Multitool multiTool.header=PDF-Multitool multiTool.uploadPrompts=Dateiname - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=PDF anzeigen viewPdf.header=PDF anzeigen diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index 819ba8e6..924db72a 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(π.χ. 1,3,2 ή 4-8,2,10-12 ή 2n-1) multiTool.title=PDF Πολυεργαλείο multiTool.header=PDF Πολυεργαλείο multiTool.uploadPrompts=Όνομα αρχείου - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Προβολή PDF viewPdf.header=Προβολή PDF diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index ebfce1f5..350f01f5 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) multiTool.title=PDF Multi Tool multiTool.header=PDF Multi Tool multiTool.uploadPrompts=File Name - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=View PDF viewPdf.header=View PDF diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 363e8345..3075c67a 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) multiTool.title=PDF Multi Tool multiTool.header=PDF Multi Tool multiTool.uploadPrompts=File Name - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=View PDF viewPdf.header=View PDF diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index c0af0d0b..229ad2da 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(por ej., 1,3,2 o 4-8,2,10-12 o 2n-1) multiTool.title=Multi-herramienta PDF multiTool.header=Multi-herramienta PDF multiTool.uploadPrompts=Nombre del archivo - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Ver PDF viewPdf.header=Ver PDF diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index a778d12a..3c51172e 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) multiTool.title=PDF erabilera anitzeko tresna multiTool.header=PDF erabilera anitzeko tresna multiTool.uploadPrompts=File Name - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=View PDF viewPdf.header=View PDF diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 93cece6e..1c0be3f2 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(par exemple 1,3,2 ou 4-8,2,10-12 ou 2n-1) multiTool.title=Outil multifonction PDF multiTool.header=Outil multifonction PDF multiTool.uploadPrompts=Nom du fichier - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Visualiser un PDF viewPdf.header=Visualiser un PDF diff --git a/src/main/resources/messages_ga_IE.properties b/src/main/resources/messages_ga_IE.properties index c4d7fde6..ee97c5f9 100644 --- a/src/main/resources/messages_ga_IE.properties +++ b/src/main/resources/messages_ga_IE.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(m.sh. 1,3,2 nó 4-8,2,10-12 nó 2n-1) multiTool.title=Il-uirlis PDF multiTool.header=Il-uirlis PDF multiTool.uploadPrompts=Ainm comhaid - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Féach PDF viewPdf.header=Féach PDF diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index cc2ce5c8..e96ac127 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(जैसे 1,3,2 या 4-8,2,10-12 या 2n-1) multiTool.title=पीडीएफ मल्टी टूल multiTool.header=पीडीएफ मल्टी टूल multiTool.uploadPrompts=फाइल का नाम - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=पीडीएफ देखें viewPdf.header=पीडीएफ देखें diff --git a/src/main/resources/messages_hr_HR.properties b/src/main/resources/messages_hr_HR.properties index 19562f62..61492a91 100644 --- a/src/main/resources/messages_hr_HR.properties +++ b/src/main/resources/messages_hr_HR.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(npr. 1,3,2 ili 4-8,2,10-12 ili 2n-1) multiTool.title=PDF Višenamjenski alat multiTool.header=PDF Višenamjenski alat multiTool.uploadPrompts=Naziv datoteke - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Pogledaj viewPdf.header=Pogledaj PDF diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index ce89e659..6c53aee5 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(pl.: 1,3,2 vagy 4-8,2,10-12 vagy 2n-1) multiTool.title=PDF többfunkciós eszköz multiTool.header=PDF többfunkciós eszköz multiTool.uploadPrompts=Fájl neve - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=PDF megtekintése viewPdf.header=PDF megtekintése diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index d33054d6..f34900d3 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(misalnya 1,3,2 atau 4-8,2,10-12 atau 2n-1) multiTool.title=Alat Multi PDF multiTool.header=Alat Multi PDF multiTool.uploadPrompts=Nama Berkas - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Lihat PDF viewPdf.header=Lihat PDF diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index b21ab883..b9ad0765 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(ad es. 1,3,2 o 4-8,2,10-12 o 2n-1) multiTool.title=Multifunzione PDF multiTool.header=Multifunzione PDF multiTool.uploadPrompts=Nome file - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Visualizza PDF viewPdf.header=Visualizza PDF diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index 94e6ba1b..113ea186 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(例:1,3,2または4-8,2,10-12または2n-1) multiTool.title=PDFマルチツール multiTool.header=PDFマルチツール multiTool.uploadPrompts=ファイル名 - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=PDFを表示 viewPdf.header=PDFを表示 diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index 723f096e..ced8518a 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(예: 1,3,2 또는 4-8,2,10-12 또는 2n-1) multiTool.title=PDF 멀티툴 multiTool.header=PDF 멀티툴 multiTool.uploadPrompts=파일 이름 - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=PDF 뷰어 viewPdf.header=PDF 뷰어 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index c314b118..8b92a2ec 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(bijv. 1,3,2 of 4-8,2,10-12 of 2n-1) multiTool.title=PDF Multitool multiTool.header=PDF Multitool multiTool.uploadPrompts=Bestandsnaam - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=PDF bekijken viewPdf.header=PDF bekijken diff --git a/src/main/resources/messages_no_NB.properties b/src/main/resources/messages_no_NB.properties index e86f4b9e..05b04ad2 100644 --- a/src/main/resources/messages_no_NB.properties +++ b/src/main/resources/messages_no_NB.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(f.eks. 1,3,2 eller 4-8,2,10-12 eller 2n-1) multiTool.title=PDF-multiverktøy multiTool.header=PDF-multiverktøy multiTool.uploadPrompts=Filnavn - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Vis PDF viewPdf.header=Vis PDF diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index 4db148c1..4cdb54a0 100755 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(przykład 1,3,2 lub 4-8,2,10-12 lub 2n-1) multiTool.title=Narzędzie Wielofunkcyjne PDF multiTool.header=Narzędzie Wielofunkcyjne PDF multiTool.uploadPrompts=Nazwa pliku - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Podejrzyj PDF viewPdf.header=Podejrzyj PDF diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 917fb99d..bd676565 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(por exemplo 1,3,2 ou 4-8,2,10-12 ou 2n-1) multiTool.title=Multiferramenta de PDF multiTool.header=Multiferramenta de PDF multiTool.uploadPrompts=Nome do arquivo - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Visualizar PDF viewPdf.header=Visualizar PDF diff --git a/src/main/resources/messages_pt_PT.properties b/src/main/resources/messages_pt_PT.properties index 2bf6a5dd..2d994bef 100644 --- a/src/main/resources/messages_pt_PT.properties +++ b/src/main/resources/messages_pt_PT.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(ex: 1,3,2 ou 4-8,2,10-12 ou 2n-1) multiTool.title=Multiferramenta de PDF multiTool.header=Multiferramenta de PDF multiTool.uploadPrompts=Nome do Arquivo - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Visualizar PDF viewPdf.header=Visualizar PDF diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index f86a2d73..16e71e35 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(ex. 1,3,2 sau 4-8,2,10-12 sau 2n-1) multiTool.title=Instrument PDF multiplu multiTool.header=Instrument PDF multiplu multiTool.uploadPrompts=Nume Fișier - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Vizualizează PDF viewPdf.header=Vizualizează PDF diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index 2773d066..b5068ea7 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(например, 1,3,2 или 4-8,2,10-12 или 2n-1 multiTool.title=Мультиинструмент PDF multiTool.header=Мультиинструмент PDF multiTool.uploadPrompts=Имя файла - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Просмотреть PDF viewPdf.header=Просмотреть PDF diff --git a/src/main/resources/messages_sk_SK.properties b/src/main/resources/messages_sk_SK.properties index f2881d77..d36b54d1 100644 --- a/src/main/resources/messages_sk_SK.properties +++ b/src/main/resources/messages_sk_SK.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(napr. 1,3,2 alebo 4-8,2,10-12 alebo 2n-1) multiTool.title=PDF Multi Nástroj multiTool.header=PDF Multi Nástroj multiTool.uploadPrompts=File Name - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Zobraziť PDF viewPdf.header=Zobraziť PDF diff --git a/src/main/resources/messages_sr_LATN_RS.properties b/src/main/resources/messages_sr_LATN_RS.properties index f0ff41eb..5c5d74d5 100644 --- a/src/main/resources/messages_sr_LATN_RS.properties +++ b/src/main/resources/messages_sr_LATN_RS.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1) multiTool.title=PDF Multi Alatka multiTool.header=PDF Multi Alatka multiTool.uploadPrompts=File Name - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Prikaz viewPdf.header=Prikaz PDF-a diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index 0a10edec..2b30cf7b 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(t.ex. 1,3,2 eller 4-8,2,10-12 eller 2n-1) multiTool.title=PDF-multiverktyg multiTool.header=PDF Multi-verktyg multiTool.uploadPrompts=Filnamn - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Visa PDF viewPdf.header=Visa PDF diff --git a/src/main/resources/messages_th_TH.properties b/src/main/resources/messages_th_TH.properties index 3624b84e..b928752a 100644 --- a/src/main/resources/messages_th_TH.properties +++ b/src/main/resources/messages_th_TH.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(เช่น 1,3,2 หรือ 4-8,2,10-12 หรื multiTool.title=เครื่องมือ PDF หลายตัว multiTool.header=เครื่องมือ PDF หลายตัว multiTool.uploadPrompts=ชื่อไฟล์ - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=ดู PDF viewPdf.header=ดู PDF diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index b731da02..5025d51a 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(örn. 1,3,2 veya 4-8,2,10-12 veya 2n-1) multiTool.title=PDF Çoklu Araç multiTool.header=PDF Çoklu Araç multiTool.uploadPrompts=Dosya Adı - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=PDF Görüntüle viewPdf.header=PDF Görüntüle diff --git a/src/main/resources/messages_uk_UA.properties b/src/main/resources/messages_uk_UA.properties index ca018b93..176f0365 100644 --- a/src/main/resources/messages_uk_UA.properties +++ b/src/main/resources/messages_uk_UA.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(наприклад, 1,3,2 або 4-8,2,10-12 або 2n multiTool.title=Мультіінструмент PDF multiTool.header=Мультіінструмент PDF multiTool.uploadPrompts=Ім'я файлу - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Переглянути PDF viewPdf.header=Переглянути PDF diff --git a/src/main/resources/messages_vi_VN.properties b/src/main/resources/messages_vi_VN.properties index 15ca0653..41c689bc 100644 --- a/src/main/resources/messages_vi_VN.properties +++ b/src/main/resources/messages_vi_VN.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(ví dụ: 1,3,2 hoặc 4-8,2,10-12 hoặc 2n-1) multiTool.title=Công cụ đa năng PDF multiTool.header=Công cụ đa năng PDF multiTool.uploadPrompts=Tên tệp - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=Xem PDF viewPdf.header=Xem PDF diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index 506dee41..1a3f2f43 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(例如:1,3,2 或 4-8,2,10-12 或 2n-1) multiTool.title=PDF多功能工具 multiTool.header=PDF多功能工具 multiTool.uploadPrompts=文件名 - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=浏览PDF viewPdf.header=浏览PDF diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index 55a049ed..60b20330 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -933,7 +933,14 @@ pdfOrganiser.placeholder=(例如 1,3,2 或 4-8,2,10-12 或 2n-1) multiTool.title=PDF 複合工具 multiTool.header=PDF 複合工具 multiTool.uploadPrompts=檔名 - +multiTool.selectAll=Select All +multiTool.deselectAll=Deselect All +multiTool.selectPages=Page Select +multiTool.selectedPages=Selected Pages +multiTool.page=Page +multiTool.deleteSelected=Delete Selected +multiTool.downloadAll=Export +multiTool.downloadSelected=Export Selected #view pdf viewPdf.title=檢視 PDF viewPdf.header=檢視 PDF diff --git a/src/main/resources/static/css/multi-tool.css b/src/main/resources/static/css/multi-tool.css index 9687470a..60514fcc 100644 --- a/src/main/resources/static/css/multi-tool.css +++ b/src/main/resources/static/css/multi-tool.css @@ -212,15 +212,81 @@ label { .page-number { position: absolute; top: 5px; - right: 0px; - color: var(--md-sys-color-on-surface); - background-color: var(--md-sys-color-surface-5); + left: 5px; + color: var(--md-sys-color-on-secondary); + background-color: rgba(162, 201, 255, 0.8); padding: 6px 8px; border-radius: 8px; font-size: 16px; z-index: 2; + font-weight: 450; } .tool-header { margin: 0.5rem 1rem 2rem; } + +#select-pages-button { + opacity: 0.5; +} + +.selected-pages-container { + background-color: var(--md-sys-color-surface); + border-radius: 16px; + padding: 15px; + width: 100%; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + font-family: Arial, sans-serif; +} + +.selected-pages-container h3 { + color: var(--md-sys-color-on-surface); + font-size: 1.2em; + margin-bottom: 10px; +} + +.pages-list { + display: flex; + flex-wrap: wrap; + gap: 10px; + padding: 0; + list-style: none; + max-height: 10rem; + overflow: auto; +} + +.page-item { + background-color: var(--md-sys-color-surface-container-low); + border-radius: 8px; + padding: 8px 12px; + display: flex; + align-items: center; + gap: 8px; + font-weight: bold; + color: var(--md-sys-color-on-surface); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + width: 7rem; + height: 2.5rem; +} + +.selected-page-number { + width: 4rem; + font-size: small; +} + +.remove-btn { + cursor: pointer; + color: var(--md-sys-color-on-surface); + font-size: 1.2em; +} + +.checkbox-container { + align-items: center; + justify-content: center; + display: flex; + flex-direction: column; +} + +.checkbox-label { + font-size: medium; +} diff --git a/src/main/resources/static/css/pdfActions.css b/src/main/resources/static/css/pdfActions.css index 30ac1eee..c3845445 100644 --- a/src/main/resources/static/css/pdfActions.css +++ b/src/main/resources/static/css/pdfActions.css @@ -127,6 +127,22 @@ html[dir="rtl"] .pdf-actions_container:last-child>.pdf-actions_insert-file-butto border-radius: 100px; } + +.pdf-actions_checkbox { + position: absolute; + top: 5px; + right: 3px; + color: var(--md-sys-color-on-surface); + background-color: var(--md-sys-color-surface-5); + padding: 6px 8px; + border-radius: 8px; + font-size: 16px; + z-index: 2; +} + +.hidden { + display: none; +} .pdf-actions_insert-file-blank-button { position: absolute; top: 75%; diff --git a/src/main/resources/static/css/theme/font.css b/src/main/resources/static/css/theme/font.css index 547db7ca..a90b14a9 100644 --- a/src/main/resources/static/css/theme/font.css +++ b/src/main/resources/static/css/theme/font.css @@ -5,6 +5,8 @@ src: url(../../fonts/google-symbol.woff2) format('woff2'); } + + .material-symbols-rounded { font-family: 'Material Symbols Rounded'; font-weight: 300; diff --git a/src/main/resources/static/js/multitool/PdfActionsManager.js b/src/main/resources/static/js/multitool/PdfActionsManager.js index 6f62f256..b4da3718 100644 --- a/src/main/resources/static/js/multitool/PdfActionsManager.js +++ b/src/main/resources/static/js/multitool/PdfActionsManager.js @@ -1,6 +1,7 @@ class PdfActionsManager { pageDirection; pagesContainer; + static selectedPages = []; // Static property shared across all instances constructor(id) { this.pagesContainer = document.getElementById(id); @@ -98,6 +99,7 @@ class PdfActionsManager { this.splitFileButtonCallback = this.splitFileButtonCallback.bind(this); } + adapt(div) { div.classList.add("pdf-actions_container"); const leftDirection = this.pageDirection === "rtl" ? "right" : "left"; @@ -138,6 +140,45 @@ class PdfActionsManager { div.appendChild(buttonContainer); + //enerate checkbox to select individual pages + const selectCheckbox = document.createElement("input"); + selectCheckbox.type = "checkbox"; + selectCheckbox.classList.add("pdf-actions_checkbox", "form-check-input"); + selectCheckbox.id = `selectPageCheckbox`; + selectCheckbox.checked = window.selectAll; + + div.appendChild(selectCheckbox); + + //only show whenpage select mode is active + if (!window.selectPage) { + selectCheckbox.classList.add("hidden"); + } else { + selectCheckbox.classList.remove("hidden"); + } + + selectCheckbox.onchange = () => { + const pageNumber = Array.from(div.parentNode.children).indexOf(div) + 1; + if (selectCheckbox.checked) { + //adds to array of selected pages + window.selectedPages.push(pageNumber); + } else { + //remove page from selected pages array + const index = window.selectedPages.indexOf(pageNumber); + if (index !== -1) { + window.selectedPages.splice(index, 1); + } + } + + if (window.selectedPages.length > 0 && !window.selectPage) { + window.toggleSelectPageVisibility(); + } + if (window.selectedPages.length == 0 && window.selectPage) { + window.toggleSelectPageVisibility(); + } + + window.updateSelectedPagesDisplay(); + }; + const insertFileButtonContainer = document.createElement("div"); insertFileButtonContainer.classList.add( @@ -191,15 +232,29 @@ class PdfActionsManager { }; div.addEventListener("mouseenter", () => { + window.updatePageNumbersAndCheckboxes(); const pageNumber = Array.from(div.parentNode.children).indexOf(div) + 1; adaptPageNumber(pageNumber, div); + const checkbox = document.getElementById(`selectPageCheckbox-${pageNumber}`); + if (checkbox && !window.selectPage) { + checkbox.classList.remove("hidden"); + } }); div.addEventListener("mouseleave", () => { + const pageNumber = Array.from(div.parentNode.children).indexOf(div) + 1; const pageNumberElement = div.querySelector(".page-number"); if (pageNumberElement) { div.removeChild(pageNumberElement); } + const checkbox = document.getElementById(`selectPageCheckbox-${pageNumber}`); + if (checkbox && !window.selectPage) { + checkbox.classList.add("hidden"); + } + }); + + document.addEventListener("selectedPagesUpdated", () => { + window.updateSelectedPagesDisplay(); }); return div; diff --git a/src/main/resources/static/js/multitool/PdfContainer.js b/src/main/resources/static/js/multitool/PdfContainer.js index 97a34e1d..a9642bb4 100644 --- a/src/main/resources/static/js/multitool/PdfContainer.js +++ b/src/main/resources/static/js/multitool/PdfContainer.js @@ -22,6 +22,11 @@ class PdfContainer { this.nameAndArchiveFiles = this.nameAndArchiveFiles.bind(this); this.splitPDF = this.splitPDF.bind(this); this.splitAll = this.splitAll.bind(this); + this.deleteSelected = this.deleteSelected.bind(this); + this.toggleSelectAll = this.toggleSelectAll.bind(this); + this.updateSelectedPagesDisplay = this.updateSelectedPagesDisplay.bind(this); + this.toggleSelectPageVisibility = this.toggleSelectPageVisibility.bind(this); + this.updatePagesFromCSV = this.updatePagesFromCSV.bind(this); this.addFilesBlankAll = this.addFilesBlankAll.bind(this) this.pdfAdapters = pdfAdapters; @@ -32,6 +37,7 @@ class PdfContainer { addFiles: this.addFiles, rotateElement: this.rotateElement, updateFilename: this.updateFilename, + deleteSelected: this.deleteSelected, }); }); @@ -39,6 +45,13 @@ class PdfContainer { window.exportPdf = this.exportPdf; window.rotateAll = this.rotateAll; window.splitAll = this.splitAll; + window.deleteSelected = this.deleteSelected; + window.toggleSelectAll = this.toggleSelectAll; + window.updateSelectedPagesDisplay = this.updateSelectedPagesDisplay; + window.toggleSelectPageVisibility = this.toggleSelectPageVisibility; + window.updatePagesFromCSV = this.updatePagesFromCSV; + window.updateSelectedPagesDisplay = this.updateSelectedPagesDisplay; + window.updatePageNumbersAndCheckboxes = this.updatePageNumbersAndCheckboxes; window.addFilesBlankAll = this.addFilesBlankAll const filenameInput = document.getElementById("filename-input"); @@ -94,6 +107,8 @@ class PdfContainer { this.addFilesFromFiles(files, nextSiblingElement); this.updateFilename(files ? files[0].name : ""); + const selectAll = document.getElementById("select-pages-container"); + selectAll.classList.toggle("hidden", false); }; input.click(); @@ -264,15 +279,206 @@ class PdfContainer { } rotateAll(deg) { - for (var i = 0; i < this.pagesContainer.childNodes.length; i++) { + for (let i = 0; i < this.pagesContainer.childNodes.length; i++) { const child = this.pagesContainer.children[i]; if (!child) continue; + + const pageIndex = i + 1; + //if in page select mode is active rotate only selected pages + if (window.selectPage && !window.selectedPages.includes(pageIndex)) continue; + const img = child.querySelector("img"); if (!img) continue; + this.rotateElement(img, deg); } } + deleteSelected() { + window.selectedPages.sort((a, b) => a - b); + let deletions = 0; + + window.selectedPages.forEach((pageIndex) => { + const adjustedIndex = pageIndex - 1 - deletions; + const child = this.pagesContainer.children[adjustedIndex]; + if (child) { + this.pagesContainer.removeChild(child); + deletions++; + } + }); + + if (this.pagesContainer.childElementCount === 0) { + const filenameInput = document.getElementById("filename-input"); + const filenameParagraph = document.getElementById("filename"); + const downloadBtn = document.getElementById("export-button"); + + if (filenameInput) + filenameInput.disabled = true; + filenameInput.value = ""; + if (filenameParagraph) + filenameParagraph.innerText = ""; + + downloadBtn.disabled = true; + } + + window.selectedPages = []; + this.updatePageNumbersAndCheckboxes(); + document.dispatchEvent(new Event("selectedPagesUpdated")); + } + + toggleSelectAll() { + const checkboxes = document.querySelectorAll(".pdf-actions_checkbox"); + window.selectAll = !window.selectAll; + const selectIcon = document.getElementById("select-icon"); + const deselectIcon = document.getElementById("deselect-icon"); + + if (selectIcon.style.display === "none") { + selectIcon.style.display = "inline"; + deselectIcon.style.display = "none"; + } else { + selectIcon.style.display = "none"; + deselectIcon.style.display = "inline"; + } + checkboxes.forEach((checkbox) => { + + checkbox.checked = window.selectAll; + + const pageNumber = Array.from(checkbox.parentNode.parentNode.children).indexOf(checkbox.parentNode) + 1; + + if (checkbox.checked) { + if (!window.selectedPages.includes(pageNumber)) { + window.selectedPages.push(pageNumber); + } + } else { + const index = window.selectedPages.indexOf(pageNumber); + if (index !== -1) { + window.selectedPages.splice(index, 1); + } + } + }); + + this.updateSelectedPagesDisplay(); + } + + parseCSVInput(csvInput, maxPageIndex) { + const pages = new Set(); + + csvInput.split(",").forEach((item) => { + const range = item.split("-").map((p) => parseInt(p.trim())); + if (range.length === 2) { + const [start, end] = range; + for (let i = start; i <= end && i <= maxPageIndex; i++) { + if (i > 0) { // Ensure the page number is greater than 0 + pages.add(i); + } + } + } else if (range.length === 1 && Number.isInteger(range[0])) { + const page = range[0]; + if (page > 0 && page <= maxPageIndex) { // Ensure page is within valid range + pages.add(page); + } + } + }); + + return Array.from(pages).sort((a, b) => a - b); + } + + updatePagesFromCSV() { + const csvInput = document.getElementById("csv-input").value; + + const allPages = this.pagesContainer.querySelectorAll(".page-container"); + const maxPageIndex = allPages.length; + + window.selectedPages = this.parseCSVInput(csvInput, maxPageIndex); + + this.updateSelectedPagesDisplay(); + + const allCheckboxes = document.querySelectorAll(".pdf-actions_checkbox"); + allCheckboxes.forEach((checkbox) => { + const page = parseInt(checkbox.getAttribute("data-page-number")); + checkbox.checked = window.selectedPages.includes(page); + }); + } + + formatSelectedPages(pages) { + if (pages.length === 0) return ""; + + pages.sort((a, b) => a - b); // Sort the page numbers in ascending order + const ranges = []; + let start = pages[0]; + let end = start; + + for (let i = 1; i < pages.length; i++) { + if (pages[i] === end + 1) { + // Consecutive page, update end + end = pages[i]; + } else { + // Non-consecutive page, finalize current range + ranges.push(start === end ? `${start}` : `${start}-${end}`); + start = pages[i]; + end = start; + } + } + // Add the last range + ranges.push(start === end ? `${start}` : `${start}-${end}`); + + return ranges.join(", "); + } + + updateSelectedPagesDisplay() { + const selectedPagesList = document.getElementById("selected-pages-list"); + const selectedPagesInput = document.getElementById("csv-input"); + selectedPagesList.innerHTML = ""; // Clear the list + + window.selectedPages.forEach((page) => { + const pageItem = document.createElement("div"); + pageItem.className = "page-item"; + + const pageNumber = document.createElement("span"); + const pagelabel = /*[[#{multiTool.page}]]*/ 'Page'; + pageNumber.className = "selected-page-number"; + pageNumber.innerText = `${pagelabel} ${page}`; + pageItem.appendChild(pageNumber); + + const removeBtn = document.createElement("span"); + removeBtn.className = "remove-btn"; + removeBtn.innerHTML = "✕"; + + // Remove page from selected pages list and update display and checkbox + removeBtn.onclick = () => { + window.selectedPages = window.selectedPages.filter((p) => p !== page); + this.updateSelectedPagesDisplay(); + + const checkbox = document.getElementById(`selectPageCheckbox-${page}`); + if (checkbox) { + checkbox.checked = false; + } + }; + + pageItem.appendChild(removeBtn); + selectedPagesList.appendChild(pageItem); + }); + + // Update the input field with the formatted page list + selectedPagesInput.value = this.formatSelectedPages(window.selectedPages); + } + + parsePageRanges(ranges) { + const pages = new Set(); + + ranges.split(',').forEach(range => { + const [start, end] = range.split('-').map(Number); + if (end) { + for (let i = start; i <= end; i++) { + pages.add(i); + } + } else { + pages.add(start); + } + }); + + return Array.from(pages).sort((a, b) => a - b); + } addFilesBlankAll() { const allPages = this.pagesContainer.querySelectorAll(".page-container"); @@ -283,20 +489,36 @@ class PdfContainer { }); } - splitAll() { const allPages = this.pagesContainer.querySelectorAll(".page-container"); - if (this.pagesContainer.querySelectorAll(".split-before").length > 0) { - allPages.forEach(page => { - page.classList.remove("split-before"); - }); - } else { - allPages.forEach(page => { - page.classList.add("split-before"); - }); + + if (!window.selectPage) { + const hasSplit = this.pagesContainer.querySelectorAll(".split-before").length > 0; + if (hasSplit) { + allPages.forEach(page => { + page.classList.remove("split-before"); + }); + } else { + allPages.forEach(page => { + page.classList.add("split-before"); + }); + } + return; } + + allPages.forEach((page, index) => { + const pageIndex = index; + if (window.selectPage && !window.selectedPages.includes(pageIndex)) return; + + if (page.classList.contains("split-before")) { + page.classList.remove("split-before"); + } else { + page.classList.add("split-before"); + } + }); } + async splitPDF(baseDocBytes, splitters) { const baseDocument = await PDFLib.PDFDocument.load(baseDocBytes); const pageNum = baseDocument.getPages().length; @@ -339,52 +561,54 @@ class PdfContainer { return zip; } - async exportPdf() { + async exportPdf(selected) { const pdfDoc = await PDFLib.PDFDocument.create(); const pageContainers = this.pagesContainer.querySelectorAll(".page-container"); // Select all .page-container elements for (var i = 0; i < pageContainers.length; i++) { - const img = pageContainers[i].querySelector("img"); // Find the img element within each .page-container - if (!img) continue; - let page; - if (img.doc) { - const pages = await pdfDoc.copyPages(img.doc, [img.pageIdx]); - page = pages[0]; - pdfDoc.addPage(page); - } else { - page = pdfDoc.addPage([img.naturalWidth, img.naturalHeight]); - const imageBytes = await fetch(img.src).then((res) => res.arrayBuffer()); - const uint8Array = new Uint8Array(imageBytes); - const imageType = detectImageType(uint8Array); + if (!selected || window.selectedPages.includes(i + 1)) { + const img = pageContainers[i].querySelector("img"); // Find the img element within each .page-container + if (!img) continue; + let page; + if (img.doc) { + const pages = await pdfDoc.copyPages(img.doc, [img.pageIdx]); + page = pages[0]; + pdfDoc.addPage(page); + } else { + page = pdfDoc.addPage([img.naturalWidth, img.naturalHeight]); + const imageBytes = await fetch(img.src).then((res) => res.arrayBuffer()); + const uint8Array = new Uint8Array(imageBytes); + const imageType = detectImageType(uint8Array); - let image; - switch (imageType) { - case 'PNG': - image = await pdfDoc.embedPng(imageBytes); - break; - case 'JPEG': - image = await pdfDoc.embedJpg(imageBytes); - break; - case 'TIFF': - image = await pdfDoc.embedTiff(imageBytes); - break; - case 'GIF': - console.warn(`Unsupported image type: ${imageType}`); - continue; // Skip this image - default: - console.warn(`Unsupported image type: ${imageType}`); - continue; // Skip this image + let image; + switch (imageType) { + case 'PNG': + image = await pdfDoc.embedPng(imageBytes); + break; + case 'JPEG': + image = await pdfDoc.embedJpg(imageBytes); + break; + case 'TIFF': + image = await pdfDoc.embedTiff(imageBytes); + break; + case 'GIF': + console.warn(`Unsupported image type: ${imageType}`); + continue; // Skip this image + default: + console.warn(`Unsupported image type: ${imageType}`); + continue; // Skip this image + } + page.drawImage(image, { + x: 0, + y: 0, + width: img.naturalWidth, + height: img.naturalHeight, + }); + } + const rotation = img.style.rotate; + if (rotation) { + const rotationAngle = parseInt(rotation.replace(/[^\d-]/g, "")); + page.setRotation(PDFLib.degrees(page.getRotation().angle + rotationAngle)); } - page.drawImage(image, { - x: 0, - y: 0, - width: img.naturalWidth, - height: img.naturalHeight, - }); - } - const rotation = img.style.rotate; - if (rotation) { - const rotationAngle = parseInt(rotation.replace(/[^\d-]/g, "")); - page.setRotation(PDFLib.degrees(page.getRotation().angle + rotationAngle)); } } pdfDoc.setCreator(stirlingPDFLabel); @@ -496,7 +720,44 @@ class PdfContainer { // filenameInput.value.replace('.',''); // } } + + + toggleSelectPageVisibility() { + window.selectPage = !window.selectPage; + const checkboxes = document.querySelectorAll(".pdf-actions_checkbox"); + checkboxes.forEach(checkbox => { + checkbox.classList.toggle("hidden", !window.selectPage); + }); + const deleteButton = document.getElementById("delete-button"); + deleteButton.classList.toggle("hidden", !window.selectPage); + const selectedPages = document.getElementById("selected-pages-display"); + selectedPages.classList.toggle("hidden", !window.selectPage); + const selectAll = document.getElementById("select-All-Container"); + selectedPages.classList.toggle("hidden", !window.selectPage); + const exportSelected = document.getElementById("export-selected-button"); + exportSelected.classList.toggle("hidden", !window.selectPage); + const selectPagesButton = document.getElementById("select-pages-button"); + selectPagesButton.style.opacity = window.selectPage ? "1" : "0.5"; + + if (window.selectPage) { + this.updatePageNumbersAndCheckboxes(); + } + } + + + updatePageNumbersAndCheckboxes() { + const pageDivs = document.querySelectorAll(".pdf-actions_container"); + + pageDivs.forEach((div, index) => { + const pageNumber = index + 1; + const checkbox = div.querySelector(".pdf-actions_checkbox"); + checkbox.id = `selectPageCheckbox-${pageNumber}`; + checkbox.setAttribute("data-page-number", pageNumber); + checkbox.checked = window.selectedPages.includes(pageNumber); + }); + } } + function detectImageType(uint8Array) { // Check for PNG signature if (uint8Array[0] === 137 && uint8Array[1] === 80 && uint8Array[2] === 78 && uint8Array[3] === 71) { @@ -521,4 +782,7 @@ function detectImageType(uint8Array) { return 'UNKNOWN'; } + + + export default PdfContainer; diff --git a/src/main/resources/templates/multi-tool.html b/src/main/resources/templates/multi-tool.html index 261a4ca8..400f0b10 100644 --- a/src/main/resources/templates/multi-tool.html +++ b/src/main/resources/templates/multi-tool.html @@ -47,18 +47,53 @@ cut + + +
+ +
+ - + +
@@ -82,6 +117,20 @@
+