We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to add watermark to pdf saved on the disk?

// Open file for reading<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

System.IO.FileStream fileStream = new System.IO.FileStream("C:\\Test.Pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write);

//Writes bytes to this stream using data from a byte array.

fileStream.Write(footNoteData, 0, footNoteData.Length);

// close file stream .


how to add water mark to the above code in pdf


In order to add watermark to an existing PDF document, please follow the instructions specified over following links Working with Stamps and Watermarks

In case it does not satisfy your requirement or you have any further query, please feel free to contact.

when iam trying to execute tht text stamp code iam getting error as

textStamp refernce is not there..namespace is missing

TextStamp textStamp = new TextStamp("Sample Stamp");

FontRepository,fontstyles iam getting erros..doesnot exist in context

even at rotation also

//rotate stamp

textStamp.Rotate = Rotation.on90;

//set text properties

textStamp.TextState.Font = FontRepository.FindFont("Arial");

textStamp.TextState.FontSize = 14.0F;

textStamp.TextState.FontStyle = FontStyles.Bold;

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please confirm if you have included Aspose.Pdf and Aspose.Pdf.Text namespace to your code.

Thank You & Best Regards,