@jjlmoya/utils-converters 1.22.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +4 -0
  3. package/src/entries.ts +4 -1
  4. package/src/index.ts +3 -0
  5. package/src/shared/ImageToPdfConverter.astro +80 -0
  6. package/src/shared/image-to-pdf/controller.ts +173 -0
  7. package/src/shared/image-to-pdf/dom-views.ts +55 -0
  8. package/src/shared/image-to-pdf/evaluator.ts +18 -0
  9. package/src/shared/image-to-pdf/logic.test.ts +29 -0
  10. package/src/shared/image-to-pdf/logic.ts +214 -0
  11. package/src/shared/image-to-pdf/storage.ts +36 -0
  12. package/src/shared/image-to-pdf/ui.ts +39 -0
  13. package/src/shared/image-to-pdf.css +394 -0
  14. package/src/tests/i18n_coverage.test.ts +2 -3
  15. package/src/tests/locale_completeness.test.ts +2 -3
  16. package/src/tests/seo_translation_completeness.test.ts +69 -0
  17. package/src/tests/spanish_leakage.test.ts +5 -1
  18. package/src/tests/tool_validation.test.ts +2 -2
  19. package/src/tool/jpgToPdf/bibliography.astro +11 -0
  20. package/src/tool/jpgToPdf/bibliography.ts +12 -0
  21. package/src/tool/jpgToPdf/component.astro +10 -0
  22. package/src/tool/jpgToPdf/entry.ts +26 -0
  23. package/src/tool/jpgToPdf/i18n/de.ts +111 -0
  24. package/src/tool/jpgToPdf/i18n/en.ts +37 -0
  25. package/src/tool/jpgToPdf/i18n/es.ts +111 -0
  26. package/src/tool/jpgToPdf/i18n/fr.ts +111 -0
  27. package/src/tool/jpgToPdf/i18n/id.ts +111 -0
  28. package/src/tool/jpgToPdf/i18n/it.ts +111 -0
  29. package/src/tool/jpgToPdf/i18n/ja.ts +111 -0
  30. package/src/tool/jpgToPdf/i18n/ko.ts +111 -0
  31. package/src/tool/jpgToPdf/i18n/nl.ts +111 -0
  32. package/src/tool/jpgToPdf/i18n/pl.ts +111 -0
  33. package/src/tool/jpgToPdf/i18n/pt.ts +111 -0
  34. package/src/tool/jpgToPdf/i18n/ru.ts +111 -0
  35. package/src/tool/jpgToPdf/i18n/sv.ts +111 -0
  36. package/src/tool/jpgToPdf/i18n/tr.ts +111 -0
  37. package/src/tool/jpgToPdf/i18n/zh.ts +111 -0
  38. package/src/tool/jpgToPdf/index.ts +11 -0
  39. package/src/tool/jpgToPdf/jpg-to-pdf-converter.css +3 -0
  40. package/src/tool/jpgToPdf/seo.astro +12 -0
  41. package/src/tool/pngAJpg/i18n/ko.ts +1 -1
  42. package/src/tool/pngAJpg/i18n/ru.ts +1 -1
  43. package/src/tool/pngAJpg/i18n/zh.ts +1 -1
  44. package/src/tool/pngToPdf/bibliography.astro +11 -0
  45. package/src/tool/pngToPdf/bibliography.ts +12 -0
  46. package/src/tool/pngToPdf/component.astro +10 -0
  47. package/src/tool/pngToPdf/entry.ts +26 -0
  48. package/src/tool/pngToPdf/i18n/de.ts +111 -0
  49. package/src/tool/pngToPdf/i18n/en.ts +37 -0
  50. package/src/tool/pngToPdf/i18n/es.ts +111 -0
  51. package/src/tool/pngToPdf/i18n/fr.ts +111 -0
  52. package/src/tool/pngToPdf/i18n/id.ts +111 -0
  53. package/src/tool/pngToPdf/i18n/it.ts +111 -0
  54. package/src/tool/pngToPdf/i18n/ja.ts +111 -0
  55. package/src/tool/pngToPdf/i18n/ko.ts +111 -0
  56. package/src/tool/pngToPdf/i18n/nl.ts +111 -0
  57. package/src/tool/pngToPdf/i18n/pl.ts +111 -0
  58. package/src/tool/pngToPdf/i18n/pt.ts +111 -0
  59. package/src/tool/pngToPdf/i18n/ru.ts +111 -0
  60. package/src/tool/pngToPdf/i18n/sv.ts +111 -0
  61. package/src/tool/pngToPdf/i18n/tr.ts +111 -0
  62. package/src/tool/pngToPdf/i18n/zh.ts +111 -0
  63. package/src/tool/pngToPdf/index.ts +11 -0
  64. package/src/tool/pngToPdf/png-to-pdf-converter.css +3 -0
  65. package/src/tool/pngToPdf/seo.astro +12 -0
  66. package/src/tool/webpToPdf/bibliography.astro +11 -0
  67. package/src/tool/webpToPdf/bibliography.ts +12 -0
  68. package/src/tool/webpToPdf/component.astro +10 -0
  69. package/src/tool/webpToPdf/entry.ts +26 -0
  70. package/src/tool/webpToPdf/i18n/de.ts +111 -0
  71. package/src/tool/webpToPdf/i18n/en.ts +37 -0
  72. package/src/tool/webpToPdf/i18n/es.ts +111 -0
  73. package/src/tool/webpToPdf/i18n/fr.ts +111 -0
  74. package/src/tool/webpToPdf/i18n/id.ts +111 -0
  75. package/src/tool/webpToPdf/i18n/it.ts +111 -0
  76. package/src/tool/webpToPdf/i18n/ja.ts +111 -0
  77. package/src/tool/webpToPdf/i18n/ko.ts +111 -0
  78. package/src/tool/webpToPdf/i18n/nl.ts +111 -0
  79. package/src/tool/webpToPdf/i18n/pl.ts +111 -0
  80. package/src/tool/webpToPdf/i18n/pt.ts +111 -0
  81. package/src/tool/webpToPdf/i18n/ru.ts +111 -0
  82. package/src/tool/webpToPdf/i18n/sv.ts +111 -0
  83. package/src/tool/webpToPdf/i18n/tr.ts +111 -0
  84. package/src/tool/webpToPdf/i18n/zh.ts +111 -0
  85. package/src/tool/webpToPdf/index.ts +11 -0
  86. package/src/tool/webpToPdf/seo.astro +12 -0
  87. package/src/tool/webpToPdf/webp-to-pdf-converter.css +3 -0
  88. package/src/tools.ts +9 -1
@@ -0,0 +1,111 @@
1
+ import { generateSchemas } from '../../../shared/logic/schemas';
2
+ import { bibliography } from '../bibliography';
3
+ import type { WebpToPdfLocaleContent } from '../entry';
4
+ import type { ImageToPdfUI } from '../../../shared/image-to-pdf/ui';
5
+
6
+ const slug = 'conversor-webp-para-pdf';
7
+ const title = "Conversor de WebP para PDF";
8
+ const description = "Converta imagens WebP num PDF ordenado no seu navegador. Escolha o tamanho do papel, orientação e margens sem carregar ficheiros.";
9
+
10
+ const ui: ImageToPdfUI = {
11
+ formatLabel: 'WebP',
12
+ dropTitle: "Crie um PDF a partir das suas imagens WebP",
13
+ dropText: "Arraste ficheiros WebP para aqui. A ordem escolhida será a ordem das páginas.",
14
+ selectFiles: "Selecionar ficheiros WebP",
15
+ privacyNote: "Tudo é processado no navegador. As suas imagens nunca são carregadas.",
16
+ optionsTitle: "Folha de impressão",
17
+ settingsTitle: "Definições de papel",
18
+ pageSizeLabel: "Tamanho do papel",
19
+ a4: 'A4',
20
+ letter: 'Letter',
21
+ orientationLabel: "Orientação",
22
+ portrait: "Retrato",
23
+ landscape: "Paisagem",
24
+ marginLabel: "Margens",
25
+ pagesTitle: "Páginas",
26
+ reorderHint: "Reordene as páginas antes de exportar.",
27
+ page: "Página",
28
+ pageSingular: "página",
29
+ pagePlural: "páginas",
30
+ moveUp: "Mover para cima",
31
+ moveDown: "Mover para baixo",
32
+ remove: "Remover",
33
+ emptyPages: "As imagens selecionadas aparecerão aqui.",
34
+ createPdf: "Criar PDF",
35
+ reset: "Recomeçar",
36
+ ready: "Pronto para as suas imagens",
37
+ processing: "A preparar imagem",
38
+ error: "Não foi possível ler a imagem",
39
+ downloadPdf: "Descarregar PDF",
40
+ building: "A gerar PDF",
41
+ pdfReady: "O seu PDF está pronto",
42
+ invalidFile: "Esta ferramenta aceita apenas ficheiros WebP e JPEG.",
43
+ bibliographyTitle: "Referências",
44
+ faqTitle: "Perguntas frequentes",
45
+ };
46
+
47
+ const faq: WebpToPdfLocaleContent['faq'] = [
48
+ {
49
+ "question": "Posso juntar várias imagens WebP num único PDF?",
50
+ "answer": "Sim. Selecione os ficheiros WebP, ordene as páginas e exporte um único documento PDF."
51
+ },
52
+ {
53
+ "question": "As minhas imagens são carregadas para algum servidor?",
54
+ "answer": "Não. Todo o processo é realizado localmente no seu navegador."
55
+ },
56
+ {
57
+ "question": "Posso escolher o tamanho de papel A4 ou Carta?",
58
+ "answer": "Sim. Pode selecionar A4 ou Letter, a orientação e as margens."
59
+ }
60
+ ];
61
+
62
+ const howTo: WebpToPdfLocaleContent['howTo'] = [
63
+ {
64
+ "name": "Selecione as imagens WebP",
65
+ "text": "Arraste os seus ficheiros WebP ou escolha-os no seu dispositivo."
66
+ },
67
+ {
68
+ "name": "Organize as páginas",
69
+ "text": "Ordene as imagens e configure o formato A4/Carta, orientação e margens."
70
+ },
71
+ {
72
+ "name": "Gere e descarregue o PDF",
73
+ "text": "Clique em Criar PDF e descarregue o ficheiro final."
74
+ }
75
+ ];
76
+
77
+ const seo: WebpToPdfLocaleContent['seo'] = [
78
+ {
79
+ "type": "title",
80
+ "text": "Crie um documento PDF pronto a imprimir a partir de imagens WebP",
81
+ "level": 2
82
+ },
83
+ {
84
+ "type": "paragraph",
85
+ "html": "Este conversor de WebP para PDF foi concebido para agrupar fotos ou digitalizações num único ficheiro organizado. Ajuste a ordem e as definições de página facilmente."
86
+ },
87
+ {
88
+ "type": "title",
89
+ "text": "Documentos impecáveis e organizados",
90
+ "level": 3
91
+ },
92
+ {
93
+ "type": "list",
94
+ "icon": "mdi:check-circle",
95
+ "items": [
96
+ "Ordene as imagens para garantir uma sequência lógica.",
97
+ "Escolha a orientação retrato ou paisagem conforme necessário.",
98
+ "Ajuste as margens para uma impressão sem falhas em qualquer impressora."
99
+ ]
100
+ },
101
+ {
102
+ "type": "tip",
103
+ "title": "Segurança e privacidade totais",
104
+ "html": "Como o processo corre no seu navegador, as suas fotos e documentos confidenciais estão sempre salvaguardados."
105
+ }
106
+ ];
107
+
108
+ export const content: WebpToPdfLocaleContent = {
109
+ slug, title, description, ui, seo, faq, bibliography, howTo,
110
+ schemas: generateSchemas({ title, description, inLanguage: 'pt', faq, howTo }),
111
+ };
@@ -0,0 +1,111 @@
1
+ import { generateSchemas } from '../../../shared/logic/schemas';
2
+ import { bibliography } from '../bibliography';
3
+ import type { WebpToPdfLocaleContent } from '../entry';
4
+ import type { ImageToPdfUI } from '../../../shared/image-to-pdf/ui';
5
+
6
+ const slug = 'konverter-webp-v-pdf';
7
+ const title = "Конвертер WebP в PDF";
8
+ const description = "Преобразуйте изображения WebP в упорядоченный PDF прямо в браузере. Выбирайте размер бумаги, ориентацию и поля без загрузки файлов на сервер.";
9
+
10
+ const ui: ImageToPdfUI = {
11
+ formatLabel: 'WebP',
12
+ dropTitle: "Создать PDF из изображений WebP",
13
+ dropText: "Перетащите файлы WebP сюда. Выбранный порядок станет порядком страниц.",
14
+ selectFiles: "Выбрать файлы WebP",
15
+ privacyNote: "Все обрабатывается в браузере. Ваши изображения не загружаются на сервер.",
16
+ optionsTitle: "Печатный лист",
17
+ settingsTitle: "Настройки бумаги",
18
+ pageSizeLabel: "Размер бумаги",
19
+ a4: 'A4',
20
+ letter: 'Letter',
21
+ orientationLabel: "Ориентация",
22
+ portrait: "Книжная",
23
+ landscape: "Альбомная",
24
+ marginLabel: "Поля",
25
+ pagesTitle: "Страницы",
26
+ reorderHint: "Измените порядок страниц перед экспортом.",
27
+ page: "Страница",
28
+ pageSingular: "страница",
29
+ pagePlural: "страниц",
30
+ moveUp: "Вверх",
31
+ moveDown: "Вниз",
32
+ remove: "Удалить",
33
+ emptyPages: "Выбранные изображения появятся здесь.",
34
+ createPdf: "Создать PDF",
35
+ reset: "Сбросить",
36
+ ready: "Готово к обработке",
37
+ processing: "Подготовка изображения",
38
+ error: "Не удалось прочитать изображение",
39
+ downloadPdf: "Скачать PDF",
40
+ building: "Создание PDF",
41
+ pdfReady: "Ваш PDF готов",
42
+ invalidFile: "Этот инструмент принимает только файлы WebP и JPEG.",
43
+ bibliographyTitle: "Источники",
44
+ faqTitle: "Часто задаваемые вопросы",
45
+ };
46
+
47
+ const faq: WebpToPdfLocaleContent['faq'] = [
48
+ {
49
+ "question": "Можно ли объединить несколько WebP в один PDF?",
50
+ "answer": "Да. Выберите необходимые файлы WebP, настройте порядок страниц и экспортируйте единый PDF."
51
+ },
52
+ {
53
+ "question": "Загружаются ли мои изображения на сервер?",
54
+ "answer": "Нет. Весь процесс происходит локально в вашем браузере."
55
+ },
56
+ {
57
+ "question": "Можно ли выбрать формат A4 или Letter?",
58
+ "answer": "Да. Вы можете выбрать A4 или Letter, задать ориентацию и поля."
59
+ }
60
+ ];
61
+
62
+ const howTo: WebpToPdfLocaleContent['howTo'] = [
63
+ {
64
+ "name": "Выберите изображения WebP",
65
+ "text": "Перетащите файлы WebP или выберите их с вашего устройства."
66
+ },
67
+ {
68
+ "name": "Настройте порядок и бумагу",
69
+ "text": "Упорядочите страницы, выберите A4 или Letter, ориентацию и поля."
70
+ },
71
+ {
72
+ "name": "Создайте и скачайте PDF",
73
+ "text": "Нажмите Создать PDF и скачайте готовый документ."
74
+ }
75
+ ];
76
+
77
+ const seo: WebpToPdfLocaleContent['seo'] = [
78
+ {
79
+ "type": "title",
80
+ "text": "Превратите изображения WebP в готовый к печати документ PDF",
81
+ "level": 2
82
+ },
83
+ {
84
+ "type": "paragraph",
85
+ "html": "Этот конвертер WebP в PDF помогает объединить сканы или фотографии в один аккуратный документ. Вы можете настроить порядок страниц и параметры бумаги."
86
+ },
87
+ {
88
+ "type": "title",
89
+ "text": "Создание аккуратных PDF-документов",
90
+ "level": 3
91
+ },
92
+ {
93
+ "type": "list",
94
+ "icon": "mdi:check-circle",
95
+ "items": [
96
+ "Установите правильный порядок страниц перед экспортом.",
97
+ "Выберите книжную или альбомную ориентацию в зависимости от фото.",
98
+ "Настройте поля для идеальной печати на принтере."
99
+ ]
100
+ },
101
+ {
102
+ "type": "tip",
103
+ "title": "Полная конфиденциальность ваших данных",
104
+ "html": "Файлы обрабатываются локально на вашем устройстве и не передаются в сеть."
105
+ }
106
+ ];
107
+
108
+ export const content: WebpToPdfLocaleContent = {
109
+ slug, title, description, ui, seo, faq, bibliography, howTo,
110
+ schemas: generateSchemas({ title, description, inLanguage: 'ru', faq, howTo }),
111
+ };
@@ -0,0 +1,111 @@
1
+ import { generateSchemas } from '../../../shared/logic/schemas';
2
+ import { bibliography } from '../bibliography';
3
+ import type { WebpToPdfLocaleContent } from '../entry';
4
+ import type { ImageToPdfUI } from '../../../shared/image-to-pdf/ui';
5
+
6
+ const slug = 'omvandla-webp-till-pdf';
7
+ const title = "Omvandla WebP till PDF";
8
+ const description = "Omvandla WebP-bilder till en ordnad PDF i din webbläsare. Välj pappersstorlek, orientering och marginaler utan att ladda upp filer.";
9
+
10
+ const ui: ImageToPdfUI = {
11
+ formatLabel: 'WebP',
12
+ dropTitle: "Skapa en PDF från dina WebP-bilder",
13
+ dropText: "Dra WebP-filer hit. Ordningen du väljer blir sidordningen.",
14
+ selectFiles: "Välj WebP-filer",
15
+ privacyNote: "Allt sker i webbläsaren. Dina bilder laddas aldrig upp.",
16
+ optionsTitle: "Utskriftsark",
17
+ settingsTitle: "Pappersinställningar",
18
+ pageSizeLabel: "Pappersstorlek",
19
+ a4: 'A4',
20
+ letter: 'Letter',
21
+ orientationLabel: "Orientering",
22
+ portrait: "Stående",
23
+ landscape: "Liggande",
24
+ marginLabel: "Marginaler",
25
+ pagesTitle: "Sidor",
26
+ reorderHint: "Ändra ordning på sidorna före export.",
27
+ page: "Sida",
28
+ pageSingular: "sida",
29
+ pagePlural: "sidor",
30
+ moveUp: "Flytta upp",
31
+ moveDown: "Flytta ned",
32
+ remove: "Ta bort",
33
+ emptyPages: "Dina valda bilder visas här.",
34
+ createPdf: "Skapa PDF",
35
+ reset: "Börja om",
36
+ ready: "Redo för dina bilder",
37
+ processing: "Förbereder bild",
38
+ error: "Kunde inte läsa bilden",
39
+ downloadPdf: "Ladda ned PDF",
40
+ building: "Skapar PDF",
41
+ pdfReady: "Din PDF är klar",
42
+ invalidFile: "Det här verktyget accepterar endast WebP- och JPEG-filer.",
43
+ bibliographyTitle: "Referenser",
44
+ faqTitle: "Vanliga frågor",
45
+ };
46
+
47
+ const faq: WebpToPdfLocaleContent['faq'] = [
48
+ {
49
+ "question": "Kan jag slå ihop flera WebP-bilder till en PDF?",
50
+ "answer": "Ja. Välj dina WebP-filer, ordna sidorna och exportera en samlad PDF-fil."
51
+ },
52
+ {
53
+ "question": "Laddas mina bilder upp till någon server?",
54
+ "answer": "Nej. Hela konverteringen sker lokalt i din webbläsare."
55
+ },
56
+ {
57
+ "question": "Kan jag välja pappersstorlek som A4 eller Letter?",
58
+ "answer": "Ja. Du kan välja A4 eller Letter samt ställa in orientering och marginaler."
59
+ }
60
+ ];
61
+
62
+ const howTo: WebpToPdfLocaleContent['howTo'] = [
63
+ {
64
+ "name": "Välj WebP-bilder",
65
+ "text": "Dra dina WebP-filer eller välj dem från din enhet."
66
+ },
67
+ {
68
+ "name": "Ordna sidor och papper",
69
+ "text": "Justera sidordningen, välj A4/Letter, orientering och marginaler."
70
+ },
71
+ {
72
+ "name": "Skapa och ladda ned PDF",
73
+ "text": "Klicka på Skapa PDF och ladda ned den färdiga filen."
74
+ }
75
+ ];
76
+
77
+ const seo: WebpToPdfLocaleContent['seo'] = [
78
+ {
79
+ "type": "title",
80
+ "text": "Skapa ett utskriftsklart PDF-dokument från dina WebP-bilder",
81
+ "level": 2
82
+ },
83
+ {
84
+ "type": "paragraph",
85
+ "html": "Denna WebP till PDF-omvandlare samlar dina foton eller skannade filer i ett strukturerat PDF-dokument. Anpassa ordning och pappersinställningar snabbt."
86
+ },
87
+ {
88
+ "type": "title",
89
+ "text": "Enkelt och snyggt resultat",
90
+ "level": 3
91
+ },
92
+ {
93
+ "type": "list",
94
+ "icon": "mdi:check-circle",
95
+ "items": [
96
+ "Sortera sidorna så att dokumentet får rätt följd.",
97
+ "Välj stående eller liggande format utifrån bildernas form.",
98
+ "Justera marginalerna för perfekt utskrift på din skrivare."
99
+ ]
100
+ },
101
+ {
102
+ "type": "tip",
103
+ "title": "Trygg och privat hantering",
104
+ "html": "Bearbetningen sker helt i din webbläsare så dina privata bilder stannar hos dig."
105
+ }
106
+ ];
107
+
108
+ export const content: WebpToPdfLocaleContent = {
109
+ slug, title, description, ui, seo, faq, bibliography, howTo,
110
+ schemas: generateSchemas({ title, description, inLanguage: 'sv', faq, howTo }),
111
+ };
@@ -0,0 +1,111 @@
1
+ import { generateSchemas } from '../../../shared/logic/schemas';
2
+ import { bibliography } from '../bibliography';
3
+ import type { WebpToPdfLocaleContent } from '../entry';
4
+ import type { ImageToPdfUI } from '../../../shared/image-to-pdf/ui';
5
+
6
+ const slug = 'webp-pdf-donusturucu';
7
+ const title = "WebP PDF Dönüştürücü";
8
+ const description = "WebP görsellerini tarayıcınızda sıralı bir PDF dosyasına dönüştürün. Dosya yüklemeden kağıt boyutu, yönlendirme ve kenar boşluklarını seçin.";
9
+
10
+ const ui: ImageToPdfUI = {
11
+ formatLabel: 'WebP',
12
+ dropTitle: "WebP görsellerinizden PDF oluşturun",
13
+ dropText: "WebP dosyalarını buraya sürükleyin. Seçtiğiniz sıra sayfa sırası olacaktır.",
14
+ selectFiles: "WebP dosyalarını seçin",
15
+ privacyNote: "Her şey tarayıcıda işlenir. Görselleriniz asla sunucuya yüklenmez.",
16
+ optionsTitle: "Baskı sayfası",
17
+ settingsTitle: "Kağıt ayarları",
18
+ pageSizeLabel: "Kağıt boyutu",
19
+ a4: 'A4',
20
+ letter: 'Letter',
21
+ orientationLabel: "Yönlendirme",
22
+ portrait: "Dikey",
23
+ landscape: "Yatay",
24
+ marginLabel: "Kenar boşlukları",
25
+ pagesTitle: "Sayfalar",
26
+ reorderHint: "Dışa aktarmadan önce sayfa sırasını düzenleyin.",
27
+ page: "Sayfa",
28
+ pageSingular: "sayfa",
29
+ pagePlural: "sayfa",
30
+ moveUp: "Yukarı taşı",
31
+ moveDown: "Aşağı taşı",
32
+ remove: "Kaldır",
33
+ emptyPages: "Seçtiğiniz görseller burada görünecektir.",
34
+ createPdf: "PDF Oluştur",
35
+ reset: "Sıfırla",
36
+ ready: "Görselleriniz için hazır",
37
+ processing: "Görsel hazırlanıyor",
38
+ error: "Görsel okunamadı",
39
+ downloadPdf: "PDF İndir",
40
+ building: "PDF oluşturuluyor",
41
+ pdfReady: "PDF dosyanız hazır",
42
+ invalidFile: "Bu araç yalnızca WebP ve JPEG dosyalarını kabul eder.",
43
+ bibliographyTitle: "Kaynaklar",
44
+ faqTitle: "Sıkça sorulan sorular",
45
+ };
46
+
47
+ const faq: WebpToPdfLocaleContent['faq'] = [
48
+ {
49
+ "question": "Birden fazla WebP görselini tek bir PDF de birleştirebilir miyim?",
50
+ "answer": "Evet. İstediğiniz kadar WebP dosyası seçin, sayfa sırasını düzenleyin ve tek bir PDF olarak indirin."
51
+ },
52
+ {
53
+ "question": "Görsellerim bir sunucuya yükleniyor mu?",
54
+ "answer": "Hayır. Tüm dönüştürme işlemi yerel olarak tarayıcınızda gerçekleşir."
55
+ },
56
+ {
57
+ "question": "A4 veya Letter kağıt boyutunu seçebilir miyim?",
58
+ "answer": "Evet. A4 veya Letter boyutunu, sayfa yönünü ve kenar boşluklarını belirleyebilirsiniz."
59
+ }
60
+ ];
61
+
62
+ const howTo: WebpToPdfLocaleContent['howTo'] = [
63
+ {
64
+ "name": "WebP görsellerini seçin",
65
+ "text": "WebP dosyalarınızı sürükleyin veya cihazınızdan seçin."
66
+ },
67
+ {
68
+ "name": "Sayfaları ve kağıdı düzenleyin",
69
+ "text": "Görselleri sıralayın, A4/Letter boyutunu, yönü ve kenar boşluklarını ayarlayın."
70
+ },
71
+ {
72
+ "name": "PDF oluşturun ve indirin",
73
+ "text": "PDF Oluştur butonuna tıklayın ve belgenizi indirin."
74
+ }
75
+ ];
76
+
77
+ const seo: WebpToPdfLocaleContent['seo'] = [
78
+ {
79
+ "type": "title",
80
+ "text": "WebP görsellerinizi baskıya hazır bir PDF dokümanına dönüştürün",
81
+ "level": 2
82
+ },
83
+ {
84
+ "type": "paragraph",
85
+ "html": "Bu WebP - PDF dönüştürücü, fotoğraflarınızı veya taramalarınızı düzenli tek bir PDF dosyasında toplamanıza olanak tanır. Sayfa sırasını ve kağıt ayarlarını kolayca yapın."
86
+ },
87
+ {
88
+ "type": "title",
89
+ "text": "Düzenli ve kaliteli PDF oluşturma",
90
+ "level": 3
91
+ },
92
+ {
93
+ "type": "list",
94
+ "icon": "mdi:check-circle",
95
+ "items": [
96
+ "Görsellerin sırasını dilediğiniz gibi düzenleyin.",
97
+ "Görsellerinizin yapısına göre dikey veya yatay yönü seçin.",
98
+ "Yazıcıdan sorunsuz çıktı almak için kenar boşluklarını ayarlayın."
99
+ ]
100
+ },
101
+ {
102
+ "type": "tip",
103
+ "title": "%100 Gizlilik garantisi",
104
+ "html": "Tüm işlemler yerel olarak tarayıcınızda yapılır, dosyalarınız internete aktarılmaz."
105
+ }
106
+ ];
107
+
108
+ export const content: WebpToPdfLocaleContent = {
109
+ slug, title, description, ui, seo, faq, bibliography, howTo,
110
+ schemas: generateSchemas({ title, description, inLanguage: 'tr', faq, howTo }),
111
+ };
@@ -0,0 +1,111 @@
1
+ import { generateSchemas } from '../../../shared/logic/schemas';
2
+ import { bibliography } from '../bibliography';
3
+ import type { WebpToPdfLocaleContent } from '../entry';
4
+ import type { ImageToPdfUI } from '../../../shared/image-to-pdf/ui';
5
+
6
+ const slug = 'webp-to-pdf-converter';
7
+ const title = "WebP 转 PDF 转换器 Tool";
8
+ const description = "在浏览器中将 WebP 图片转换为排版整齐的 PDF。无需上传文件,轻松选择纸张大小、方向及页边距。";
9
+
10
+ const ui: ImageToPdfUI = {
11
+ formatLabel: 'WebP',
12
+ dropTitle: "根据 WebP 图片生成 PDF",
13
+ dropText: "拖放 WebP 文件至此处。您排列的顺序将直接作为 PDF 的页面顺序。",
14
+ selectFiles: "选择 WebP 文件",
15
+ privacyNote: "所有转换均在本地浏览器完成,您的图片绝不会被上传。",
16
+ optionsTitle: "打印页面",
17
+ settingsTitle: "纸张设置",
18
+ pageSizeLabel: "纸张大小",
19
+ a4: 'A4',
20
+ letter: 'Letter',
21
+ orientationLabel: "方向",
22
+ portrait: "纵向",
23
+ landscape: "横向",
24
+ marginLabel: "页边距",
25
+ pagesTitle: "页面列表",
26
+ reorderHint: "导出前可调整页面先后顺序。",
27
+ page: "页",
28
+ pageSingular: "页",
29
+ pagePlural: "页",
30
+ moveUp: "上移",
31
+ moveDown: "下移",
32
+ remove: "删除",
33
+ emptyPages: "您选择的图片将显示在这里。",
34
+ createPdf: "生成 PDF",
35
+ reset: "重新开始",
36
+ ready: "已准备好接收图片",
37
+ processing: "正在准备图片",
38
+ error: "无法读取该图片",
39
+ downloadPdf: "下载 PDF",
40
+ building: "正在生成 PDF",
41
+ pdfReady: "您的 PDF 已就绪",
42
+ invalidFile: "本工具仅支持 WebP 和 JPEG 格式文件。",
43
+ bibliographyTitle: "参考文献",
44
+ faqTitle: "常见问题",
45
+ };
46
+
47
+ const faq: WebpToPdfLocaleContent['faq'] = [
48
+ {
49
+ "question": "可以将多张 WebP 图片合并为一个 PDF 吗?",
50
+ "answer": "可以。只需选择需要的 WebP 文件,调整好页面先后顺序,即可导出一份完整的 PDF 文档。"
51
+ },
52
+ {
53
+ "question": "我的图片会被上传到服务器吗?",
54
+ "answer": "不会。所有的转换过程均在您的本地浏览器中完成。"
55
+ },
56
+ {
57
+ "question": "可以选择 A4 或 Letter 纸张规格吗?",
58
+ "answer": "可以。您可以自由选择 A4 或 Letter 尺寸,并调整横纵方向与页边距。"
59
+ }
60
+ ];
61
+
62
+ const howTo: WebpToPdfLocaleContent['howTo'] = [
63
+ {
64
+ "name": "选择 WebP 图片",
65
+ "text": "将 WebP 文件拖入区域或从设备中选择。"
66
+ },
67
+ {
68
+ "name": "排序并设置纸张",
69
+ "text": "调整图片先后顺序,并设置 A4/Letter 纸张、方向及页边距。"
70
+ },
71
+ {
72
+ "name": "生成并下载 PDF",
73
+ "text": "点击 '生成 PDF',就绪后保存文档到本地。"
74
+ }
75
+ ];
76
+
77
+ const seo: WebpToPdfLocaleContent['seo'] = [
78
+ {
79
+ "type": "title",
80
+ "text": "将 WebP 图片快速合并为便于打印的 PDF 文档",
81
+ "level": 2
82
+ },
83
+ {
84
+ "type": "paragraph",
85
+ "html": "这款 WebP 转 PDF 转换器能够帮您把多张照片或扫描件整合成一个结构清晰的 PDF 文件。支持自由调整排序与页面规格。"
86
+ },
87
+ {
88
+ "type": "title",
89
+ "text": "制作精美 PDF 的小技巧",
90
+ "level": 3
91
+ },
92
+ {
93
+ "type": "list",
94
+ "icon": "mdi:check-circle",
95
+ "items": [
96
+ "按逻辑调整图片顺次,确保封面或重要照片在最前。",
97
+ "根据图片宽高比例选择纵向或横向版式。",
98
+ "适当增加页边距,防止家庭打印机打印时切边。"
99
+ ]
100
+ },
101
+ {
102
+ "type": "tip",
103
+ "title": "隐私安全无忧",
104
+ "html": "所有文件转换均在本地浏览器中完成,绝不会上传至任何第三方服务器。"
105
+ }
106
+ ];
107
+
108
+ export const content: WebpToPdfLocaleContent = {
109
+ slug, title, description, ui, seo, faq, bibliography, howTo,
110
+ schemas: generateSchemas({ title, description, inLanguage: 'zh', faq, howTo }),
111
+ };
@@ -0,0 +1,11 @@
1
+ import type { ToolDefinition } from '../../types';
2
+ import { webpToPdf } from './entry';
3
+
4
+ export * from './entry';
5
+
6
+ export const WEBP_TO_PDF_TOOL: ToolDefinition = {
7
+ entry: webpToPdf,
8
+ Component: () => import('./component.astro'),
9
+ SEOComponent: () => import('./seo.astro'),
10
+ BibliographyComponent: () => import('./bibliography.astro'),
11
+ };
@@ -0,0 +1,12 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { webpToPdf } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props { locale?: KnownLocale }
7
+ const { locale = 'en' } = Astro.props;
8
+ const content = await webpToPdf.i18n[locale]?.();
9
+ if (!content) return null;
10
+ ---
11
+
12
+ {content.seo.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -0,0 +1,3 @@
1
+ .pdf-converter-webp .pdf-converter-mark {
2
+ box-shadow: var(--n-ring);
3
+ }
package/src/tools.ts CHANGED
@@ -20,6 +20,9 @@ import { GIF_A_WEBP_TOOL } from './tool/gifAWebp';
20
20
  import { PNG_A_ICO_TOOL } from './tool/pngAIco';
21
21
  import { JPG_A_ICO_TOOL } from './tool/jpgAIco';
22
22
  import { WEBP_A_ICO_TOOL } from './tool/webpAIco';
23
+ import { JPG_TO_PDF_TOOL } from './tool/jpgToPdf';
24
+ import { PNG_TO_PDF_TOOL } from './tool/pngToPdf';
25
+ import { WEBP_TO_PDF_TOOL } from './tool/webpToPdf';
23
26
  import type { ToolDefinition } from './types';
24
27
 
25
28
  export const ALL_TOOLS: ToolDefinition[] = [
@@ -44,6 +47,9 @@ export const ALL_TOOLS: ToolDefinition[] = [
44
47
  PNG_A_ICO_TOOL,
45
48
  JPG_A_ICO_TOOL,
46
49
  WEBP_A_ICO_TOOL,
50
+ JPG_TO_PDF_TOOL,
51
+ PNG_TO_PDF_TOOL,
52
+ WEBP_TO_PDF_TOOL,
47
53
  ];
48
54
 
49
55
  export {
@@ -68,5 +74,7 @@ export {
68
74
  PNG_A_ICO_TOOL,
69
75
  JPG_A_ICO_TOOL,
70
76
  WEBP_A_ICO_TOOL,
77
+ JPG_TO_PDF_TOOL,
78
+ PNG_TO_PDF_TOOL,
79
+ WEBP_TO_PDF_TOOL,
71
80
  };
72
-