|
Get the zoom index. e.g. if Zoom=FitPage, the ZoomIndex = -1 , if Zoom=Percent25, the ZoomIindex =0, if Zoom=Percent200, the ZoomIindex =11. C#
public string ZoomIndex { get; set;}
|
Supported Zoom value as 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; int iZoomIndex = _pdfDisplayManager.ZoomIndex;
}
async void TextSearch_TextFound(object sender, EventArgs e) {
MessageDialog dlg = new MessageDialog(_pdfDisplayManager.HighlightRect.ToString()); dlg.ShowAsync(); }
|
|
|