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. Unfortunately, you are using a quite older version and the default zoom level is not supported in the old generator. However, you can try setting the zoom factor to any predefined values. Please check the following documentation link for details:

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

// setting zoom to 1 is default zoom

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.