When importing a document containing a single associated widget annotation merged into the field dictionary the field is skipped on import and an exception is thrown.
According to the PDF Specification: Field Dictionaries: Kids:
An array of indirect references to the immediate children of this field.
In a non-terminal field, the Kids array is required to refer to field dictionaries that are immediate descendants of this field. In a terminal field, the Kids array ordinarily must refer to one or more separate widget annotations that are associated with this field. However, if there is only one associated widget annotation, and its contents have been merged into the field dictionary, Kids must be omitted.
Hi,
The RadPdfViewer ExportPages is broken in the new release. It works in the previous version.
The viewer is using a large amount of memory when scrolling a specific PDF file. After some point, an OutOfMemeory exception is thrown.
Workaround:
Build for the x64 platform
PdfViewer: Password protected documents cannot be opened
Workaround:
PdfFormatProvider provider = new PdfFormatProvider(); PdfImportSettings settings = this.radPdfViewer1.PdfViewerElement.ImportSettings; settings.UserPasswordNeeded += (s, a) => { a.Password = "1234"; }; provider.ImportSettings = settings; this.radPdfViewer1.LoadDocument(@"..\..\password.pdf");
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);
Hello,
When opening this document (see attached), PDF viewer crashes with following exception.
To reproduce, open this document in the Pdf Viewer WinForms example, latest version.
Screenshot attached.
************** Exception Text **************
System.InvalidCastException: Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfHexString' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfLiteralString'.
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.ExceptionHandling.ExceptionHandler.TryHandle(Exception exception)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.PageContentManager.LoadPageContent(RadFixedPage fixedPage)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.ThreadSafePageContentManager.LoadPageContent(RadFixedPage page)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.LoadOnDemandPagesCacheManager.LoadPage(RadFixedPage page)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.LoadOnDemandPagesCacheManager.BeginUsingPage(RadFixedPage page)
at Telerik.Windows.Documents.Fixed.Text.TextPageProvider.CreateTextPage(RadFixedPage fixedPage, TextDocument parent)
at Telerik.Windows.Documents.Fixed.Text.TextDocument.CreateTextPage(Int32 index)
at Telerik.Windows.Documents.Fixed.Text.TextDocument.GetTextPage(Int32 index)
at Telerik.WinControls.PdfViewer.MouseHandlers.SelectionHandler.Initialize(RadFixedDocument document)
at Telerik.WinControls.PdfViewer.MouseHandlers.MouseHandlersController.InitializeHandlers(RadFixedDocument document)
at Telerik.WinControls.UI.RadPdfViewerElement.documentLoader_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)