Load from stream

The following example democtrates how to create a watermarker for a document stream:

advanced_usage.loading_documents.LoadFromStream

// Specify an absolute or relative path to your document. Ex: "C:\\Docs\\document.docx"
FileInputStream document = new FileInputStream("document.docx");                                   
Watermarker watermarker = new Watermarker(document);                                                        
                                                                                                            
// use watermarker methods to manage watermarks                                                             
TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 12));                       
                                                                                                            
watermarker.add(watermark);                                                                                 
                                                                                                            
watermarker.save("document.docx");                                                                
                                                                                                            
watermarker.close();                                                                                      
document.close();