Before upgrading I was handling adding header/footers via memorystreams, now the constructor is deprecated. How can I still provide the same functionality working with streams, not files.
private static MemoryStream SetHeaderAndFooter(MemoryStream pdf, string header, string footer)
{
var outputPdf = new MemoryStream();
try
{
var fileStamp = new PdfFileStamp(pdf,outputPdf);
fileStamp.AddHeader(headerText, 5);
fileStamp.AddFooter(footerText, 10, 0, 0);
fileStamp.Close();
return new MemoryStream(outputPdf.ToArray());
}
catch .....
}