<Window x:Class="YourProject.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:MaquetteTelerikPDFViewer"
mc:Ignorable="d"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Title="MainWindow" Height="450" Width="800">
<Grid>
<telerik:RadPdfViewer x:Name="pdfViewer"/>
</Grid>
</Window>
public partial class MainWindow: Window
{
public MainWindow()
{
InitializeComponent();
}
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
using(Stream stream = new FileStream(@"radExport.pdf",FileMode.Open,FileAccess.Read)){
pdfViewer.Document = new PdfFormatProvider(stream).Import();
}
}
}
When using SaveAsCommandDescriptor of RadPdfViewer and trying to replace a pdf file that is currently open in adobe reader causes the following exception:
System.IO.IOException: The process can not access file "C:\Temp\test.pdf" because it used by another process.
The exception is thrown with the message "Password is not correct" even when the user password is correct. This issue occurs for specific encryption algorithm parameters only.
Some files when opened with PdfViewer will throw a KeyNotFoundException which will be handled. Parts of the text in the file might or might not be missing.
Customers are reporting an issue when trying to copy content in an application hosted on a remote machine (there are reports using TigerVNC and Citrix). The exception is thrown from the Clipboard class with a message: OpenClipboard failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN)). It seems like such a behavior could be reproduced when the clipboard is already opened by another application. Here is a discussion on the matter: https://stackoverflow.com/questions/68666/clipbrd-e-cant-open-error-when-setting-the-clipboard-from-net Fix available in LIB Version 2018.3.1029.
This might result in invisible annotations.
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.
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."
Add UI for adding comments and ability to save them. Comments are represented in the document model as text annotations (annotations with Subtype Text).