When importing a document containing Outlines (Bookmarks) containing Actions with an empty dictionary:
<</Title(Bookmarks)/Parent .../First .../Last .../Prev .../A<<>>/Count ...>
leads to an exception thrown: System.MissingMethodException: 'Cannot create an abstract class.'
Even small documents (~30 kb) containing images encoded with CCITTFaxDecode filter can take about 10 seconds to be opened. In 2014 Q1 SP1 such documents load faster.
Implement import of documents containing Type 3 fonts.
This exception seems to be caused because the stream is not decrypted correctly and the stream data is corrupted. For instance when the stream is with FlateDecode filter the exception is InvalidDataException with message "Unknown compression method".
When we render any PDF file with 'x' number of page count and try to enter page 'x+1' in telerik:CurrentPageTextBox and hit enter, it will enable the Previous Page RadButton and if we click Previous Page then it will freeze the application.
System.ArgumentOutOfRangeException: 'pageNo should be greater or equal than 1 and less or equal than 4. (Parameter 'pageNo')'
Workaround: A possible approach could be to attach to the CurrentPageTextBox` KeyDown event in order to restrict the input.
XAML:
<telerik:CurrentPageTextBox x:Name="PART_CurrentPageNumberTextBox"
KeyDown="PART_CurrentPageNumberTextBox_KeyDown"
Text="{Binding FixedDocumentViewer.CurrentPageNumber, Mode=TwoWay}"/>
private void PART_CurrentPageNumberTextBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
TextBox textBox = sender as TextBox;
if (textBox != null)
{
if (e.Key == System.Windows.Input.Key.Enter)
{
int pagesCount = this.pdfViewer.PagesCount;
int currentPageNumber = this.pdfViewer.CurrentPageNumber;
if (this.pdfViewer.Document != null && (currentPageNumber < 1 || currentPageNumber > pagesCount))
{
RadFixedPage currentPage = this.pdfViewer.CurrentPage;
int pageNum = this.pdfViewer.Document.Pages.IndexOf(currentPage) + 1;
this.pdfViewer.CurrentPageNumber = pageNum;
}
}
}
}
When modifying Interactive Forms TextBoxField's value the entered changes are preserved after is clicked out of the TextBoxField's editing area. However the changes are not applied when the click is performed on the save button. As possible workaround you can raise a MouseLeftButtonDown event on the RadPdfViewer and after this execute the SaveAsCommand. For example: private void SaveButton_Click(object sender, RoutedEventArgs e) { MouseButtonEventArgs mouseEventArgs = new MouseButtonEventArgs(Mouse.PrimaryDevice, 0, MouseButton.Left) { RoutedEvent = FrameworkElement.MouseLeftButtonDownEvent }; ((FrameworkElement)this.pdfViewer.FixedDocumentPresenter).RaiseEvent(mouseEventArgs); this.pdfViewer.CommandDescriptors.SaveAsCommandDescriptor.Command.Execute(null); }
When importing a PDF document, opening the stream in using statement, and using the default constructor of the PdfDocumentSource class, an exception is thrown:
using (Stream stream = ofd.OpenFile())
{
this.pdfViewer.DocumentSource = new PdfDocumentSource(stream);
}
using (Stream stream = ofd.OpenFile())
{
PdfImportSettings importSettings = new PdfImportSettings
{
CopyStream = true
};
this.pdfViewer.DocumentSource = new PdfDocumentSource(stream, importSettings);
}
This is caused by an incorrect order of applying the TextMatrix and the glyph stroking operation.
This is Unicode (UTF-16BE) encoding for the Adobe-GB1 character collection; contains mappings for all characters in the GB18030-2000 character set. Described on page 443 in Pdf Reference 1.7.