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

Free Support Forum - aspose.com

How to superimpose a image on text in PDF

Hi Aspose Support,

I am using Aspose.Words.dll ver 11.11.0.0 and developing application in C# 4.0

I am converting MS Word document into PDF using Aspose.Words.dll

I would like to know how to superimpose a image on text in the PDF.

Please provide a code example.

Please find attached screenshots (SuperimposedImage.png & Signature&Stamp.png)

Please provide solution asap.

Thanks in advance.

Hi Sanjay,

Thanks for your inquiry. Please use the Shape.BehindText property to specify whether the shape is below or above text. Please use the following code snippet to achieve your requirements. Hope this helps you. Please let us know if you have any more queries.

Document doc = new Document(MyDir + "in.docx");
// This creates a builder and also an empty document inside the builder.
DocumentBuilder builder = new DocumentBuilder(doc);
// By default, the image is inline.
Shape shape = builder.InsertImage("d:\\aspose.jpg");
// Make the image float, put it behind text and center on the page.
shape.WrapType = WrapType.None;
shape.BehindText = false;
shape.Left = 10;
shape.Top = 100;
builder.Document.Save(MyDir + "Out.pdf");