When Find Next is used multiple times fast, and pages are still loaded asynchronously, sometimes NullReferenceException is thrown with the following call stack: System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.Documents.Fixed.Text.TextRecognizer.GetLastCharacter() at Telerik.Windows.Documents.Fixed.Text.TextRecognizer.IsLineBreak(Glyph glyph) at Telerik.Windows.Documents.Fixed.Text.TextRecognizer.ProcessGlyph(Glyph glyph) at Telerik.Windows.Documents.Fixed.Text.TextRecognizer.CreateTextPage(RadFixedPageInternal page) at Telerik.Windows.Documents.Fixed.Text.TextDocument.GetTextPage(Int32 index) at Telerik.Windows.Documents.Fixed.Search.KMPTextSearch.FindNext(TextDocument document, TextPosition startPosition, String searchText, Boolean matchCase, Boolean wholeWordsOnly) at Telerik.Windows.Documents.Fixed.Search.TextSearch.Find(String text, TextSearchOptions options) ...
This exception seems to be related to AES algorithm PaddingMode property.
This is reproducible for images with FlateDecode and predictor value in the range between 10 and 15. As an example you may take a look at the DecodeParms property in the following image PDF dictionary: << /BitsPerComponent 8 /ColorSpace /DeviceRGB /DecodeParms << /BitsPerComponent 8 /Colors 3 /Columns 1024 /Predictor 15 >> /Filter /FlateDecode /Height 2868 /Subtype /Image /Type /XObject /Width 1024 /Length 1236707 >>
To reproduce: please run the attached sample project. If you reload the document, the horizontal scrollbar is not shown. Workaround: public RadForm1() { InitializeComponent(); this.radPdfViewer1.FitToWidth = false; this.radPdfViewer1.ViewerMode = Telerik.WinControls.UI.FixedDocumentViewerMode.None; this.radPdfViewer1.EnableThumbnails = false; this.radPdfViewer1.DocumentLoaded += radPdfViewer1_DocumentLoaded; this.radPdfViewer1.LoadDocument(@"..\..\Go Air - Himanshe Ajeet Dubey - 17-01-2018 - Ranchi to Mumbai.pdf"); Application.DoEvents(); } private void radPdfViewer1_DocumentLoaded(object sender, EventArgs e) { Application.DoEvents(); this.radPdfViewer1.FitToWidth = true; }
Tint transformation function is used to transform Device N color in Alternate colorspace.
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.
Workaround: public Form1() { InitializeComponent(); string pdfFilePath = Path.Combine(Application.StartupPath, "testfile1.pdf"); radPdfViewer1.LoadDocument(pdfFilePath); this.radPdfViewer1.PdfViewerElement.VScrollBar.ValueChanged+=VScrollBar_ValueChanged; } private void VScrollBar_ValueChanged(object sender, EventArgs e) { this.radPdfViewer1.PdfViewerElement.InvalidatePages(); }
Loading a page with large images (e.g. 2 JPEG images 2500x3500 each) takes a lot of time. The majority of the time is spent in decoding the images.
This is not quite a valid PDF file scenario according to PDF file specification. However, we may try handling it in order to show the correct number of pages. When the kid is of type Pages, it should be added to the pages traversal recursion only the first time it is met. The observed issue is demonstrated in the attached image.
Watermark does not look correctly and the page margins are not valid for the very small paper sizes.
Workaround: update manually the RadPdfViewerNavigator.CurrentPageTextBox.
Download the attached pdf document and open it with RadPDfViewer and Adobe Reader. You will see that our viewer renders it with the black and white colors inverted.