Document security through comprehensive watermarking solutions for Java applications. This repository provides complete examples demonstrating how to watermark files, add watermark, create watermark, remove watermark, and implement invisible watermarking for documents using GroupDocs.Watermark for Java.
Protect documents with watermarks across 40+ file formats with powerful content protection with watermarking capabilities:
- Custom watermark creation with personalized text and images
- Customize watermark appearance, positioning, and transparency
- Custom fonts support for branded watermarking solutions
- Watermark automation for enterprise Java workflows
- Advanced search and removal capabilities
- Invisible watermarking for documents with steganographic techniques
- Tiling watermarks across entire document pages for comprehensive coverage
| Directory | Description |
|---|---|
| Examples | Complete Java examples showing how to watermark a document and implement document security |
Learn how to watermark your documents with this simple Java example:
// Specify an absolute or relative path to your document. Ex: "C:\\Docs\\document.pdf"
Watermarker watermarker = new Watermarker("document.pdf");
TextWatermark watermark = new TextWatermark("top secret", new Font("Arial", 36));
watermark.setForegroundColor(Color.getRed());
watermark.setHorizontalAlignment(HorizontalAlignment.Center);
watermark.setVerticalAlignment(VerticalAlignment.Center);
watermarker.add(watermark);
watermarker.save("document.pdf");
watermarker.close();- How to watermark in PDF documents with Java
- Create watermark with custom fonts and styling
- Add watermark to multiple pages simultaneously
- Customize watermark transparency and rotation angles
- Removing watermark from third-party applications
- Delete watermark from specific document regions
- Can you remove watermark from password-protected files
- How to remove watermarks in batch processing workflows
- Watermark automation for enterprise document management systems
- Content protection with watermarking for sensitive business documents
- Document security compliance implementations
- Customized product branding with corporate watermarks
How to watermark files across multiple formats using Java:
Documents: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, RTF
Images: PNG, JPG, BMP, TIFF, GIF, WEBP
Email: EML, MSG, EMLX
Other: Visio files (VSD, VSDX), OpenOffice (ODT)
Add to your pom.xml:
<repositories>
<repository>
<id>GroupDocsJavaAPI</id>
<name>GroupDocs Java API</name>
<url>https://releases.groupdocs.com/java/repo/</url>
</repository>
</repositories>- Java J2SE 7.0 (1.7) or higher
- J2SE 8.0 (1.8) recommended for optimal performance
- Compatible with all major Java IDEs
// Constants.InDocumentPdf is an absolute or relative path to your document. Ex: "C:\\Docs\\document.pdf"
Watermarker watermarker = new Watermarker(Constants.InDocumentPdf);
PossibleWatermarkCollection possibleWatermarks = watermarker.search();
for (PossibleWatermark possibleWatermark : possibleWatermarks)
{
if (possibleWatermark.getImageData() != null)
{
System.out.println(possibleWatermark.getImageData().length);
}
System.out.println(possibleWatermark.getText());
System.out.println(possibleWatermark.getX());
System.out.println(possibleWatermark.getY());
System.out.println(possibleWatermark.getRotateAngle());
System.out.println(possibleWatermark.getWidth());
System.out.println(possibleWatermark.getHeight());
}
watermarker.close();// Specify an absolute or relative path to your document. Ex: "C:\\Docs\\presentation.pptx"
Watermarker watermarker = new Watermarker("presentation.pptx");
// Use path to the image as constructor parameter
ImageWatermark watermark = new ImageWatermark("watermark.jpg");
// Add watermark to the document
watermarker.add(watermark);
watermarker.save("presentation.pptx");
watermark.close();
watermarker.close();// Specify an absolute or relative path to your document. Ex: "C:\\Docs\\document.pdf"
Watermarker watermarker = new Watermarker("document.pdf");
PossibleWatermarkCollection possibleWatermarks = watermarker.search();
// Remove possible watermark at the specified index from the document.
possibleWatermarks.removeAt(0);
// Remove specified possible watermark from the document.
possibleWatermarks.remove(possibleWatermarks.get_Item(0));
watermarker.save("document.pdf");
watermarker.close();- Invisible watermarking for documents with steganographic embedding
- Search watermarks by formatting properties (font, color, size)
- Document security with password protection integration
- Tiling watermarks with customizable spacing and patterns
- Batch processing for watermark automation for enterprise
- Custom watermark templates for consistent branding
- Multi-threaded watermark processing for high-volume scenarios
- Complete Java API Documentation
- Live Demo - How to Watermark Online
- Java API Reference Guide
- Developer Blog
- Free Support Forum - Get help with how to remove watermark from free community
- Temporary License - Test full features
java-watermarking document-security content-protection pdf-watermark document-watermark remove-watermark add-watermark custom-watermark enterprise-security java-library
Start securing your Java applications today! Clone this repository to explore comprehensive examples of how to watermark a document, implement document security, and leverage watermark automation for enterprise Java solutions.