A memory leak occurs in the RadTreeView control used for the table of contents in the RadPdfViewerNavigationPane, when changing the DocumentSource of RadPdfViewer at runtime.
To work this around, you can get the RadTreeView used by RadPdfViewerNavigationPane and manually clear its internal item storage before assigning the new DocumentSource.
private void ReloadDocument()
{
var navigationPane = this.pdfViewerNavigationPane;
var navigationPaneTreeView = navigationPane.FindChildByType<RadTreeView>();
if (navigationPaneTreeView != null)
{
object itemStorage = typeof(RadTreeView)
.GetProperty("ItemStorage", BindingFlags.Instance | BindingFlags.NonPublic)
.GetValue(navigationPaneTreeView);
MethodInfo itemStorageClearMethod = itemStorage.GetType().GetMethod("Clear", BindingFlags.Instance | BindingFlags.NonPublic);
itemStorageClearMethod.Invoke(itemStorage, null);
}
this.DocumentSource = theNewDocumentSource;
}
A memory leak in RadPdfViewer when the control gets removed from the visual tree.
To work this around, use the reflection API to access the leaking VisualTarget objects and call their Dispose method manually.
var pdfViewer = hostBorder.Child as RadPdfViewer;
if (pdfViewer != null)
{
var canvas = viewer.ChildrenOfType<Canvas>().FirstOrDefault(x => x.GetType().Name.Contains("ContentElementsCanvas"));
var visualTargetsDictionaryField = canvas.GetType().GetField("pageNumberToVisualTarget", BindingFlags.NonPublic | BindingFlags.Instance);
var visualTargetsDictionary = (Dictionary<int, List<VisualTarget>>)visualTargetsDictionaryField.GetValue(canvas);
foreach (KeyValuePair<int, List<VisualTarget>> target in visualTargetsDictionary)
{
for (int i = 0; i < target.Value.Count; i++)
{
VisualTarget item = target.Value[i];
item.RootVisual = null;
item.Dispose();
}
}
}
hostBorder.Child = null;
hostBorder.Child = new RadPdfViewer() { Document = newDocument };
Word and Visual Studio allow selecting a block of text when holding down the ALT-key. It would be great, if PDFViewer could support this. It would be even greater if there could be a TextSelection constructor with page coordinates to set a region of text, which should be selected or copied.
When the pdfviewer is used inside backstagemenu then the pdf file content is not displayed.
Overprinting is option in the GraphicState that allows combining colors when drawing one object above another object. It is briefly described on page 284 and page 565 in PdfReference 1.7. However, the result of overprinting is device dependent and there are no strict instructions how the result should look like. This feature also includes support for the different blending modes.
Currently, ICC version 2 and version 4 are not supported and these colors are rendered using alternative colorspace calculations.
The fix will be available in our latest LIB release (v. 2015.1.0323).
Some colors are changed due to incorrect import of some graphic state colors.
Vertical lines with small length and big thickness are drawn as short horizontal lines with big StrokeThickess. This results in rendering them as big squares, which can hide parts of the content.
The fix will be available in next LIB release (v. 2015.1.0323).
The feature will be available in our official release 2015 Q2.
The fix will be available in our official release Q2 2015 SP.
When having Pdf with SimpleFont that does uses glyphs with missing width their width is calculated as zero due to wrong integer calculations.
This item is "Declined" because it is merged with another feedback item. Instead, you may follow this item: https://feedback.telerik.com/Project/143/Feedback/Details/155077-pdfviewer-text-is-displayed-as-rectangles-for-some-truetype-fonts
The ColorSpace element is not required for images which are using JPXDecode filter.