feat: add "Add Page Labels" tool to the application

- Introduced a new tool for adding page labels to PDF documents, allowing users to apply Roman numerals, prefixes, and custom numbering ranges.
- Created a new HTML page for the tool with a user-friendly interface for file upload and label rule configuration.
- Implemented logic for handling file uploads, processing PDF files, and applying page labels based on user-defined rules.
- Added necessary types and utility functions for managing page label styles and normalization of start values.
- Updated main application configuration to include the new tool in the navigation.
- Added tests for page label utilities to ensure correct functionality.
This commit is contained in:
alam00000
2026-03-16 14:34:27 +05:30
parent 31f43b557f
commit 477839f106
27 changed files with 2318 additions and 0 deletions

View File

@@ -86,6 +86,65 @@
"name": "페이지 번호",
"subtitle": "문서에 페이지 번호를 삽입합니다."
},
"addPageLabels": {
"name": "페이지 레이블 추가",
"subtitle": "로마 숫자, 접두사, 사용자 지정 시작값으로 PDF 페이지 레이블을 적용합니다.",
"uploadHint": "PDF 파일",
"howLabelsWorkTitle": "레이블 작동 방식",
"howLabelsWorkStep1": "모든 페이지에 레이블을 적용하려면 페이지 범위를 비워 두세요.",
"howLabelsWorkStep2": "앞부분에는 로마 숫자, 본문에는 십진 번호 같은 스타일을 사용하세요.",
"howLabelsWorkStep3": "시작값 0과 함께 접두사를 사용하면 A-0, A-1, A-2 같은 레이블을 만들 수 있습니다.",
"howLabelsWorkStep4": "하나의 규칙이 1-9,30-40 또는 홀수 페이지 같은 비연속 범위를 사용할 때 진행 옵션을 켜세요.",
"labelRulesTitle": "레이블 규칙",
"addRule": "규칙 추가",
"removeExistingLabels": "이 규칙을 적용하기 전에 기존 페이지 레이블 제거",
"cpdfNote": "이 도구는 브라우저에서 CoherentPDF를 사용합니다. CoherentPDF가 구성되지 않은 경우 WASM 설정에서 설정하라는 안내가 표시됩니다.",
"processButton": "페이지 레이블 추가",
"howItWorksUploadTitle": "파일 업로드",
"howItWorksUploadDescription": "레이블을 다시 지정할 PDF를 선택하세요.",
"howItWorksDefineTitle": "규칙 정의",
"howItWorksDefineDescription": "페이지 범위, 스타일, 접두사, 시작값으로 하나 이상의 페이지 레이블 규칙을 설정하세요.",
"howItWorksDownloadTitle": "다운로드",
"howItWorksDownloadDescription": "새 페이지 레이블이 적용된 업데이트된 PDF를 저장하세요.",
"relatedToolsTitle": "관련 PDF 도구",
"faqWhatIsQuestion": "페이지 레이블이란 무엇인가요?",
"faqWhatIsAnswer": "페이지 레이블은 PDF 리더가 썸네일, 페이지 탐색, 인쇄 대화상자에서 보여주는 번호입니다. 페이지 자체에 새 텍스트를 인쇄하지는 않습니다.",
"faqMixQuestion": "로마 숫자와 일반 숫자를 섞어 사용할 수 있나요?",
"faqMixAnswer": "예. LowercaseRoman으로 1-4, DecimalArabic으로 5-20 같은 여러 규칙을 추가하면 됩니다.",
"faqPrivacyQuestion": "내 파일은 비공개로 유지되나요?",
"faqPrivacyAnswer": "예. 처리는 CoherentPDF WASM을 사용해 브라우저에서 이루어집니다. PDF 파일은 기기를 떠나지 않습니다.",
"invalidFileTitle": "잘못된 파일",
"invalidFileMessage": "올바른 PDF 파일을 업로드하세요.",
"loadingPdf": "PDF 불러오는 중...",
"protectedPdfTitle": "보호된 PDF",
"protectedPdfMessage": "이 PDF는 암호로 보호되어 있습니다. 먼저 복호화 또는 권한 변경 도구를 사용하세요.",
"loadErrorMessage": "PDF 파일을 불러오지 못했습니다. 파일이 잘못되었거나 손상되었거나 암호로 보호되어 있을 수 있습니다.",
"fileMeta": "{{size}} • {{count}}페이지",
"ruleTitle": "레이블 규칙 {{number}}",
"pageRangeLabel": "페이지 범위",
"pageRangePlaceholder": "모든 페이지 또는 예: 1-4, 7, 홀수",
"labelStyleLabel": "레이블 스타일",
"labelPrefixLabel": "레이블 접두사",
"labelPrefixPlaceholder": "선택 접두사, 예: A-",
"startValueLabel": "시작값",
"continueNumbering": "비연속 범위에서도 번호 이어가기",
"examplesNote": "예: 앞부분 1-4는 로마 숫자, 15-20은 접두사 A-와 시작값 0, 또는 진행 옵션을 켠 홀수 페이지.",
"uploadFirstMessage": "먼저 PDF 파일을 업로드하세요.",
"applyingLabels": "페이지 레이블 적용 중...",
"invalidRangeMessage": "규칙 {{number}}에 잘못된 페이지 범위가 있습니다: {{range}}",
"allPages": "모든 페이지",
"emptyOutputMessage": "CoherentPDF가 빈 파일을 생성했습니다.",
"successMessage": "페이지 레이블이 성공적으로 추가되었습니다!",
"processErrorMessage": "페이지 레이블을 추가할 수 없습니다.",
"styleOptions": {
"DecimalArabic": "십진 숫자",
"LowercaseRoman": "소문자 로마 숫자",
"UppercaseRoman": "대문자 로마 숫자",
"LowercaseLetters": "소문자 알파벳",
"UppercaseLetters": "대문자 알파벳",
"NoLabelPrefixOnly": "번호 없이 접두사만"
}
},
"batesNumbering": {
"name": "베이츠 번호 매기기",
"subtitle": "하나 이상의 PDF에 순차적 베이츠 번호를 추가합니다."