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.
Include Marquee Zoom as tool.
This dialog appears when one is clicking the signature field in the document.
1. Load file which is signed with digital signature 2. Scroll to the end of document - you will see that the signature is not visible.
Tint transformation function is used to transform Device N color in Alternate colorspace.
How to reproduce: check the attached video a slight cut off can also be observed with the ControlDefault and the TelerikMetro themes Workaround: CommandBarDropDownList dropDownList = this.radPdfViewerNavigator1.CommandBarElement.FindDescendant<CommandBarDropDownList>(); dropDownList.MinSize = new Size(72, 22);
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"); } } }
how to reproduce: check the attached file workaround: resize the form
It will be a nice addition to RadPdfViewer if it can export page thumbnails as an image.
When clicking on link annotations pointing to destinations in the document, and the "Fit one full page to window" mode is activated, the document is not scrolled exactly to the destination. The issue can be reproduced only in Single Page Presenter mode and when the Top and Left values of the passed parameter are greater than 0. The problem can also be observed by invoking directly GoToDestination method, as the problem is inside it.
When an image is actually consisting of a sequence of smaller images, sometimes white lines appear between the smaller images.
Add an option to save and/or email document. It is especially useful if a file stream is loaded into the viewer. Currently, the following approach can be used: private Stream GetPdfStream() { Type documentType = this.radPdfViewer1.PdfViewerElement.Document.GetType(); FieldInfo internalDocumentField = documentType.GetField("internalDocument", BindingFlags.NonPublic | BindingFlags.Instance); object internalDocumentValue = internalDocumentField.GetValue(this.radPdfViewer1.PdfViewerElement.Document); FieldInfo formatProviderField = internalDocumentValue.GetType().GetField("formatProvider", BindingFlags.NonPublic | BindingFlags.Instance); PdfFormatProvider formatProvder = formatProviderField.GetValue(internalDocumentValue) as PdfFormatProvider; FieldInfo field = formatProvder.GetType().GetField("stream", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance); Stream stream = field.GetValue(formatProvder) as Stream; return stream; }
To reproduce: public Form1() { InitializeComponent(); this.radPdfViewer1.DocumentLoaded += radPdfViewer1_DocumentLoaded; } private void radPdfViewer1_DocumentLoaded(object sender, EventArgs e) { var pdf = (RadPdfViewerElement)sender; var doc = new RadPrintDocument(); doc.AssociatedObject = pdf.ElementTree.Control as RadPdfViewer; doc.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.SomePages; doc.PrinterSettings.FromPage = 2; doc.PrinterSettings.ToPage = 1; doc.PrinterSettings.PrintFileName = @"..\..\Once upon a time.pdf"; pdf.Print(showPrinterSettings: false, document: doc); } Workaround: check FromPage before printing.