I am working on a Windows Forms Application that load and print PDF document then unload that document and load new one, but when i call unloadDocument() no new document was loaded :
RadPdfViewer rViewer = new RadPdfViewer();
rViewer.DocumentLoaded += RViewer_DocumentLoaded;
rViewer.LoadDocument(Filepath);
rViewer.LoadElementTree();
Application.DoEvents();
rViewer.PdfViewerElement.StopWaiting();
if (rViewer.IsLoaded)
{ rViewer.UnloadDocument(); }
after unloadde the document i cannot load new PDF doccument?
Hello, luai,
I am glad that the provided sample project was helpful for finding the appropriate solution for your case.
Since this item was submitted as a feature request, I have updated its status to "Declined".
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Dear Dess,
my issue solved than you.
after checking the example that you attached , just I add the below line under the function InitializeComponent();
rViewer.DocumentLoaded += RViewer_DocumentLoaded;
Hello Dees,
my code is creating PDF file from rendering Report Viewer with the name of "Hello" , then printing that PDF after that unload that PDF ,then create PDF with the same name "Hello" then print that PDF and Unload the PDF ....ect.
so each time i am create PDF with the same name then print .
Hello, luai,
Following the provided information, I was unable to reproduce the issue you are facing. Please refer to the attached gif file illustrating the behavior on my end with the latest version. I used PrimoPDF to simulate the printer.
I have attached my sample project. Could you please specify the exact steps how to reproduce the problem? Feel free to modify it in a way to reproduce the experienced issue and get back to me with it so I can investigate the precise case. Thank you in advance.
I am looking forward to your reply.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik