feat(pdf-tools): add attachments feature to embed files in PDFs

Implement new functionality to allow embedding attachments into PDF documents. The feature includes:
- UI for selecting PDF and files to attach
- Logic to embed files while preserving metadata
- Display of attached files with size information
- Download of modified PDF with embedded files
This commit is contained in:
abdullahalam123
2025-10-19 15:02:27 +05:30
parent ddeebc8142
commit 88e05e6713
11 changed files with 222 additions and 33 deletions

View File

@@ -38,6 +38,7 @@ export const singlePdfLoadTools = [
'form-filler',
'posterize',
'remove-blank-pages',
'add-attachments',
];
export const simpleTools = [

View File

@@ -282,6 +282,12 @@ export const categories = [
icon: 'files',
subtitle: 'Duplicate, reorder, and delete pages.',
},
{
id: 'add-attachments',
name: 'Add Attachments',
icon: 'paperclip',
subtitle: 'Embed one or more files into your PDF.',
},
{
id: 'split',
name: 'Split PDF',
@@ -383,7 +389,7 @@ export const categories = [
icon: 'ruler-dimension-line',
subtitle: 'Standardize all pages to a uniform size.',
},
{
{
id: 'linearize',
name: 'Linearize PDF',
icon: 'zap',