Search code examples
c#pdfabcpdf

Print created pdf automatically after creation


I have a web app that creates a pdf using Websupergoo's ABCPDF. Right now after the user clicks the CreatePDF button the browser just downloads the created PDF. Instead I would like the print dialog to open so that the user can choose a printer and then print the PDF.

How can this be accomplished?

Please let me know if you need to see any of my code in the comment area and I will oblige.


Solution

  • You can either return an html page and using javascript print function show a print dialog or ask the user to download a pdf.

    In your case, a good option would be 2 buttons: "Download pdf" and "Print". When the user clicks on Print, (s)he can choose the printer that could be a PDF Printer.

    See related: Can a PDF file's print dialog be opened with Javascript?