I am trying to add text to pdf file using Aspose.Pdf.Facades.PdfFileMend.
this is a code:
//add number of pages to the fax doc
Aspose.Pdf.Facades.PdfFileMend mender = new Aspose.Pdf.Facades.PdfFileMend(inStream, outStream);
//create formatted text
Aspose.Pdf.Facades.FormattedText text = new Aspose.Pdf.Facades.FormattedText("Total number of Pages: " + PageCount.ToString(),
System.Drawing.Color.White,
System.Drawing.Color.Black,
Aspose.Pdf.Facades.FontStyle.Courier,
Aspose.Pdf.Facades.EncodingType.Winansi,
true,
14
);
mender.AddText(text, 1, 1, 780);
mender.Close();
inStream.Close();
outStream.Close();
I can build the file , but text is not visible on background and when sent to printer I am getting error about bad pdf format.