NullReferenceException when the document annotations are imported.
There is opportunity to further optimize the caching mechanism of the image sources, which will reduce the memory consumption. The fast scrolling in a document containing big images could lead to an OutOfMemoryException. Openining very large images as well.
This exception seems to be related to AES algorithm PaddingMode property.
With the R1 2021 version of our controls RadPdfViewer is using the RadPdfProcessing library model. In this scenario, the PDF document contains images with sizes 87380, 87654. Internally the control is using RenderTargetBitmap to draw the image. So when we pass these values as Width and Height to the constructor of this object an exception occurs. This is a limitation of the RenderTargetBitmap class. It can be reproduced outside of the RadPdfViewer.
RenderTargetBitmap bmp = new RenderTargetBitmap(87380, 87654,96,96,PixelFormats.Pbgra32);
As a workaround, we can use the old rendering engine of the control by setting the RadPdfViewer.UsePdfProcessingModel property to false.
Tint transformation function is used to transform Device N color in Alternate colorspace.
To reproduce: Print the attached document with the MS Xps printer or PrimoPDF.
The exception is thrown during "Put" operator execution.
This is not a valid PDF scenario as having appearance state requires having multi-state appearances. However, we should handle this invalid document scenario on our side so that the app does not crash with NullReferenceException.
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; }
Add the ability to recognize if the document is in portrait or landscape mode when printing.
PdfViewer - throws System.OutOfMemoryException in PdfElementsRenderer.RenderImage when the scroll is moving fast.
The RadPdfViewer throws ArgumentOutOfRangeException, when document is loaded. Resolution: An exception message is shown when load the pdf document which contains unsupported encryption method.
Load a file in RadPdfViewer, select some of the text, right click and select Copy. A sample pdf file is attached.
To reproduce: Open a document that has highlighted areas.