feat(merge): Migrate merge operations to Web Workers and reorganize tool categories
- Create merge.worker.js and alternate-merge.worker.js for offloading PDF merge operations to background threads - Migrate merge and alternate-merge logic to use Web Worker architecture for improved performance - Move flatten tool from singlePdfLoadTools to multiFileTools configuration - Update merge and alternate-merge tool subtitles to indicate bookmark preservation - Refactor alternate-merge.ts to use Web Worker instead of pdf-lib for interleaving operations - Refactor merge.ts to use Web Worker for standard merge operations - Update fileHandler.ts to recognize flatten as a multi-file tool requiring process button handling - Simplify form-creator.ts and flatten.ts implementations with Web Worker integration - Update UI state management to support Web Worker-based PDF processing - Improve performance by moving computationally intensive PDF operations off the main thread
This commit is contained in:
@@ -814,7 +814,7 @@ export const toolTemplates = {
|
||||
flatten: () => `
|
||||
<h2 class="text-2xl font-bold text-white mb-4">Flatten PDF</h2>
|
||||
<p class="mb-6 text-gray-400">Make PDF forms and annotations non-editable by flattening them.</p>
|
||||
${createFileInputHTML()}
|
||||
${createFileInputHTML({ multiple: true, showControls: true })}
|
||||
<div id="file-display-area" class="mt-4 space-y-2"></div>
|
||||
<button id="process-btn" class="hidden mt-6 btn-gradient w-full">Flatten PDF</button>
|
||||
`,
|
||||
|
||||
Reference in New Issue
Block a user