mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-10 01:14:17 +01:00
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:
1 parent
31f43b557f
commit
477839f106
27 files changed
+2318
No files matched your search
@@ -0,0 +1,22 @@
|
||||
export type PageLabelStyleName =
|
||||
| 'DecimalArabic'
|
||||
| 'LowercaseRoman'
|
||||
| 'UppercaseRoman'
|
||||
| 'LowercaseLetters'
|
||||
| 'UppercaseLetters'
|
||||
| 'NoLabelPrefixOnly';
|
||||
|
||||
export interface LabelRule {
|
||||
id: string;
|
||||
pageRange: string;
|
||||
style: PageLabelStyleName;
|
||||
prefix: string;
|
||||
startValue: number;
|
||||
progress: boolean;
|
||||
}
|
||||
|
||||
export interface AddPageLabelsState {
|
||||
file: File | null;
|
||||
pageCount: number;
|
||||
rules: LabelRule[];
|
||||
}
|
||||
@@ -51,3 +51,4 @@ export * from './scanner-effect-type.ts';
|
||||
export * from './adjust-colors-type.ts';
|
||||
export * from './bates-numbering-type.ts';
|
||||
export * from './page-preview-type.ts';
|
||||
export * from './add-page-labels-type.ts';
|
||||
Reference in new issue
Block a user