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
Watermark does not look correctly and the page margins are not valid for the very small paper sizes.
To reproduce: - Print a document that fills the entire page. - On the print preview dialog the page is centered however when printed it is not. In addition, one should be able to control the page scaling.
1- the load of a document take a while to load (if successed). 2- An unhandled exception thrown while loading a document (Out of memory or Invalid parameter) the file that i'm trying to load is attached and created using Telerik Document Processing Library. ************** Exception Text ************** System.ArgumentException: Parameter is not valid. at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) at System.Drawing.Bitmap..ctor(Image original, Int32 width, Int32 height) at System.Drawing.Bitmap..ctor(Image original) at Telerik.WinControls.PdfViewer.PdfElementsRenderer.RenderImage(ImageSource source, ResourceKey key, BackgroundWorker cancellationToken) at Telerik.WinControls.PdfViewer.FixedPageRenderer.DrawImage(Image image, Graphics graphics) at Telerik.WinControls.PdfViewer.FixedPageRenderer.DrawContentElement(IContentElement contentElement, Graphics graphics) at Telerik.WinControls.PdfViewer.FixedPageRenderer.DrawContainer(Container container, Graphics graphics) at Telerik.WinControls.PdfViewer.FixedPageRenderer.DrawContentElement(IContentElement contentElement, Graphics graphics) at Telerik.WinControls.PdfViewer.FixedPageRenderer.DrawContainer(Container container, Graphics graphics) at Telerik.WinControls.PdfViewer.FixedPageRenderer.DrawContentElement(IContentElement contentElement, Graphics graphics) at Telerik.WinControls.PdfViewer.FixedPageRenderer.DrawPage(ContentCollection content, Graphics graphics, Matrix pageTransform) at Telerik.WinControls.UI.FixedPagePreRenderer.rendererWorker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) Thank you
Workaround: subscribe the RadPdfViewer control to the ViewerModeChanged event and in the handler, if the viewer mode is set to Pan, call the HideCaret method of the PdfViewerElement private void radPdfViewer1_ViewerModeChanged(object sender, EventArgs e) { if (this.radPdfViewer1.ViewerMode == Telerik.WinControls.UI.FixedDocumentViewerMode.Pan) { this.radPdfViewer1.PdfViewerElement.HideCaret(); } }
Workaround: update manually the RadPdfViewerNavigator.CurrentPageTextBox.