feat(pdf-tools): add sanitize-pdf tool for comprehensive document cleaning
Implement a new PDF sanitization tool that allows users to remove various potentially sensitive elements from PDFs including metadata, annotations, JavaScript, embedded files, and more. The tool provides configurable options through checkboxes to selectively remove different types of content while preserving the core document structure. Extract reusable utility functions from existing tools (remove-metadata, remove-annotations, flatten) to support the new sanitization feature. The tool handles edge cases gracefully and provides feedback when no changes are made.
This commit is contained in:
@@ -38,6 +38,7 @@ export const singlePdfLoadTools = [
|
||||
'posterize',
|
||||
'remove-blank-pages',
|
||||
'add-attachments',
|
||||
'sanitize-pdf',
|
||||
];
|
||||
|
||||
export const simpleTools = [
|
||||
|
||||
@@ -412,6 +412,12 @@ export const categories = [
|
||||
icon: 'lock',
|
||||
subtitle: 'Add a password to protect your PDF.',
|
||||
},
|
||||
{
|
||||
id: 'sanitize-pdf',
|
||||
name: 'Sanitize PDF',
|
||||
icon: 'shield-alert',
|
||||
subtitle: 'Remove metadata, annotations, scripts, and more.',
|
||||
},
|
||||
{
|
||||
id: 'decrypt',
|
||||
name: 'Decrypt PDF',
|
||||
|
||||
Reference in New Issue
Block a user