0

I am currently working on a C# Windows Application and I want to Print an existing PDF, which is already saved in a location on my PC. After trying a few solutions from Google, I could Print text documents but I am not able to Print PDFs. Expected a result is after clicking on a button , PDF should be Printed directly. Please note that I DON’T want to open in PDF in PDF viewer/Print preview and then allow the user to Print it.

I have already tried RawPintPackage , it is not working.and Using PrintDocument class i am able to Print Text documents but not PDF .

  • My best guess would be that you need to convert/render that PDF into a picture first - then print it. – Vyacheslav Feb 17 '21 at 08:03
  • Thanks @Vyacheslav , in case if you have tried this, could you please suggest best way to convert a PDF into image and Then Print that image? – Rachita Aundhekar Feb 17 '21 at 08:21
  • Take a look at this [Print Pdf in C#](https://stackoverflow.com/questions/5566186/print-pdf-in-c-sharp) – OammieR Feb 17 '21 at 08:31
  • Are you allowed to add a requirement that Adobe Acrobat Reader is installed? It's easy then! – Matthew Watson Feb 17 '21 at 08:50
  • Thank you all for your replies. After a lot of reasearch i have come to this conclusion> If default browser for PDFs in your PC is set as Adobe Acrobat reader, then it is easy to print using ProcessStartInfo(). Otherwise,we'll have to use Third Party library like IronPDF, SpirePDF or PdfiumViewer. – Rachita Aundhekar Feb 19 '21 at 08:57

0 Answers0