import groupdocs.signature as sg
def run():
# مسیر سند را به نمونه Signature متصل کنید
with sg.Signature('input.pdf') as signature:
# تنظیمات StampSignOptions را با جزئیات لازم تنظیم کنید
options = sg.StampSignOptions()
options.Height = 180
options.Width = 180
# یک یا چند خط به مهر اضافه کنید
outerLine = sg.StampLine()
outerLine.Text = "* The Best Company *"
outerLine.TextRepeatType = sg.StampTextRepeatType.FullTextRepeat
outerLine.Font = sg.SignatureFont()
outerLine.Font.Size = 12
outerLine.Font.FamilyName = "Arial"
outerLine.Height = 22
outerLine.TextBottomIntent = 6
outerLine.TextColor = sg.Color.WhiteSmoke
outerLine.BackgroundColor = sg.Color.DarkSlateBlue
options.OuterLines.Add(outerLine)
# سند را با مهر اعمالشده ذخیره کنید
result = signature.Sign("output.pdf", options)