Dear Aspose,
I am having trouble specifying the default view for Pdf documents. I would like them all to open to fit the page width and open at the very start of the document i.e. top edge of first page.
This is the code I am using and while it zooms to the page width it does not start at the top of the document. Aspose.Pdf version 9.4.0.
Please help!
var pdfDocument = new Aspose.Pdf.Document(pdfDocumentStream); pdfDocument.OpenAction = new GoToAction(new FitHExplicitDestination(pdfDocument.Pages[1], 0d)); pdfDocument.OptimizeResources(new Aspose.Pdf.Document.OptimizationOptions { LinkDuplcateStreams = true, RemoveUnusedObjects = true, RemoveUnusedStreams = true, CompressImages = true, ImageQuality = 90 }); pdfDocument.Optimize(); pdfDocument.Save();
James