Hi Team,
I’m using Aspose.Total licensed version. We have a requirement to have different font size and font family for Section Number and Section Title.
Currently i am using TextStamp feature for putting the title on the existing pdf. Using below piece of code for the same.
FormattedText ft = new FormattedText(“4 Sample Excel”, System.Drawing.Color.FromArgb(227, 23, 54), System.Drawing.Color.White, “Georgia”, EncodingType.Cp1250, false, 14.99f);
TextStamp textStamp = new TextStamp(ft);
// Set properties of the stamp
textStamp.TextState.FontStyle = Aspose.Pdf.Text.FontStyles.Bold;
textStamp.TopMargin = 10;
textStamp.HorizontalAlignment = HorizontalAlignment.Center;
textStamp.VerticalAlignment = VerticalAlignment.Top;
// Add header on all pages
Page pdfpage = doc.Pages[1];
pdfpage.AddStamp(textStamp);
Do we have an option in Aspose pdf to have different font size and family within a TextStamp to do this? if yes, please guide me. Please find the attached pdf’s.
SectionNumber-Title-Issue.pdf (64.2 KB)
SectionNumber-Title-Expected.pdf (119.6 KB)