2025-08-28 15:42:33 +01:00
|
|
|
import React, { useMemo } from "react";
|
|
|
|
import LocalIcon from "../components/shared/LocalIcon";
|
|
|
|
import { useTranslation } from "react-i18next";
|
2025-08-19 13:31:09 +01:00
|
|
|
import SplitPdfPanel from "../tools/Split";
|
|
|
|
import CompressPdfPanel from "../tools/Compress";
|
2025-08-28 15:42:33 +01:00
|
|
|
import OCRPanel from "../tools/OCR";
|
|
|
|
import ConvertPanel from "../tools/Convert";
|
|
|
|
import Sanitize from "../tools/Sanitize";
|
|
|
|
import AddPassword from "../tools/AddPassword";
|
|
|
|
import ChangePermissions from "../tools/ChangePermissions";
|
|
|
|
import RemovePassword from "../tools/RemovePassword";
|
|
|
|
import { SubcategoryId, ToolCategoryId, ToolRegistry } from "./toolsTaxonomy";
|
|
|
|
import AddWatermark from "../tools/AddWatermark";
|
2025-09-10 14:06:23 +01:00
|
|
|
import Merge from '../tools/Merge';
|
2025-08-28 15:42:33 +01:00
|
|
|
import Repair from "../tools/Repair";
|
V2 Auto rename (#4244)
# Description of Changes
This pull request introduces the new "Auto Rename PDF" tool to the
frontend, enabling users to automatically rename PDF files based on
their content. The implementation includes UI components, parameter
handling, operation logic, localization, and enhancements to the file
response utilities to support backend-provided filenames. Below are the
most important changes grouped by theme:
**Feature: Auto Rename PDF Tool**
- Added the main `AutoRename` tool component (`AutoRename.tsx`) and
registered it in the tool registry, enabling selection and execution of
the auto-rename operation in the UI.
[[1]](diffhunk://#diff-3647ca39d46d109d122d4cd6cbfe981beb4189d05b1b446e5c46824eb98a4a88R1-R80)
[[2]](diffhunk://#diff-0a3e636736c137356dd9354ff3cacbd302ebda40147545e13c62d073525d1969R17)
[[3]](diffhunk://#diff-0a3e636736c137356dd9354ff3cacbd302ebda40147545e13c62d073525d1969L359-R366)
[[4]](diffhunk://#diff-29427b8d06a23772c56645fc4b72af2980c813605abc162e3d47c2e39d026d06L25-R26)
- Implemented the settings panel (`AutoRenameSettings.tsx`) and
parameter management hook (`useAutoRenameParameters.ts`), allowing users
to configure options such as using the first text as a fallback for the
filename.
[[1]](diffhunk://#diff-b2f9474c8e5a7a42df00a12ffd2d31a785895fe1096e8ca515e6af5633a4d648R1-R27)
[[2]](diffhunk://#diff-8798a1ef451233bf3a1bf8825c12c5b434ad1a17a1beb1ca21fd972fdaceb50cR1-R19)
- Created the operation hook (`useAutoRenameOperation.ts`) to handle API
requests, error handling, and result processing for the auto-rename
feature.
**Localization**
- Added English (US and GB) translations for the new tool, including UI
labels, descriptions, error messages, and settings.
[[1]](diffhunk://#diff-e4d543afa388d9eb8a423e45dfebb91641e3558d00848d70b285ebb91c40b249R1048-R1066)
[[2]](diffhunk://#diff-14c707e28788a3a84ed5293ff6689be73d4bca00e155beaf090f9b37c978babbR1321-R1339)
**File Response Handling Enhancements**
- Updated the file response processor and related hooks to support
preserving backend-provided filenames via the `Content-Disposition`
header, ensuring files are renamed according to backend results.
[[1]](diffhunk://#diff-97ea1c842d4b269c566a3085d8555ded7f9b462d9ce8dc73706bec79fe3973e0R11)
[[2]](diffhunk://#diff-97ea1c842d4b269c566a3085d8555ded7f9b462d9ce8dc73706bec79fe3973e0L49-R51)
[[3]](diffhunk://#diff-d44da7f96721d9829f3c20bf9c7ac5b9e156b647d2c75d76e861c8c09abc5191R52-R58)
[[4]](diffhunk://#diff-d44da7f96721d9829f3c20bf9c7ac5b9e156b647d2c75d76e861c8c09abc5191L175-R183)
[[5]](diffhunk://#diff-fa8af80f4d87370d58e3a5b79df675d201f0c3aa753eda89cec03ff027c4213dL13-R21)
[[6]](diffhunk://#diff-efa525dbdeceaeb5701aa3d2303bf1d533541f65a92d985f94f33b8e87b036d1R2-R37)
These changes collectively deliver a new advanced tool for users to
automatically rename PDFs, with robust parameter handling, user
interface integration, and proper handling of filenames as determined by
backend logic.
---
## Checklist
### General
- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings
### Documentation
- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
### UI Changes (if applicable)
- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)
### Testing (if applicable)
- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
---------
Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
2025-09-05 17:12:52 +01:00
|
|
|
import AutoRename from "../tools/AutoRename";
|
2025-08-28 15:42:33 +01:00
|
|
|
import SingleLargePage from "../tools/SingleLargePage";
|
|
|
|
import UnlockPdfForms from "../tools/UnlockPdfForms";
|
|
|
|
import RemoveCertificateSign from "../tools/RemoveCertificateSign";
|
2025-09-05 12:25:30 +01:00
|
|
|
import Flatten from "../tools/Flatten";
|
2025-08-28 15:42:33 +01:00
|
|
|
import { compressOperationConfig } from "../hooks/tools/compress/useCompressOperation";
|
|
|
|
import { splitOperationConfig } from "../hooks/tools/split/useSplitOperation";
|
|
|
|
import { addPasswordOperationConfig } from "../hooks/tools/addPassword/useAddPasswordOperation";
|
|
|
|
import { removePasswordOperationConfig } from "../hooks/tools/removePassword/useRemovePasswordOperation";
|
|
|
|
import { sanitizeOperationConfig } from "../hooks/tools/sanitize/useSanitizeOperation";
|
|
|
|
import { repairOperationConfig } from "../hooks/tools/repair/useRepairOperation";
|
|
|
|
import { addWatermarkOperationConfig } from "../hooks/tools/addWatermark/useAddWatermarkOperation";
|
|
|
|
import { unlockPdfFormsOperationConfig } from "../hooks/tools/unlockPdfForms/useUnlockPdfFormsOperation";
|
|
|
|
import { singleLargePageOperationConfig } from "../hooks/tools/singleLargePage/useSingleLargePageOperation";
|
|
|
|
import { ocrOperationConfig } from "../hooks/tools/ocr/useOCROperation";
|
|
|
|
import { convertOperationConfig } from "../hooks/tools/convert/useConvertOperation";
|
|
|
|
import { removeCertificateSignOperationConfig } from "../hooks/tools/removeCertificateSign/useRemoveCertificateSignOperation";
|
|
|
|
import { changePermissionsOperationConfig } from "../hooks/tools/changePermissions/useChangePermissionsOperation";
|
2025-09-10 14:06:23 +01:00
|
|
|
import { mergeOperationConfig } from '../hooks/tools/merge/useMergeOperation';
|
V2 Auto rename (#4244)
# Description of Changes
This pull request introduces the new "Auto Rename PDF" tool to the
frontend, enabling users to automatically rename PDF files based on
their content. The implementation includes UI components, parameter
handling, operation logic, localization, and enhancements to the file
response utilities to support backend-provided filenames. Below are the
most important changes grouped by theme:
**Feature: Auto Rename PDF Tool**
- Added the main `AutoRename` tool component (`AutoRename.tsx`) and
registered it in the tool registry, enabling selection and execution of
the auto-rename operation in the UI.
[[1]](diffhunk://#diff-3647ca39d46d109d122d4cd6cbfe981beb4189d05b1b446e5c46824eb98a4a88R1-R80)
[[2]](diffhunk://#diff-0a3e636736c137356dd9354ff3cacbd302ebda40147545e13c62d073525d1969R17)
[[3]](diffhunk://#diff-0a3e636736c137356dd9354ff3cacbd302ebda40147545e13c62d073525d1969L359-R366)
[[4]](diffhunk://#diff-29427b8d06a23772c56645fc4b72af2980c813605abc162e3d47c2e39d026d06L25-R26)
- Implemented the settings panel (`AutoRenameSettings.tsx`) and
parameter management hook (`useAutoRenameParameters.ts`), allowing users
to configure options such as using the first text as a fallback for the
filename.
[[1]](diffhunk://#diff-b2f9474c8e5a7a42df00a12ffd2d31a785895fe1096e8ca515e6af5633a4d648R1-R27)
[[2]](diffhunk://#diff-8798a1ef451233bf3a1bf8825c12c5b434ad1a17a1beb1ca21fd972fdaceb50cR1-R19)
- Created the operation hook (`useAutoRenameOperation.ts`) to handle API
requests, error handling, and result processing for the auto-rename
feature.
**Localization**
- Added English (US and GB) translations for the new tool, including UI
labels, descriptions, error messages, and settings.
[[1]](diffhunk://#diff-e4d543afa388d9eb8a423e45dfebb91641e3558d00848d70b285ebb91c40b249R1048-R1066)
[[2]](diffhunk://#diff-14c707e28788a3a84ed5293ff6689be73d4bca00e155beaf090f9b37c978babbR1321-R1339)
**File Response Handling Enhancements**
- Updated the file response processor and related hooks to support
preserving backend-provided filenames via the `Content-Disposition`
header, ensuring files are renamed according to backend results.
[[1]](diffhunk://#diff-97ea1c842d4b269c566a3085d8555ded7f9b462d9ce8dc73706bec79fe3973e0R11)
[[2]](diffhunk://#diff-97ea1c842d4b269c566a3085d8555ded7f9b462d9ce8dc73706bec79fe3973e0L49-R51)
[[3]](diffhunk://#diff-d44da7f96721d9829f3c20bf9c7ac5b9e156b647d2c75d76e861c8c09abc5191R52-R58)
[[4]](diffhunk://#diff-d44da7f96721d9829f3c20bf9c7ac5b9e156b647d2c75d76e861c8c09abc5191L175-R183)
[[5]](diffhunk://#diff-fa8af80f4d87370d58e3a5b79df675d201f0c3aa753eda89cec03ff027c4213dL13-R21)
[[6]](diffhunk://#diff-efa525dbdeceaeb5701aa3d2303bf1d533541f65a92d985f94f33b8e87b036d1R2-R37)
These changes collectively deliver a new advanced tool for users to
automatically rename PDFs, with robust parameter handling, user
interface integration, and proper handling of filenames as determined by
backend logic.
---
## Checklist
### General
- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings
### Documentation
- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
### UI Changes (if applicable)
- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)
### Testing (if applicable)
- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
---------
Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
2025-09-05 17:12:52 +01:00
|
|
|
import { autoRenameOperationConfig } from "../hooks/tools/autoRename/useAutoRenameOperation";
|
2025-09-05 12:25:30 +01:00
|
|
|
import { flattenOperationConfig } from "../hooks/tools/flatten/useFlattenOperation";
|
2025-09-10 14:03:11 +01:00
|
|
|
import { redactOperationConfig } from "../hooks/tools/redact/useRedactOperation";
|
2025-08-28 15:42:33 +01:00
|
|
|
import CompressSettings from "../components/tools/compress/CompressSettings";
|
|
|
|
import SplitSettings from "../components/tools/split/SplitSettings";
|
|
|
|
import AddPasswordSettings from "../components/tools/addPassword/AddPasswordSettings";
|
|
|
|
import RemovePasswordSettings from "../components/tools/removePassword/RemovePasswordSettings";
|
|
|
|
import SanitizeSettings from "../components/tools/sanitize/SanitizeSettings";
|
|
|
|
import RepairSettings from "../components/tools/repair/RepairSettings";
|
|
|
|
import UnlockPdfFormsSettings from "../components/tools/unlockPdfForms/UnlockPdfFormsSettings";
|
|
|
|
import AddWatermarkSingleStepSettings from "../components/tools/addWatermark/AddWatermarkSingleStepSettings";
|
|
|
|
import OCRSettings from "../components/tools/ocr/OCRSettings";
|
|
|
|
import ConvertSettings from "../components/tools/convert/ConvertSettings";
|
|
|
|
import ChangePermissionsSettings from "../components/tools/changePermissions/ChangePermissionsSettings";
|
2025-09-05 12:25:30 +01:00
|
|
|
import FlattenSettings from "../components/tools/flatten/FlattenSettings";
|
2025-09-10 14:03:11 +01:00
|
|
|
import RedactSingleStepSettings from "../components/tools/redact/RedactSingleStepSettings";
|
|
|
|
import Redact from "../tools/Redact";
|
2025-08-28 15:42:33 +01:00
|
|
|
import { ToolId } from "../types/toolId";
|
2025-09-10 14:06:23 +01:00
|
|
|
import MergeSettings from '../components/tools/merge/MergeSettings';
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-26 16:31:20 +01:00
|
|
|
const showPlaceholderTools = true; // Show all tools; grey out unavailable ones in UI
|
2025-08-20 11:38:41 +01:00
|
|
|
|
2025-08-26 16:59:03 +01:00
|
|
|
// Convert tool supported file formats
|
|
|
|
export const CONVERT_SUPPORTED_FORMATS = [
|
2025-08-28 15:42:33 +01:00
|
|
|
// Microsoft Office
|
|
|
|
"doc",
|
|
|
|
"docx",
|
|
|
|
"dot",
|
|
|
|
"dotx",
|
|
|
|
"csv",
|
|
|
|
"xls",
|
|
|
|
"xlsx",
|
|
|
|
"xlt",
|
|
|
|
"xltx",
|
|
|
|
"slk",
|
|
|
|
"dif",
|
|
|
|
"ppt",
|
|
|
|
"pptx",
|
|
|
|
// OpenDocument
|
|
|
|
"odt",
|
|
|
|
"ott",
|
|
|
|
"ods",
|
|
|
|
"ots",
|
|
|
|
"odp",
|
|
|
|
"otp",
|
|
|
|
"odg",
|
|
|
|
"otg",
|
|
|
|
// Text formats
|
|
|
|
"txt",
|
|
|
|
"text",
|
|
|
|
"xml",
|
|
|
|
"rtf",
|
|
|
|
"html",
|
|
|
|
"lwp",
|
|
|
|
"md",
|
|
|
|
// Images
|
|
|
|
"bmp",
|
|
|
|
"gif",
|
|
|
|
"jpeg",
|
|
|
|
"jpg",
|
|
|
|
"png",
|
|
|
|
"tif",
|
|
|
|
"tiff",
|
|
|
|
"pbm",
|
|
|
|
"pgm",
|
|
|
|
"ppm",
|
|
|
|
"ras",
|
|
|
|
"xbm",
|
|
|
|
"xpm",
|
|
|
|
"svg",
|
|
|
|
"svm",
|
|
|
|
"wmf",
|
|
|
|
"webp",
|
|
|
|
// StarOffice
|
|
|
|
"sda",
|
|
|
|
"sdc",
|
|
|
|
"sdd",
|
|
|
|
"sdw",
|
|
|
|
"stc",
|
|
|
|
"std",
|
|
|
|
"sti",
|
|
|
|
"stw",
|
|
|
|
"sxd",
|
|
|
|
"sxg",
|
|
|
|
"sxi",
|
|
|
|
"sxw",
|
|
|
|
// Email formats
|
|
|
|
"eml",
|
|
|
|
// Archive formats
|
|
|
|
"zip",
|
|
|
|
// Other
|
|
|
|
"dbf",
|
|
|
|
"fods",
|
|
|
|
"vsd",
|
|
|
|
"vor",
|
|
|
|
"vor3",
|
|
|
|
"vor4",
|
|
|
|
"uop",
|
|
|
|
"pct",
|
|
|
|
"ps",
|
|
|
|
"pdf",
|
|
|
|
];
|
2025-08-26 16:59:03 +01:00
|
|
|
|
2025-08-19 13:31:09 +01:00
|
|
|
// Hook to get the translated tool registry
|
|
|
|
export function useFlatToolRegistry(): ToolRegistry {
|
2025-08-21 09:26:17 +01:00
|
|
|
const { t } = useTranslation();
|
|
|
|
|
2025-08-22 14:40:27 +01:00
|
|
|
return useMemo(() => {
|
|
|
|
const allTools: ToolRegistry = {
|
2025-08-28 15:42:33 +01:00
|
|
|
// Signing
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
certSign: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="workspace-premium-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.certSign.title", "Sign with Certificate"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.certSign.desc", "Signs a PDF with a Certificate/Key (PEM/P12)"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.SIGNING,
|
|
|
|
},
|
|
|
|
sign: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="signature-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.sign.title", "Sign"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.sign.desc", "Adds signature to PDF by drawing, text or image"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.SIGNING,
|
|
|
|
},
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
// Document Security
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
addPassword: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="password-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.addPassword.title", "Add Password"),
|
|
|
|
component: AddPassword,
|
|
|
|
description: t("home.addPassword.desc", "Add password protection and restrictions to PDF files"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_SECURITY,
|
2025-08-19 13:31:09 +01:00
|
|
|
maxFiles: -1,
|
2025-08-22 14:40:27 +01:00
|
|
|
endpoints: ["add-password"],
|
|
|
|
operationConfig: addPasswordOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: AddPasswordSettings,
|
|
|
|
},
|
|
|
|
addWatermark: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="branding-watermark-outline-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.watermark.title", "Add Watermark"),
|
|
|
|
component: AddWatermark,
|
|
|
|
maxFiles: -1,
|
|
|
|
description: t("home.watermark.desc", "Add a custom watermark to your PDF document."),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_SECURITY,
|
2025-08-22 14:40:27 +01:00
|
|
|
endpoints: ["add-watermark"],
|
|
|
|
operationConfig: addWatermarkOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: AddWatermarkSingleStepSettings,
|
|
|
|
},
|
|
|
|
"add-stamp": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="approval-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.AddStampRequest.title", "Add Stamp to PDF"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.AddStampRequest.desc", "Add text or add image stamps at set locations"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_SECURITY,
|
|
|
|
},
|
|
|
|
sanitize: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="cleaning-services-outline-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.sanitize.title", "Sanitize"),
|
|
|
|
component: Sanitize,
|
|
|
|
maxFiles: -1,
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_SECURITY,
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.sanitize.desc", "Remove potentially harmful elements from PDF files"),
|
2025-08-22 14:40:27 +01:00
|
|
|
endpoints: ["sanitize-pdf"],
|
|
|
|
operationConfig: sanitizeOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: SanitizeSettings,
|
|
|
|
},
|
|
|
|
flatten: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="layers-clear-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.flatten.title", "Flatten"),
|
2025-09-05 12:25:30 +01:00
|
|
|
component: Flatten,
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.flatten.desc", "Remove all interactive elements and forms from a PDF"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_SECURITY,
|
2025-09-05 12:25:30 +01:00
|
|
|
maxFiles: -1,
|
|
|
|
endpoints: ["flatten"],
|
|
|
|
operationConfig: flattenOperationConfig,
|
|
|
|
settingsComponent: FlattenSettings,
|
2025-08-28 15:42:33 +01:00
|
|
|
},
|
|
|
|
"unlock-pdf-forms": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="preview-off-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.unlockPDFForms.title", "Unlock PDF Forms"),
|
2025-08-20 11:34:28 +01:00
|
|
|
component: UnlockPdfForms,
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.unlockPDFForms.desc", "Remove read-only property of form fields in a PDF document."),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_SECURITY,
|
2025-08-20 11:34:28 +01:00
|
|
|
maxFiles: -1,
|
2025-08-22 14:40:27 +01:00
|
|
|
endpoints: ["unlock-pdf-forms"],
|
|
|
|
operationConfig: unlockPdfFormsOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: UnlockPdfFormsSettings,
|
|
|
|
},
|
|
|
|
"manage-certificates": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="license-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.manageCertificates.title", "Manage Certificates"),
|
|
|
|
component: null,
|
2025-08-28 15:42:33 +01:00
|
|
|
description: t(
|
|
|
|
"home.manageCertificates.desc",
|
|
|
|
"Import, export, or delete digital certificate files used for signing PDFs."
|
|
|
|
),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_SECURITY,
|
|
|
|
},
|
|
|
|
"change-permissions": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="lock-outline" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.changePermissions.title", "Change Permissions"),
|
|
|
|
component: ChangePermissions,
|
|
|
|
description: t("home.changePermissions.desc", "Change document restrictions and permissions"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_SECURITY,
|
2025-08-19 13:31:09 +01:00
|
|
|
maxFiles: -1,
|
2025-08-22 14:40:27 +01:00
|
|
|
endpoints: ["add-password"],
|
|
|
|
operationConfig: changePermissionsOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: ChangePermissionsSettings,
|
|
|
|
},
|
|
|
|
// Verification
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
"get-all-info-on-pdf": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="fact-check-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.getPdfInfo.title", "Get ALL Info on PDF"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.getPdfInfo.desc", "Grabs any and all information possible on PDFs"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.VERIFICATION,
|
|
|
|
},
|
|
|
|
"validate-pdf-signature": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="verified-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.validateSignature.title", "Validate PDF Signature"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.validateSignature.desc", "Verify digital signatures and certificates in PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.VERIFICATION,
|
|
|
|
},
|
2025-08-21 09:26:17 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
// Document Review
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
read: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="article-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.read.title", "Read"),
|
|
|
|
component: null,
|
2025-08-28 15:42:33 +01:00
|
|
|
workbench: "viewer",
|
|
|
|
description: t(
|
|
|
|
"home.read.desc",
|
|
|
|
"View and annotate PDFs. Highlight text, draw, or insert comments for review and collaboration."
|
|
|
|
),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_REVIEW,
|
|
|
|
},
|
|
|
|
"change-metadata": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="assignment-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.changeMetadata.title", "Change Metadata"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.changeMetadata.desc", "Change/Remove/Add metadata from a PDF document"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.DOCUMENT_REVIEW,
|
|
|
|
},
|
|
|
|
// Page Formatting
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
cropPdf: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="crop-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.crop.title", "Crop PDF"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.crop.desc", "Crop a PDF to reduce its size (maintains text!)"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
|
|
|
},
|
|
|
|
rotate: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="rotate-right-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.rotate.title", "Rotate"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.rotate.desc", "Easily rotate your PDFs."),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
|
|
|
},
|
|
|
|
split: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="content-cut-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.split.title", "Split"),
|
|
|
|
component: SplitPdfPanel,
|
|
|
|
description: t("home.split.desc", "Split PDFs into multiple documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-22 14:40:27 +01:00
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
|
|
|
operationConfig: splitOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: SplitSettings,
|
|
|
|
},
|
|
|
|
"reorganize-pages": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="move-down-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.reorganizePages.title", "Reorganize Pages"),
|
|
|
|
component: null,
|
2025-08-28 15:42:33 +01:00
|
|
|
workbench: "pageEditor",
|
|
|
|
description: t(
|
|
|
|
"home.reorganizePages.desc",
|
|
|
|
"Rearrange, duplicate, or delete PDF pages with visual drag-and-drop control."
|
|
|
|
),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
|
|
|
},
|
|
|
|
"adjust-page-size-scale": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="crop-free-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.scalePages.title", "Adjust page size/scale"),
|
|
|
|
component: null,
|
2025-08-28 15:42:33 +01:00
|
|
|
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.scalePages.desc", "Change the size/scale of a page and/or its contents."),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
|
|
|
},
|
|
|
|
addPageNumbers: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="123-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-21 09:26:17 +01:00
|
|
|
name: t("home.addPageNumbers.title", "Add Page Numbers"),
|
2025-08-19 13:31:09 +01:00
|
|
|
component: null,
|
2025-08-28 15:42:33 +01:00
|
|
|
|
2025-08-21 09:26:17 +01:00
|
|
|
description: t("home.addPageNumbers.desc", "Add Page numbers throughout a document in a set location"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
|
|
|
},
|
|
|
|
"multi-page-layout": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="dashboard-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.pageLayout.title", "Multi-Page Layout"),
|
|
|
|
component: null,
|
2025-08-28 15:42:33 +01:00
|
|
|
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.pageLayout.desc", "Merge multiple pages of a PDF document into a single page"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
|
|
|
},
|
|
|
|
"single-large-page": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="looks-one-outline-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-21 09:26:17 +01:00
|
|
|
name: t("home.pdfToSinglePage.title", "PDF to Single Large Page"),
|
2025-08-20 11:38:41 +01:00
|
|
|
component: SingleLargePage,
|
2025-08-28 15:42:33 +01:00
|
|
|
|
2025-08-21 09:26:17 +01:00
|
|
|
description: t("home.pdfToSinglePage.desc", "Merges all PDF pages into one large single page"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
2025-08-20 11:38:41 +01:00
|
|
|
maxFiles: -1,
|
2025-09-05 12:35:17 +01:00
|
|
|
urlPath: '/pdf-to-single-page',
|
2025-08-22 14:40:27 +01:00
|
|
|
endpoints: ["pdf-to-single-page"],
|
2025-08-28 15:42:33 +01:00
|
|
|
operationConfig: singleLargePageOperationConfig,
|
|
|
|
},
|
|
|
|
"add-attachments": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="attachment-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.attachments.title", "Add Attachments"),
|
|
|
|
component: null,
|
2025-08-28 15:42:33 +01:00
|
|
|
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.attachments.desc", "Add or remove embedded files (attachments) to/from a PDF"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.PAGE_FORMATTING,
|
2025-08-28 15:42:33 +01:00
|
|
|
},
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
// Extraction
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
"extract-page": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="upload-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-21 09:26:17 +01:00
|
|
|
name: t("home.extractPages.title", "Extract Pages"),
|
2025-08-19 13:31:09 +01:00
|
|
|
component: null,
|
2025-08-21 09:26:17 +01:00
|
|
|
description: t("home.extractPages.desc", "Extract specific pages from a PDF document"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.EXTRACTION,
|
|
|
|
},
|
|
|
|
"extract-images": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="filter-alt" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.extractImages.title", "Extract Images"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.extractImages.desc", "Extract images from PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.EXTRACTION,
|
|
|
|
},
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
// Removal
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
removePages: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="delete-outline-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.removePages.title", "Remove Pages"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.removePages.desc", "Remove specific pages from a PDF document"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.REMOVAL,
|
|
|
|
},
|
|
|
|
"remove-blank-pages": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="scan-delete-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.removeBlanks.title", "Remove Blank Pages"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.removeBlanks.desc", "Remove blank pages from PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.REMOVAL,
|
|
|
|
},
|
|
|
|
"remove-annotations": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="thread-unread-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.removeAnnotations.title", "Remove Annotations"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.removeAnnotations.desc", "Remove annotations and comments from PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.REMOVAL,
|
|
|
|
},
|
|
|
|
"remove-image": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="remove-selection-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.removeImagePdf.title", "Remove Image"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.removeImagePdf.desc", "Remove images from PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.REMOVAL,
|
|
|
|
},
|
|
|
|
"remove-password": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="lock-open-right-outline-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.removePassword.title", "Remove Password"),
|
|
|
|
component: RemovePassword,
|
|
|
|
description: t("home.removePassword.desc", "Remove password protection from PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.REMOVAL,
|
2025-08-19 13:31:09 +01:00
|
|
|
endpoints: ["remove-password"],
|
|
|
|
maxFiles: -1,
|
2025-08-22 14:40:27 +01:00
|
|
|
operationConfig: removePasswordOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: RemovePasswordSettings,
|
|
|
|
},
|
|
|
|
"remove-certificate-sign": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="remove-moderator-outline-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-21 09:26:17 +01:00
|
|
|
name: t("home.removeCertSign.title", "Remove Certificate Sign"),
|
2025-08-20 11:30:57 +01:00
|
|
|
component: RemoveCertificateSign,
|
2025-08-21 09:26:17 +01:00
|
|
|
description: t("home.removeCertSign.desc", "Remove digital signature from PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.STANDARD_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.REMOVAL,
|
2025-08-20 11:30:57 +01:00
|
|
|
maxFiles: -1,
|
2025-08-22 14:40:27 +01:00
|
|
|
endpoints: ["remove-certificate-sign"],
|
2025-08-28 15:42:33 +01:00
|
|
|
operationConfig: removeCertificateSignOperationConfig,
|
|
|
|
},
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
// Automation
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
automate: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="automation-outline" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.automate.title", "Automate"),
|
2025-08-28 15:42:33 +01:00
|
|
|
component: React.lazy(() => import("../tools/Automate")),
|
|
|
|
description: t(
|
|
|
|
"home.automate.desc",
|
|
|
|
"Build multi-step workflows by chaining together PDF actions. Ideal for recurring tasks."
|
|
|
|
),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-22 14:40:27 +01:00
|
|
|
subcategoryId: SubcategoryId.AUTOMATION,
|
|
|
|
maxFiles: -1,
|
2025-08-26 16:59:03 +01:00
|
|
|
supportedFormats: CONVERT_SUPPORTED_FORMATS,
|
2025-08-28 15:42:33 +01:00
|
|
|
endpoints: ["handleData"],
|
|
|
|
},
|
|
|
|
"auto-rename-pdf-file": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="match-word-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.auto-rename.title", "Auto Rename PDF File"),
|
V2 Auto rename (#4244)
# Description of Changes
This pull request introduces the new "Auto Rename PDF" tool to the
frontend, enabling users to automatically rename PDF files based on
their content. The implementation includes UI components, parameter
handling, operation logic, localization, and enhancements to the file
response utilities to support backend-provided filenames. Below are the
most important changes grouped by theme:
**Feature: Auto Rename PDF Tool**
- Added the main `AutoRename` tool component (`AutoRename.tsx`) and
registered it in the tool registry, enabling selection and execution of
the auto-rename operation in the UI.
[[1]](diffhunk://#diff-3647ca39d46d109d122d4cd6cbfe981beb4189d05b1b446e5c46824eb98a4a88R1-R80)
[[2]](diffhunk://#diff-0a3e636736c137356dd9354ff3cacbd302ebda40147545e13c62d073525d1969R17)
[[3]](diffhunk://#diff-0a3e636736c137356dd9354ff3cacbd302ebda40147545e13c62d073525d1969L359-R366)
[[4]](diffhunk://#diff-29427b8d06a23772c56645fc4b72af2980c813605abc162e3d47c2e39d026d06L25-R26)
- Implemented the settings panel (`AutoRenameSettings.tsx`) and
parameter management hook (`useAutoRenameParameters.ts`), allowing users
to configure options such as using the first text as a fallback for the
filename.
[[1]](diffhunk://#diff-b2f9474c8e5a7a42df00a12ffd2d31a785895fe1096e8ca515e6af5633a4d648R1-R27)
[[2]](diffhunk://#diff-8798a1ef451233bf3a1bf8825c12c5b434ad1a17a1beb1ca21fd972fdaceb50cR1-R19)
- Created the operation hook (`useAutoRenameOperation.ts`) to handle API
requests, error handling, and result processing for the auto-rename
feature.
**Localization**
- Added English (US and GB) translations for the new tool, including UI
labels, descriptions, error messages, and settings.
[[1]](diffhunk://#diff-e4d543afa388d9eb8a423e45dfebb91641e3558d00848d70b285ebb91c40b249R1048-R1066)
[[2]](diffhunk://#diff-14c707e28788a3a84ed5293ff6689be73d4bca00e155beaf090f9b37c978babbR1321-R1339)
**File Response Handling Enhancements**
- Updated the file response processor and related hooks to support
preserving backend-provided filenames via the `Content-Disposition`
header, ensuring files are renamed according to backend results.
[[1]](diffhunk://#diff-97ea1c842d4b269c566a3085d8555ded7f9b462d9ce8dc73706bec79fe3973e0R11)
[[2]](diffhunk://#diff-97ea1c842d4b269c566a3085d8555ded7f9b462d9ce8dc73706bec79fe3973e0L49-R51)
[[3]](diffhunk://#diff-d44da7f96721d9829f3c20bf9c7ac5b9e156b647d2c75d76e861c8c09abc5191R52-R58)
[[4]](diffhunk://#diff-d44da7f96721d9829f3c20bf9c7ac5b9e156b647d2c75d76e861c8c09abc5191L175-R183)
[[5]](diffhunk://#diff-fa8af80f4d87370d58e3a5b79df675d201f0c3aa753eda89cec03ff027c4213dL13-R21)
[[6]](diffhunk://#diff-efa525dbdeceaeb5701aa3d2303bf1d533541f65a92d985f94f33b8e87b036d1R2-R37)
These changes collectively deliver a new advanced tool for users to
automatically rename PDFs, with robust parameter handling, user
interface integration, and proper handling of filenames as determined by
backend logic.
---
## Checklist
### General
- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings
### Documentation
- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
### UI Changes (if applicable)
- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)
### Testing (if applicable)
- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
---------
Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
2025-09-05 17:12:52 +01:00
|
|
|
component: AutoRename,
|
|
|
|
maxFiles: -1,
|
|
|
|
endpoints: ["remove-certificate-sign"],
|
|
|
|
operationConfig: autoRenameOperationConfig,
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.auto-rename.desc", "Automatically rename PDF files based on their content"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.AUTOMATION,
|
|
|
|
},
|
|
|
|
"auto-split-pages": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="split-scene-right-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.autoSplitPDF.title", "Auto Split Pages"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.autoSplitPDF.desc", "Automatically split PDF pages based on content detection"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.AUTOMATION,
|
|
|
|
},
|
|
|
|
"auto-split-by-size-count": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="content-cut-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.autoSizeSplitPDF.title", "Auto Split by Size/Count"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.autoSizeSplitPDF.desc", "Automatically split PDFs by file size or page count"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.AUTOMATION,
|
|
|
|
},
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
// Advanced Formatting
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
"adjust-contrast": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="palette" width="1.5rem" height="1.5rem" />,
|
2025-08-21 09:26:17 +01:00
|
|
|
name: t("home.adjustContrast.title", "Adjust Colors/Contrast"),
|
2025-08-19 13:31:09 +01:00
|
|
|
component: null,
|
2025-08-21 09:26:17 +01:00
|
|
|
description: t("home.adjustContrast.desc", "Adjust colors and contrast of PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
|
|
|
|
},
|
|
|
|
repair: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="build-outline-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.repair.title", "Repair"),
|
2025-08-19 18:00:50 +01:00
|
|
|
component: Repair,
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.repair.desc", "Repair corrupted or damaged PDF files"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
|
2025-08-19 18:00:50 +01:00
|
|
|
maxFiles: -1,
|
2025-08-22 14:40:27 +01:00
|
|
|
endpoints: ["repair"],
|
|
|
|
operationConfig: repairOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: RepairSettings,
|
|
|
|
},
|
|
|
|
"detect-split-scanned-photos": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="scanner-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.ScannerImageSplit.title", "Detect & Split Scanned Photos"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.ScannerImageSplit.desc", "Detect and split scanned photos into separate pages"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
|
|
|
|
},
|
|
|
|
"overlay-pdfs": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="layers-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.overlay-pdfs.title", "Overlay PDFs"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.overlay-pdfs.desc", "Overlay one PDF on top of another"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
|
|
|
|
},
|
|
|
|
"replace-and-invert-color": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="format-color-fill-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.replaceColorPdf.title", "Replace & Invert Color"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.replaceColorPdf.desc", "Replace or invert colors in PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
|
|
|
|
},
|
|
|
|
"add-image": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="image-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.addImage.title", "Add Image"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.addImage.desc", "Add images to PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
|
|
|
|
},
|
|
|
|
"edit-table-of-contents": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="bookmark-add-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.editTableOfContents.title", "Edit Table of Contents"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.editTableOfContents.desc", "Add or edit bookmarks and table of contents in PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
|
|
|
|
},
|
|
|
|
"scanner-effect": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="scanner-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.fakeScan.title", "Scanner Effect"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.fakeScan.desc", "Create a PDF that looks like it was scanned"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
|
|
|
|
},
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
// Developer Tools
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
"show-javascript": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="javascript-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.showJS.title", "Show JavaScript"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.showJS.desc", "Extract and display JavaScript code from PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.DEVELOPER_TOOLS,
|
|
|
|
},
|
|
|
|
"dev-api": {
|
|
|
|
icon: <LocalIcon icon="open-in-new-rounded" width="1.5rem" height="1.5rem" style={{ color: "#2F7BF6" }} />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.devApi.title", "API"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.devApi.desc", "Link to API documentation"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DEVELOPER_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
link: "https://stirlingpdf.io/swagger-ui/5.21.0/index.html",
|
|
|
|
},
|
|
|
|
"dev-folder-scanning": {
|
|
|
|
icon: <LocalIcon icon="open-in-new-rounded" width="1.5rem" height="1.5rem" style={{ color: "#2F7BF6" }} />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.devFolderScanning.title", "Automated Folder Scanning"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.devFolderScanning.desc", "Link to automated folder scanning guide"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DEVELOPER_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
link: "https://docs.stirlingpdf.com/Advanced%20Configuration/Folder%20Scanning/",
|
|
|
|
},
|
|
|
|
"dev-sso-guide": {
|
|
|
|
icon: <LocalIcon icon="open-in-new-rounded" width="1.5rem" height="1.5rem" style={{ color: "#2F7BF6" }} />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.devSsoGuide.title", "SSO Guide"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.devSsoGuide.desc", "Link to SSO guide"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DEVELOPER_TOOLS,
|
2025-08-19 13:31:09 +01:00
|
|
|
link: "https://docs.stirlingpdf.com/Advanced%20Configuration/Single%20Sign-On%20Configuration",
|
2025-08-28 15:42:33 +01:00
|
|
|
},
|
|
|
|
"dev-airgapped": {
|
|
|
|
icon: <LocalIcon icon="open-in-new-rounded" width="1.5rem" height="1.5rem" style={{ color: "#2F7BF6" }} />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.devAirgapped.title", "Air-gapped Setup"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.devAirgapped.desc", "Link to air-gapped setup guide"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.ADVANCED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.DEVELOPER_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
link: "https://docs.stirlingpdf.com/Pro/#activation",
|
|
|
|
},
|
2025-08-19 13:31:09 +01:00
|
|
|
|
2025-08-28 15:42:33 +01:00
|
|
|
// Recommended Tools
|
|
|
|
compare: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="compare-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.compare.title", "Compare"),
|
|
|
|
component: null,
|
|
|
|
description: t("home.compare.desc", "Compare two PDF documents and highlight differences"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.RECOMMENDED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.GENERAL,
|
|
|
|
},
|
|
|
|
compress: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="zoom-in-map-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-21 09:26:17 +01:00
|
|
|
name: t("home.compress.title", "Compress"),
|
2025-08-19 13:31:09 +01:00
|
|
|
component: CompressPdfPanel,
|
2025-08-21 09:26:17 +01:00
|
|
|
description: t("home.compress.desc", "Compress PDFs to reduce their file size."),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.RECOMMENDED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.GENERAL,
|
2025-08-22 14:40:27 +01:00
|
|
|
maxFiles: -1,
|
|
|
|
operationConfig: compressOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: CompressSettings,
|
|
|
|
},
|
|
|
|
convert: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="sync-alt-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-21 09:26:17 +01:00
|
|
|
name: t("home.convert.title", "Convert"),
|
2025-08-19 13:31:09 +01:00
|
|
|
component: ConvertPanel,
|
2025-08-21 09:26:17 +01:00
|
|
|
description: t("home.convert.desc", "Convert files to and from PDF format"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.RECOMMENDED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.GENERAL,
|
2025-08-19 13:31:09 +01:00
|
|
|
maxFiles: -1,
|
2025-08-26 16:59:03 +01:00
|
|
|
supportedFormats: CONVERT_SUPPORTED_FORMATS,
|
2025-08-19 13:31:09 +01:00
|
|
|
endpoints: [
|
2025-08-28 15:42:33 +01:00
|
|
|
"pdf-to-img",
|
|
|
|
"img-to-pdf",
|
|
|
|
"pdf-to-word",
|
|
|
|
"pdf-to-presentation",
|
|
|
|
"pdf-to-text",
|
|
|
|
"pdf-to-html",
|
|
|
|
"pdf-to-xml",
|
|
|
|
"html-to-pdf",
|
|
|
|
"markdown-to-pdf",
|
|
|
|
"file-to-pdf",
|
|
|
|
"pdf-to-csv",
|
|
|
|
"pdf-to-markdown",
|
|
|
|
"pdf-to-pdfa",
|
|
|
|
"eml-to-pdf",
|
2025-08-19 13:31:09 +01:00
|
|
|
],
|
2025-08-26 16:59:03 +01:00
|
|
|
|
2025-08-22 14:40:27 +01:00
|
|
|
operationConfig: convertOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: ConvertSettings,
|
|
|
|
},
|
|
|
|
mergePdfs: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="library-add-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.merge.title", "Merge"),
|
2025-09-10 14:06:23 +01:00
|
|
|
component: Merge,
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.merge.desc", "Merge multiple PDFs into a single document"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.RECOMMENDED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.GENERAL,
|
2025-08-28 15:42:33 +01:00
|
|
|
maxFiles: -1,
|
2025-09-10 14:06:23 +01:00
|
|
|
endpoints: ["merge-pdfs"],
|
|
|
|
operationConfig: mergeOperationConfig,
|
|
|
|
settingsComponent: MergeSettings
|
2025-08-28 15:42:33 +01:00
|
|
|
},
|
|
|
|
"multi-tool": {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="dashboard-customize-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.multiTool.title", "Multi-Tool"),
|
|
|
|
component: null,
|
2025-08-28 15:42:33 +01:00
|
|
|
workbench: "pageEditor",
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.multiTool.desc", "Use multiple tools on a single PDF document"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.RECOMMENDED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.GENERAL,
|
2025-08-28 15:42:33 +01:00
|
|
|
maxFiles: -1,
|
|
|
|
},
|
|
|
|
ocr: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="quick-reference-all-outline-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.ocr.title", "OCR"),
|
|
|
|
component: OCRPanel,
|
|
|
|
description: t("home.ocr.desc", "Extract text from scanned PDFs using Optical Character Recognition"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.RECOMMENDED_TOOLS,
|
|
|
|
subcategoryId: SubcategoryId.GENERAL,
|
2025-08-22 14:40:27 +01:00
|
|
|
maxFiles: -1,
|
2025-09-05 12:35:17 +01:00
|
|
|
urlPath: '/ocr-pdf',
|
2025-08-22 14:40:27 +01:00
|
|
|
operationConfig: ocrOperationConfig,
|
2025-08-28 15:42:33 +01:00
|
|
|
settingsComponent: OCRSettings,
|
|
|
|
},
|
|
|
|
redact: {
|
2025-08-25 16:07:55 +01:00
|
|
|
icon: <LocalIcon icon="visibility-off-rounded" width="1.5rem" height="1.5rem" />,
|
2025-08-19 13:31:09 +01:00
|
|
|
name: t("home.redact.title", "Redact"),
|
2025-09-10 14:03:11 +01:00
|
|
|
component: Redact,
|
2025-08-19 13:31:09 +01:00
|
|
|
description: t("home.redact.desc", "Permanently remove sensitive information from PDF documents"),
|
2025-08-22 13:53:06 +01:00
|
|
|
categoryId: ToolCategoryId.RECOMMENDED_TOOLS,
|
2025-08-28 15:42:33 +01:00
|
|
|
subcategoryId: SubcategoryId.GENERAL,
|
2025-09-10 14:03:11 +01:00
|
|
|
maxFiles: -1,
|
|
|
|
endpoints: ["auto-redact"],
|
|
|
|
operationConfig: redactOperationConfig,
|
|
|
|
settingsComponent: RedactSingleStepSettings,
|
2025-08-28 15:42:33 +01:00
|
|
|
},
|
|
|
|
};
|
2025-08-21 09:26:17 +01:00
|
|
|
|
2025-08-22 14:40:27 +01:00
|
|
|
if (showPlaceholderTools) {
|
|
|
|
return allTools;
|
|
|
|
}
|
2025-08-26 16:31:20 +01:00
|
|
|
const filteredTools = Object.keys(allTools)
|
2025-08-28 15:42:33 +01:00
|
|
|
.filter((key) => allTools[key as ToolId].component !== null || allTools[key as ToolId].link)
|
2025-08-26 16:31:20 +01:00
|
|
|
.reduce((obj, key) => {
|
2025-08-28 15:42:33 +01:00
|
|
|
obj[key as ToolId] = allTools[key as ToolId];
|
2025-08-26 16:31:20 +01:00
|
|
|
return obj;
|
|
|
|
}, {} as ToolRegistry);
|
|
|
|
return filteredTools;
|
2025-08-22 14:40:27 +01:00
|
|
|
}, [t]); // Only re-compute when translations change
|
2025-08-21 09:26:17 +01:00
|
|
|
}
|