Hi
I'm using PDFViewer to display several documents in my application. Most of them are shown the right way, but there are others that appear "empty", or with some graphic elements but no text. I can see them perfectly with external third party viewers.
I've just downloaded and installed 2019.3.1022, but this issue remains.
I send some samples of PDF that are not showing.
Thank you in advance for your help.
To reproduce:
doc.Pages[0].CropBox = new Rect(150, 150, doc.Pages[0].Size.Width - 30, doc.Pages[0].Size.Height - 30);
The current implementation relies on valid cross-reference table offsets in the PDF documents so that PDF objects are easily found and parsed. However, a mechanism for importing documents with invalid cross-reference table offsets may be implemented.
The attached project shows how to repair such documents.
Please refer to the attached gif file and sample project. When you hide the overflow button with the first pixel, although it is indicated as Visible, it is actually not shown.
Workaround: Timer timer = new Timer();
private void commandBarStrip_ItemOverflowed(object sender, EventArgs e)
{
timer.Interval = 100;
timer.Tick += timer_Tick;
timer.Start();
}
private void timer_Tick(object sender, EventArgs e)
{
timer.Tick -= timer_Tick;
var commandBarStrip = this.radPdfViewerNavigator1.CommandBarElement.Rows[0].Strips[0];
commandBarStrip.OverflowButton.Visibility = ElementVisibility.Visible;
timer.Stop();
}
Please refer to the attached sample screenshot demonstrating how the document look in Adobe and in RadPdfViewer.
To reproduce:
Open a large document and start scrolling fast.
The pages a blank when scrolling and are rendered after scrolling stops.
Add bookmarks functionality
When a PDF document contains images compressed with CCITTFaxDecode with applied BlackIs1 parameter, black color is visualized as white and white as black.
Currently, Tab selects the next control. Attached is sample PDF document.
Currently, RadPdfViewer uses WPF DrawingContext class for drawing page elements to a Canvas. When PDF page has many content elements (usually geometries) drawing the page may be time-consuming and freezes the UI. Instead, we should consider implementing another approach for rendering the content asynchronously which would improve the user experience.
structure The hierarchical document structure is a means to describe the PDF document structure, which is currently not supported. See 10.6.1 Structure Hierarchy on 856 page of the PDF specification for details. This document structure is an alternative to the standard PDF structure and most non-Adobe software does not support it. The document might have been created with Adobe software like Adobe LiveCycle Designer. Very often the document contains some fallback text in the standard PDF structure like: "Please wait... If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to display this type of document." "The document you are trying to load requires Adobe Reader 8 or higher. You may not have the Adobe Reader installed or your viewing environment may not be properly configured to use Adobe Reader. For information on how to install Adobe Reader and configure your viewing environment please see http://www.adobe.com/go/pdf_forms_configure." "For the best experience, open this PDF portfolio in Acrobat X, Reader X, or later."
When the file has an annotation with a destination and this destination is missing from the destinations (Dests) collection of the catalogue, KeyNotFoundException is thrown when you try to scroll to the page where the annotation is located. A better behavior would be for nothing to happen when trying to click on the annotation leading to the destination.