locked
Automatically Print Pages RRS feed

  • Question

  • User657329123 posted

    Hi there,

    In a .net MVC web application, there is a list of links displayed. When a link is clicked, a controller fetches data from the information included in the URL and displays data using a view. Manual option is to click on each and every link and print the pages from browser's print function. Is there any way automate user clicks so to speak and print the pages as if user clicked on links?

    Joe

    Thursday, October 10, 2019 3:04 PM

All replies

  • User2053451246 posted

    No.  Best you can do is use window.print() on the view that opens to automatically show the print window when the view opens.

    You could look into converting the views to individual PDFs and then merging them into one PDF so there is only one thing to download/print.

    You could also get creative with CSS page breaks.  Create one view that has all the views on it with page breaks where you want them so there is only one thing to print.

    https://www.w3schools.com/cssref/pr_print_pageba.asp

    Thursday, October 10, 2019 4:56 PM