Hi,
When converting Excel file to pdf, the watermark value that we added does not drop to the bottom line. We look forward to your help.
Our Code:
string kKopya = “Bulent Ercan Guner tarafindan 23.07.2019 09:20:37 tarihinde basilmistir. Boya Hazirlama Elemani Is Tarifine Göre Alinacak Egitimler Listesi - 00H-588 - 0”;
kKopya = kKopya.Replace("ı", "i").Replace("İ", "I").Replace("ş", "s").Replace("Ş", "S").Replace("ğ", "g").Replace("Ğ", "G").Replace("Ü", "U").Replace("ü", "u");
FormattedText formatText = new FormattedText(kKopya, System.Drawing.Color.Red, Aspose.Pdf.Facades.FontStyle.CourierBold, EncodingType.Cp1252, false, 8);
string outputFileName = su.MapPath("../../QDMSFiles/TEMPFOL/") + tempFileName.Substring(0, tempFileName.LastIndexOf('.')) + "_1.pdf";
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(su.MapPath("../../QDMSFiles/TEMPFOL/") + tempFileName);
Aspose.Pdf.TextStamp textStamp = new Aspose.Pdf.TextStamp(formatText);
textStamp.Opacity = 0.4f;
textStamp.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Left;
textStamp.VerticalAlignment = Aspose.Pdf.VerticalAlignment.Top;
textStamp.TopMargin = 30;
textStamp.RotateAngle = 0;
textStamp.WordWrap = true;
textStamp.LeftMargin = 10;
textStamp.RightMargin = 10;
textStamp.Justify = true;
textStamp.Scale = false;
for (int i = 1; i <= pdfDocument.Pages.Count; i++)
{
pdfDocument.Pages[i].AddStamp(textStamp);
}
pdfDocument.Save(outputFileName);
docs.zip (59.9 KB)