Hello Srirangam,
Thanks for considering Aspose.
Open a Pdf file. We have a class named PdfViewer that is used to open the pdf files (available with Aspose.Pdf.Kit). But this feature is not supported in .Net only in JAVA (still that feature does not work well). There is another option if your application is Web you can open the pdf file in Browser.
public void Save(string,SaveType,HttpResponse);
If you use that method, the PDF will be displayed in the web browser. For more information kindly visit our online demos. Also refer to 129186
Pdf file can be opened using Adobe Reader with default settings. System.Diagnostics.Process.Start(@"c:/pdftest/Nayyer.pdf");But the PDF reader must be installed in your system.
Even if you need to display the Pdf files in .Net application other than Web, there is a way, you can convert the Pdf file in to Image and display it in your application. For more information kindly visit Convert the PDF Document to Specified Images
2- Regarding creating a Xerox copy or temp its quiet easy. You can use System.IO.File.Copy(). To create the copy of file over system. Pdf file can also be opened in a Memory Stream. To create a copy of Pdf file through Memory Stream please use
MemoryStream inms = new MemoryStream(File.ReadAllBytes(@"c:/pdftest/Nayyer.pdf"));
MemoryStream temp = inms;
User name can be added as a Water mark, for this purpose we have a class PdfFileStamp and watermark object is represented by Stamp Class. These classes are available in Aspose.Pdf.Kit component.
See the following piece of code.
Stamp aStamp = new Stamp();
aStamp.BindLogo(new FormattedText("Hello UserName"));
aStamp.IsBackground = false;
aStamp.Pages = new int[] { 1 };
aStamp.Rotation = 90;
aStamp.SetOrigin(50, 50);
PdfFileStamp stamper = new PdfFileStamp(inms, outms);
stamper.AddStamp(aStamp);
stamper.Close();
inms.Close(); // closes current stream & releases all resources.
temp.Close();
For more information on adding username as watermark, please visit http://www.aspose.com/documentation/file-format-components/aspose.pdf.kit-for-.net-and-java/add-logo.html
Nayyer Shahbaz
Support Developer
Aspose Changsha Team
About Us Contact Us