Hello
I am trying to have two text stamps at the bottom of the page I want it look like this
Date: Today’s date
Confidential
I want the date at the bottom and I want ‘Confidential’ underneath. At the moment they both appear on top of each other. I have tinkered with margin properties etc but to no avail and I cant find a line break property.
private static void SetupPages(Document pdfDocument)
{
pdfDocument.ProcessParagraphs();
SetPageDimensions(pdfDocument);
foreach (var page in pdfDocument.Pages)
{
page.AddStamp(SetDateStamp());
page.AddStamp(SetConfidentialStamp());
}
}
private static TextStamp SetDateStamp()
{
var dateTextStamp =
new TextStamp($"Date: {SystemTime.UtcNow.ToString()}")
{
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Bottom
};
SetTextStampMarginAndColor(dateTextStamp);
return dateTextStamp;
}
private static TextStamp SetConfidentialStamp()
{
var userTextStamp = new TextStamp("Confidential")
{
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Bottom,
BottomMargin = 200
};
SetTextStampMarginAndColor(userTextStamp);
return userTextStamp;
}