The problem I'm trying to solve is that users do not know that the original document may not be what they are seeing in the viewer when there are layers.
A property that indicates
that a document has layers would allow the system to refuse to open the document.
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);
According to PDF format specification, there are three valid encoding name values (MacRomanEncoding, MacExpertEncoding and WinAnsiEncoding). There are documents that instead of skipping the optional Encoding property, are writing invalid /NULL name value in the font dictionary. Currently, in this invalid document scenario RadPdfViewer throws and catches Exception and this results in missing text content. We may handle this invalid document scenario by ignoring the invalid Encoding value.
Import documents that use this type of encryption. Currently, a handled NotSupportedEncryptionException with message "The encryption method with code 5 is not supported." is thrown while importing such a document.
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.
Is there a way to customize the box to request a signature?
Thanks in advance
A dictionary specifying any resources (such as fonts and images) required by the form XObject (see Section 3.7 from http://partners.adobe.com/public/developer/en/pdf/PDFReference.pdf
I am using RadPDFViewer, i built a specific toolbar for manage the funcionalities of the viewer.
I didn´t found the any event when the current page is changed in viewer. I would like to show a label "Page NN of TT".
I found this "https://www.telerik.com/forums/page-changed-detected", but didn´t have this event in RadPDFViewer.
Whats the better solution for the raise event when the current page displayed is changed?
Can you help me ?!?
Add bookmarks functionality
It will be a great addition of RadPdfViewer if it supports forms/controls.
The events should provide information as to when a page is about to be rendered and when it is displayed in the control.
1. Load file which is signed with digital signature 2. Scroll to the end of document - you will see that the signature is not visible.
Note: If you use the next button to navigate to the next search result, the user should be notified when the end of the document is reached as well. Workaround: public Form1() { InitializeComponent(); this.radPdfViewer1.LoadDocument(@"..\..\..\samplePdf.pdf"); //create a new button CommandBarButton findNext = new CommandBarButton(); findNext.Text = PdfViewerLocalizationProvider.CurrentProvider.GetLocalizedString(PdfViewerStringId.NavigatorFindNextButton); findNext.Click += findNext_Click; findNext.Image = this.radPdfViewerNavigator1.FindNextButton.Image; //hide the currently available button this.radPdfViewerNavigator1.DefaultStrip.Items.Add(findNext); this.radPdfViewerNavigator1.FindNextButton.Visibility = ElementVisibility.Collapsed; } private void findNext_Click(object sender, EventArgs e) { if (this.radPdfViewerNavigator1.SearchTextBox.Text != string.Empty) { if (this.radPdfViewerNavigator1.AssociatedViewer == null || this.radPdfViewerNavigator1.AssociatedViewer.Document == null) { return; } PropertyInfo internalDocumentPI = typeof(RadFixedDocument).GetProperty("InternalDocument", BindingFlags.NonPublic | BindingFlags.Instance); object internalDocument = internalDocumentPI.GetValue(this.radPdfViewerNavigator1.AssociatedViewer.Document, null); object textSearch = internalDocument.GetType().GetProperty("TextSearch", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(internalDocument, null); MethodInfo mi = textSearch.GetType().GetMethod("Find", BindingFlags.Public | BindingFlags.Instance); TextSearchOptions searchOptions = new TextSearchOptions(false); SearchResult searchResult = mi.Invoke(textSearch, new object[2] { this.radPdfViewerNavigator1.SearchTextBox.Text, searchOptions }) as SearchResult; if (searchResult.Result != null) { this.radPdfViewerNavigator1.AssociatedViewer.Select(searchResult); } else { RadMessageBox.Show("No matches"); } } }
It will be a nice addition to RadPdfViewer if it can export page thumbnails as an image.