aspose.PDF.Generator - set default zoom level

Actually I am unable to locate aspose.PDF.Generator

its saying, type or namespace does not exists in namespace asopse.pdf

I am using Aspose.Pdf
file version - 3.7.05
product version 2008.07.25

we have done most of the work using this dll only. now we only need to set default zoom level

Please suggest how can we acheive that

Hi there,


Thanks for your inquiry. I am afraid you are using a quite older version and default zoom level is not supported in old generator. However you can try setting zoom factor to any predefined values. Please check following documentation link for details.


Moreover, please note we maintain a single code base of our API. So it is difficult to provide hotfix of old version. We recommend you to use to migrate to latest version of Aspose.Pdf to avoid any potential issues of old versions. You can easily set default zoom of PDF using latest version as following

//setting zoom to 1 is default zoom<o:p></o:p>

double zoom = 1;

// instantiate new Document object

Document doc = new Document(myDir + "35294.pdf");

GoToAction action = new GoToAction(new XYZExplicitDestination(doc.Pages[1], doc.Pages[1].Rect.Width, doc.Pages[1].Rect.Height, zoom));

doc.OpenAction = action;

doc.Save(myDir + "Zoomed_pdf.pdf");


Please feel free to contact us for any further assistance.

Best Regards,.
devpatel90:
Actually I am unable to locate aspose.PDF.Generator

its saying, type or namespace does not exists in namespace asopse.pdf

I am using Aspose.Pdf
file version - 3.7.05
product version 2008.07.25
Hi,

Adding more to Tilal's comments, Aspose.Pdf.Generator namespace was introduced in versions starting Aspose.Pdf for .NET 6.0.0 and in version 3.7.05, there was only one namespace Aspose.Pdf.