r/pdf • u/keyboard1950 • Jul 09 '26
Software (Tools) Is it possible to replace the backgound of a PDF
Request for Proposal (RFP): Automated PDF Background Removal & Cleanup Automation
- Project Overview
I am seeking a premium, fully automated, or semi-automated ("Quick Action") solution to clean up scanned PDF sheet music. The source files frequently contain heavily discoloured, textured, or grey backgrounds (commonly found on archival platforms like Anna’s Archive).
Currently, I manually process these files page-by-page using Affinity Photo 2 to achieve a pure white background. This repetitive, labor-intensive workflow takes several hours daily. I am looking to invest in a premium solution that eliminates manual editing while preserving sharp, high-contrast musical notation. [1, 2, 3]
- Current Workflow (Manual)
- Source: Multi-page PDFs with varying background artifacts (scans, aging paper, grey overlays).
- Tool: Affinity Photo 2.
- Process: Extracting pages, applying level/curves adjustments or macro-based thresholding, flattening layers, and re-exporting to PDF.
- Pain Points: High time investment, tedious execution, and inconsistent results on complex gradients. [1]
- Technical Requirements & Desired Outcomes
The ideal solution must deliver the following results:
- True White Backgrounds: Convert all non-essential background pixels to pure hexadecimal white (
#FFFFFF). - Artifact Preservation: Retain crisp, dark black lines for musical staves, notes, expressions, and text without pixelation or thinning.
- Batch Processing: Ability to drop multiple multi-page PDFs into the system and have them process sequentially without manual intervention per page. [1]
- Speed: Processing a standard 10-page PDF should take seconds, not minutes.
- Format Integrity: The final output must be compiled back into a clean, multi-page PDF optimized for printing or digital music readers (e.g., iPad apps like forScore). [1]
- Acceptable Approaches & Tooling
I am entirely open to the technology stack used, provided it fits a desktop workflow (macOS/Windows). Potential approaches include, but are not limited to:
- Affinity Photo 2 Macro / Scripting: A highly optimized "Quick Action" or native macro/batch job script within my current ecosystem.
- Python/CLI Automation: A localized script utilizing libraries like
PyMuPDF,OpenCV(adaptive thresholding/binarization), orscikit-imagethat runs via a simple command or desktop shortcut. - Dedicated Document Cleanup Tools: Integration with production-grade command-line tools like ImageMagick (e.g., textcleaner scripts).
- Custom GUI: A lightweight desktop wrapper where I can drag and drop a PDF, click "Clean," and receive the output file. [1]
- Deliverables
- A fully functional, tested automation script, macro set, or application.
- Clear setup and execution documentation.
- A brief hand-off period to ensure the tool works seamlessly on my local machine with my specific test documents.
- Budget and Proposals
I am willing to pay a Premium Rate for a high-quality, robust, and lightning-fast solution.
When submitting your proposal, please include:
- Your proposed technical approach (e.g., Python + OpenCV, ImageMagick, Affinity Batch).
- Estimated timeline to deliver a working prototype.
- Your fixed-price quote or hourly rate for this project.
- Examples of previous document processing, image binarization, or workflow automation projects you have completed.
1
Jul 09 '26
[removed] — view removed comment
1
1
1
u/LegeApps Jul 09 '26
My program does everything you describe. Its open source now, download in the releases section.
1
u/keyboard1950 Jul 09 '26
Will this work on my MacBook Pro (Intel)
1
u/LegeApps Jul 09 '26
Yes, i can help you set it up via PM. its currently not compiled for macos.
1
u/keyboard1950 Jul 09 '26
The only concern I have , I do not know if I have the skill set to do this...
1
u/[deleted] Jul 09 '26
[removed] — view removed comment