Printing multiple pages on the Client
-
Background: The project I'm starting on is a web-based questionnaire. Users will go page to page filling in data. The number of pages is not fixed (it will vary according to user data). The site will be database driven (questions and the pages that contain them will be organized in a server database). Question: Marketing (ahem) has required us to be able to print all of the pages for the user - on the user's system. Ie., the user presses "print" and he gets hard copies of all of the pages that he could visit, not just those he has already visited, on the site. I am stumped. I am pretty sure that pressing Print on any browser will print the current page, and the current page only. Telling users to press print, next page, print, next page, etc. is out of the question. One option is to render the pages on the server to a PDF file using the Acrobat printer driver (can you append to a PDF this way???), then email the PDF back to the user. This is lame, too. Printing hard copies and snail mailing them back to the user is another (bad) option. Pre-rendering the pages to PDF is out of the question as the number and content of the pages will vary from user to user. This seems like a problem that people would be constantly running into... has anyone solved it?
-
Background: The project I'm starting on is a web-based questionnaire. Users will go page to page filling in data. The number of pages is not fixed (it will vary according to user data). The site will be database driven (questions and the pages that contain them will be organized in a server database). Question: Marketing (ahem) has required us to be able to print all of the pages for the user - on the user's system. Ie., the user presses "print" and he gets hard copies of all of the pages that he could visit, not just those he has already visited, on the site. I am stumped. I am pretty sure that pressing Print on any browser will print the current page, and the current page only. Telling users to press print, next page, print, next page, etc. is out of the question. One option is to render the pages on the server to a PDF file using the Acrobat printer driver (can you append to a PDF this way???), then email the PDF back to the user. This is lame, too. Printing hard copies and snail mailing them back to the user is another (bad) option. Pre-rendering the pages to PDF is out of the question as the number and content of the pages will vary from user to user. This seems like a problem that people would be constantly running into... has anyone solved it?
What about just recreating all the pages that should be printed in ONE SINGLE page with a CGI or ASP script and tell the user to print that page. This will also give the user an idea about the amount of data that will be printed, so he can decide if he wants to do so or not.
-
Background: The project I'm starting on is a web-based questionnaire. Users will go page to page filling in data. The number of pages is not fixed (it will vary according to user data). The site will be database driven (questions and the pages that contain them will be organized in a server database). Question: Marketing (ahem) has required us to be able to print all of the pages for the user - on the user's system. Ie., the user presses "print" and he gets hard copies of all of the pages that he could visit, not just those he has already visited, on the site. I am stumped. I am pretty sure that pressing Print on any browser will print the current page, and the current page only. Telling users to press print, next page, print, next page, etc. is out of the question. One option is to render the pages on the server to a PDF file using the Acrobat printer driver (can you append to a PDF this way???), then email the PDF back to the user. This is lame, too. Printing hard copies and snail mailing them back to the user is another (bad) option. Pre-rendering the pages to PDF is out of the question as the number and content of the pages will vary from user to user. This seems like a problem that people would be constantly running into... has anyone solved it?
Well _I_ would do the following: When the user presses PRINT, I would generate a new page, with all the information in printable form (no images, just core information, all pages on ONE page, etc.). Then the user must be advised to press the print button in his browser on THIS page. On IE, you can even print automatically with javascript, if the page is loaded.
-
What about just recreating all the pages that should be printed in ONE SINGLE page with a CGI or ASP script and tell the user to print that page. This will also give the user an idea about the amount of data that will be printed, so he can decide if he wants to do so or not.
-
we want to preserve some kind of structure in the printed version, since these documents will likely be 20-30 pages. but, there's no way to force a page break when printing a web page.
There is a way to force page breaks, but it's IE specific ! Take a look at: Style Sheets and Printing.