// Sediakan dokumen yang akan distempel
using (Signature signature = new Signature("input.jpeg"))
{
// Inisialisasi opsi stempel dengan konfigurasi yang diinginkan
StampSignOptions options = new StampSignOptions()
{
// Tentukan dimensi dan posisi stempel di halaman
Height = 200,
Width = 200,
VerticalAlignment = VerticalAlignment.Bottom,
HorizontalAlignment = HorizontalAlignment.Right,
AllPages = true
};
// Incorporate garis lingkar luar dengan teks
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
}
);
// Integrasikan garis persegi bagian dalam jika perlu
options.InnerLines.Add(
new StampLine()
{
Text = "Company #1",
TextColor = Color.MediumVioletRed,
Font = new SignatureFont() { Size = 20, Bold = true },
Height = 40
}
);
// Finalisasi dan simpan dokumen yang telah distempel
SignResult result = signature.Sign("output.jpeg", options);
}