Click or drag to resize

PdfZoomBehavior Enumeration

Specifies the type of zoom applied to a PDF document when it is opened in a PDF viewer.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public enum PdfZoomBehavior
Members
  Member nameValueDescription
None0 How the document is displayed is left to the PDF viewer. Usually the viewer displays the document to fit page width.
ZoomFactor1 Displays the page using the specified zoom factor.
FitPage2 Displays the page so it visible entirely.
FitWidth3 Fits the width of the page.
FitHeight4 Fits the height of the page.
FitBox5 Fits the bounding box (rectangle containing all visible elements on the page).
Examples
Shows how to set the default zooming of an output PDF to 1/4 of default size.
// Open a document with multiple paragraphs
Document doc = new Document(MyDir + "Rendering.docx");

PdfSaveOptions options = new PdfSaveOptions();
options.ZoomBehavior = PdfZoomBehavior.ZoomFactor;
options.ZoomFactor = 25;
options.PageMode = PdfPageMode.UseThumbs;

// When opening the .pdf with a viewer such as Adobe Acrobat Pro, the zoom level will be at 25% by default,
// with thumbnails for each page to the left
doc.Save(ArtifactsDir + "PdfSaveOptions.ZoomBehaviour.pdf", options);
See Also