Insert stamp

How i can insert this stamp with using figure?
image.png (3.7 KB)

@azamatik471 The easiest way is to use DocumentBuilder.InsertImage

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertImage(@"с:\path\to\image\image.png");
doc.Save("output.docx");

You can read more details here.

No. Text into stamp maybe different
i think it should be figure with text into

@azamatik471 Please consider the following code.

Document doc = new Document(@"TestDoc.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToDocumentEnd();
Shape shape = builder.InsertShape(ShapeType.RoundRectangle, 240, 80);
shape.Fill.Solid(Color.White);
shape.Stroke.Color = Color.BlueViolet;
shape.Stroke.Weight = 2;
shape.AppendChild(new Paragraph(doc));
builder.MoveTo(shape.FirstParagraph);
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
builder.Font.Color = Color.BlueViolet;
builder.Font.Size = 12;
builder.Writeln("ДОКУМЕНТ·ПОДПИСАН");
builder.Write("Владелец: ");
builder.Bold = true;
builder.Write("Фамилия Имя Отчество");
doc.Save("output.docx");
1 Like