Tint transformation function is used to transform Device N color in Alternate colorspace.
How to reproduce: check the attached video a slight cut off can also be observed with the ControlDefault and the TelerikMetro themes Workaround: CommandBarDropDownList dropDownList = this.radPdfViewerNavigator1.CommandBarElement.FindDescendant<CommandBarDropDownList>(); dropDownList.MinSize = new Size(72, 22);
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");
}
}
}
how to reproduce: check the attached file workaround: resize the form
It will be a nice addition to RadPdfViewer if it can export page thumbnails as an image.
When clicking on link annotations pointing to destinations in the document, and the "Fit one full page to window" mode is activated, the document is not scrolled exactly to the destination. The issue can be reproduced only in Single Page Presenter mode and when the Top and Left values of the passed parameter are greater than 0. The problem can also be observed by invoking directly GoToDestination method, as the problem is inside it.
When an image is actually consisting of a sequence of smaller images, sometimes white lines appear between the smaller images.
Add an option to save and/or email document. It is especially useful if a file stream is loaded into the viewer.
Currently, the following approach can be used:
private Stream GetPdfStream()
{
Type documentType = this.radPdfViewer1.PdfViewerElement.Document.GetType();
FieldInfo internalDocumentField = documentType.GetField("internalDocument", BindingFlags.NonPublic | BindingFlags.Instance);
object internalDocumentValue = internalDocumentField.GetValue(this.radPdfViewer1.PdfViewerElement.Document);
FieldInfo formatProviderField = internalDocumentValue.GetType().GetField("formatProvider", BindingFlags.NonPublic | BindingFlags.Instance);
PdfFormatProvider formatProvder = formatProviderField.GetValue(internalDocumentValue) as PdfFormatProvider;
FieldInfo field = formatProvder.GetType().GetField("stream", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance);
Stream stream = field.GetValue(formatProvder) as Stream;
return stream;
}
To reproduce:
public Form1()
{
InitializeComponent();
this.radPdfViewer1.DocumentLoaded += radPdfViewer1_DocumentLoaded;
}
private void radPdfViewer1_DocumentLoaded(object sender, EventArgs e)
{
var pdf = (RadPdfViewerElement)sender;
var doc = new RadPrintDocument();
doc.AssociatedObject = pdf.ElementTree.Control as RadPdfViewer;
doc.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.SomePages;
doc.PrinterSettings.FromPage = 2;
doc.PrinterSettings.ToPage = 1;
doc.PrinterSettings.PrintFileName = @"..\..\Once upon a time.pdf";
pdf.Print(showPrinterSettings: false, document: doc);
}
Workaround: check FromPage before printing.
To reproduce:
public Form1()
{
InitializeComponent();
radPdfViewer1.DocumentLoaded += radPdfViewer1_DocumentLoaded;
radPdfViewer1.LoadDocument(@"..\..\TestDocument.pdf");
}
void radPdfViewer1_DocumentLoaded(object sender, EventArgs e)
{
var pdfViewerElement = sender as RadPdfViewerElement;
if (pdfViewerElement != null)
{
var myDocumentToPrint = new RadPrintDocument();
myDocumentToPrint.AssociatedObject = pdfViewerElement;
myDocumentToPrint.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
myDocumentToPrint.Print();
}
}
Please refer to the attached screenshots and sample pdf.
Workaround: Specify the RadPrintDocument.DefaultPageSettings.Margins property on a way to have the right margin greater than 0
Workaround:
public Form1()
{
InitializeComponent();
string pdfFilePath = Path.Combine(Application.StartupPath, "testfile1.pdf");
radPdfViewer1.LoadDocument(pdfFilePath);
this.radPdfViewer1.PdfViewerElement.VScrollBar.ValueChanged+=VScrollBar_ValueChanged;
}
private void VScrollBar_ValueChanged(object sender, EventArgs e)
{
this.radPdfViewer1.PdfViewerElement.InvalidatePages();
}
Loading a page with large images (e.g. 2 JPEG images 2500x3500 each) takes a lot of time. The majority of the time is spent in decoding the images.
To reproduce: Print the attached document with the MS Xps printer or PrimoPDF.
This is not quite a valid PDF file scenario according to PDF file specification. However, we may try handling it in order to show the correct number of pages. When the kid is of type Pages, it should be added to the pages traversal recursion only the first time it is met. The observed issue is demonstrated in the attached image.
PDF Export needs to support certificate signatures so the end user of the document knows the document hasn't been changed.
Workaround: until the feature be implemented one can print each page individually respecting its orientation whether it is portrait or landscape
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.radPdfViewer1.LoadDocument(@"..\..\sample.pdf");
}
private void radButton1_Click(object sender, EventArgs e)
{
RadPrintDocument doc = new RadPrintDocument();
doc.AssociatedObject = this.radPdfViewer1;
for (int i = 0; i < this.radPdfViewer1.Document.Pages.Count; i++)
{
RadFixedPage page = this.radPdfViewer1.Document.Pages[i];
doc.CurrentPage = i;
doc.PrinterSettings.PrintRange = PrintRange.CurrentPage;
doc.Landscape = page.ActualWidth > page.ActualHeight;
doc.Print();
}
}
}
RadPdfViewer can not display annotated PDF file Kindly,i used VintaSoft SDk to Annotate PDF File, File is annotated successfully and i can open it with Adobe Reader and see annotations is added to it but while i try to view annotated PDF file using RadPDFViewer File will displayed without annotations ,only original content displayed. Kindly find my attached AnnotatedPDFfile To be loaded in RadPDfViewer