Viscomsoft UWP PDF Viewer SDK

PDFDisplayManager.Zoom property  

 

Get/Set the Zoom to a specified ratio.
 
 C#

public string Zoom { get; set;}  

Supported the following value

FitPage,
FitWidth,
Percent25,
Percent30,
Percent40,
Percent50,
Percent62dot5,
Percent75,
Percent87dot5,
Percent100,
Percent125,
Percent150,
Percent175,
Percent200,
Percent250,
Percent300,
Percent350,
Percent400

 


Namespace: Viscomsoft.UWP.PDFViewerSDK;

Example

   

[C# Syntax] 
using Viscomsoft.UWP.PDFViewerSDK;

private async void open(StorageFile file)
  {

    DocumentFactory factory = new DocumentFactory();

    IDocument doc = factory.CreateDocument(file.Name);

    bool opened = await doc.OpenAsync(file);

    _pdfDisplayManager = new PDFDisplayManager();

    _pdfDisplayManager.LicenseKey="XXXXXX";

    _pdfDisplayManager.Width = (int)Window.Current.Bounds.Width;

    _pdfDisplayManager.Height = (int)Window.Current.Bounds.Height;

    _pdfDisplayManager.Document = doc;

    _pdfDisplayManager.TextSearch.TextFound += new EventHandler(TextSearch_TextFound);

    _pdfDisplayManager.GotoPage(1);

    uiViewPanel.Child = createScrollViewControl();

    _pdfDisplayManager.Zoom = Zoom.Percent100;

  }

 async void TextSearch_TextFound(object sender, EventArgs e)
  {

    MessageDialog dlg = new MessageDialog(_pdfDisplayManager.HighlightRect.ToString());
    dlg.ShowAsync();
  }