Free Support Forum - aspose.com

Loading PDF document in aspose.pdf.pdf

Hi,

As we use New aspose.word.document(fileName as string) for loading word file in aspose.word.document, how to load pdf file in new aspose.pdf.pdf. there are 2 constructors for aspose.pdf.pdf i.e. new() and new(docStream as System.IO.FileStream)

Thanks,

Ajay

Hi,

You can not load an existing PDF into Aspose.Pdf. The constructor is for specifying the output stream. For modifying existing pdf file please use Aspose.Pdf.Kit.

Thanks

If we load the PDF file using aspose.pdf.pdf(stream as FileStream) then can we edit it (adding watermark) and save it ????

I tried to do this but the existing pdf become blank.

Thank,

Hi,

Like I have said, an existing pdf can not be modified with Aspose.Pdf. Please look at http://www.aspose.com/documentation/file-format-components/aspose.pdf.kit-for-.net-and-java/add-watermark.html for information on how you can use Aspose.Pdf.Kit to add watermark to existing pdf.

Thanks.