// Cung cấp tài liệu cần có tem
using (Signature signature = new Signature("input.pdf"))
{
// Khởi tạo các tùy chọn tem với các cấu hình mong muốn
StampSignOptions options = new StampSignOptions()
{
// Định nghĩa kích thước và vị trí của tem trên trang
Height = 200,
Width = 200,
VerticalAlignment = VerticalAlignment.Bottom,
HorizontalAlignment = HorizontalAlignment.Right,
AllPages = true
};
// Kết hợp các đường tròn bên ngoài với văn bản
options.OuterLines.Add(
new StampLine()
{
Text = "* The best choice *",
TextRepeatType = StampTextRepeatType.FullTextRepeat,
Font = new SignatureFont() { Size = 12, FamilyName = "Arial" },
Height = 22,
TextBottomIntent = 6,
TextColor = Color.WhiteSmoke,
BackgroundColor = Color.DarkSlateBlue
}
);
// Tích hợp các đường vuông bên trong nếu cần
options.InnerLines.Add(
new StampLine()
{
Text = "Company #1",
TextColor = Color.MediumVioletRed,
Font = new SignatureFont() { Size = 20, Bold = true },
Height = 40
}
);
// Hoàn thành và lưu tài liệu đã có tem
SignResult result = signature.Sign("output.pdf", options);
}