Free Support Forum - aspose.com

PdfFileStamp Constructor

Here’s the code we used to have:

// Content is a memory stream.
// outputMs is a memory stream.

PdfFileStamp pdfFileTobeStamped = new PdfFileStamp(document.Content, outputMs);

We are using above code in our existing legacy code and now with Aspose PDF 7.3 upgrade we are getting the errors as constructor has been marked as obsolete.

Can you provide us the alternative implementation for same.


Hi Kanwar,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for using our product.

In order to have a unified approach to initialize the objects and release the resources occupied by the classes present under Aspose.Pdf.Facades namespace, we have made some changes and have introduced some new methods in these classes. You can refer to the following documentation for details:

Changes in Aspose.Pdf.Facades namespace since v7.3.0

You may update your code as mentioned below to utilize the new unified approach.

PdfFileStamp pdfFileTobeStamped = new PdfFileStamp();

pdfFileTobeStamped.BindPdf(document.Content);

//Processing

pdfFileTobeStamped.Save(outputMs);

Sorry for the inconvenience,