To reproduce: On a button click call the following method: radPdfViewer.Print(true); Select the CurrentPage radio button in the showed dialog and click print. You will see the IndexOutOfRange exception. Workaround: When the dialog opens select the Pages radio button and and type in the page you want to print
To reproduce: 1.Load a document 2.Click the print button on the RadPdfViewerNavigator Please refer to the attached gif file. The sample pdf file is attached as well.
To reproduce: 1. Drag and drop RadPdfViewer and RadPdfViewerNavigator 2. Load attached file from ticket 3. Click PrintPreview button from navigator and you will see that NullRefference exception is thrown. Workaround: You can set the ShowPrintPreview property to false of RadPrintViewNavigator this.radPdfViewerNavigator1.ShowPrintPreview = false;
If the document is using fonts that are not embedded and are not installed on client machine the text is not displayed.
Workaround: update manually the RadPdfViewerNavigator.CurrentPageTextBox.
To reproduce: public Form1() { InitializeComponent(); radPdfViewer1.DocumentLoaded += radPdfViewer1_DocumentLoaded; radPdfViewer1.LoadDocument(@"..\..\TestDocument.pdf"); } void radPdfViewer1_DocumentLoaded(object sender, EventArgs e) { var pdfViewerElement = sender as RadPdfViewerElement; if (pdfViewerElement != null) { var myDocumentToPrint = new RadPrintDocument(); myDocumentToPrint.AssociatedObject = pdfViewerElement; myDocumentToPrint.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0); myDocumentToPrint.Print(); } } Please refer to the attached screenshots and sample pdf. Workaround: Specify the RadPrintDocument.DefaultPageSettings.Margins property on a way to have the right margin greater than 0
The PdfPrintPreviewDialog should allow the end user to resize it and the page preview in it should scale accordingly. This would allow the user to have a better preview of the print settings.
http://docs.telerik.com/devtools/wpf/controls/radpdfviewer/document-model/exceptionhandling
Note: If you use the next button to navigate to the next search result, the user should be notified when the end of the document is reached as well. Workaround: public Form1() { InitializeComponent(); this.radPdfViewer1.LoadDocument(@"..\..\..\samplePdf.pdf"); //create a new button CommandBarButton findNext = new CommandBarButton(); findNext.Text = PdfViewerLocalizationProvider.CurrentProvider.GetLocalizedString(PdfViewerStringId.NavigatorFindNextButton); findNext.Click += findNext_Click; findNext.Image = this.radPdfViewerNavigator1.FindNextButton.Image; //hide the currently available button this.radPdfViewerNavigator1.DefaultStrip.Items.Add(findNext); this.radPdfViewerNavigator1.FindNextButton.Visibility = ElementVisibility.Collapsed; } private void findNext_Click(object sender, EventArgs e) { if (this.radPdfViewerNavigator1.SearchTextBox.Text != string.Empty) { if (this.radPdfViewerNavigator1.AssociatedViewer == null || this.radPdfViewerNavigator1.AssociatedViewer.Document == null) { return; } PropertyInfo internalDocumentPI = typeof(RadFixedDocument).GetProperty("InternalDocument", BindingFlags.NonPublic | BindingFlags.Instance); object internalDocument = internalDocumentPI.GetValue(this.radPdfViewerNavigator1.AssociatedViewer.Document, null); object textSearch = internalDocument.GetType().GetProperty("TextSearch", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(internalDocument, null); MethodInfo mi = textSearch.GetType().GetMethod("Find", BindingFlags.Public | BindingFlags.Instance); TextSearchOptions searchOptions = new TextSearchOptions(false); SearchResult searchResult = mi.Invoke(textSearch, new object[2] { this.radPdfViewerNavigator1.SearchTextBox.Text, searchOptions }) as SearchResult; if (searchResult.Result != null) { this.radPdfViewerNavigator1.AssociatedViewer.Select(searchResult); } else { RadMessageBox.Show("No matches"); } } }
PDF Export needs to support certificate signatures so the end user of the document knows the document hasn't been changed.