protected void docuView_NewDocumentLoaded(object sender, NewDocumentLoadedEventArgs e) { string str = "Doc Name = " + docuView.GetDocumentName() + " Type = " + docuView.GetDocumentType(); Console.WriteLine("Doc Type Name : " + str); /* * // Update doc Name in Label * docNameLbl.Text = str; * * if (docuView.GetDocumentType() != DocumentType.DocumentTypeOpenXMLWord && * docuView.GetDocumentType() != DocumentType.DocumentTypePDF && * docuView.GetDocumentType() != DocumentType.DocumentTypeBitmap && * docuView.GetDocumentType() != DocumentType.DocumentTypeTXT ) * { * //docuView_CustomAction(sender, { actionName: "UnsupportedFile"} ); * * //CustomActionEventArgs.({"UnsupportedFile"}); * * // close the displayed doc * docuView.Close(); * * } */ /* * GdPicturePDF gdPdf = null; * docuView.GetNativePDF(out gdPdf ); * gdPdf.DeletePage(1); */ // int imgId; // docuView.GetNativeImage(out imgId); }
private static void NewDocumentLoadedHandler(object sender, NewDocumentLoadedEventArgs e) { e.docuVieware.PagePreload = e.docuVieware.PageCount <= 50 ? PagePreloadMode.AllPages : PagePreloadMode.AdjacentPages; }