Hello
I am have a problem with pdf wiewer when the PDF file contains an images , it is slow in movement and it is difficult to navigate between pages. Is it possible to fix this problem
Use the attached pdf document and launch the PdfPrintPreviewDialog. As it is demonstrated in the gif file, the preview dialog moves the pages slower than the pdf viewer itself.
Expected behavior: the performance for navigating the pages should be at least identical.
This is the result with R3 2022:
This is the result with R2 2023 SP1:
Load a document with bookmarks and select the bookmarks options. Then, move the splitter:
Expected: the selected option (bookmarks) is unchanged
Actual: the selected option (bookmarks) is not preserved and it is reset
Is there a way to load this RadFixedDocument into a RadPdfViewer without writing the document to a file first and then loading it in the viewer?
Workaround:
You can achieve the desired functionality by exporting the RadFixedDocument to a MemoryStream instead of a file in the file system and then load it in the PdfViewer:
RadFixedDocument document = CreateRadFixedDocument();
PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
Stream ms = new MemoryStream();
pdfFormatProvider.Export(document, ms);
radPdfViewer1.LoadDocument(ms);
When creating many instances of RadPdfViewer:
static void Main(string[] args)
{
int i = 1;
try
{
Stopwatch stopwatch = Stopwatch.StartNew();
while (true)
{
using (RadPdfViewer pdfViewer = new RadPdfViewer())
{
}
Console.WriteLine($"iteration {i}, elapsed seconds: {stopwatch.Elapsed.TotalSeconds}");
i++;
}
}
catch (Exception e)
{
Console.WriteLine($"Exception occurred at iteration {i}");
Console.WriteLine(e);
Console.ReadLine();
}
}
the following error occurs:
System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+. at System.Drawing.Bitmap.GetHicon() at Telerik.WinControls.PdfViewer.MouseHandlers.PanHandler..ctor(MouseHandlersController controller, IFixedDocumentPresenter presenter) at Telerik.WinControls.PdfViewer.MouseHandlers.MouseHandlersController.BuildHandlers(IFixedDocumentPresenter presenter) at Telerik.WinControls.PdfViewer.MouseHandlers.MouseHandlersController..ctor(IFixedDocumentPresenter presenter) at Telerik.WinControls.UI.RadPdfViewerElement..ctor() at Telerik.WinControls.UI.RadPdfViewer.CreateViewerElement() at Telerik.WinControls.UI.RadPdfViewer.CreateChildItems(RadElement parent) at Telerik.WinControls.RadControl.Telerik.WinControls.IComponentTreeHandler.CreateChildItems(RadElement parent) at Telerik.WinControls.RadElementTree.InitializeRootElement() at Telerik.WinControls.RadControl.Construct() at Telerik.WinControls.RadControl..ctor() at Telerik.WinControls.UI.RadPdfViewer..ctor()
Handled InvalidDataException occurs while Zip Library tries to decompress wrongly decrypted stream.
According to PDF format specification, there are three valid encoding name values (MacRomanEncoding, MacExpertEncoding and WinAnsiEncoding). There are documents that instead of skipping the optional Encoding property, are writing invalid /NULL name value in the font dictionary. Currently, in this invalid document scenario RadPdfViewer throws and catches Exception and this results in missing text content. We may handle this invalid document scenario by ignoring the invalid Encoding value.
It seems that this is a regression in R1 2023 SP1 after addressing this item:
Add functionality for a PDF form filler that supports text auto-sizing/shrinking like Adobe:
Open the Demo application >> Interactive Forms example and apply the Office2019Dark theme. You will notice that if the text field enters edit mode, it is difficult to read the input due to black fore color and black backcolor: