Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2008, 02:48 PM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Print pdfs from asp-generated list from sql

I have an asp page that lists pdf filenames from sql. I need to print the pdf documents listed automatically. I want the client to be able to either print all pdfs listed, or use checkboxes to choose some.

Is it possible to print the pdfs without having to open each one? Is there an existing component that does this?

Thanks.

 
Old July 8th, 2008, 03:35 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

I'm pretty sure that the ASPPDF component can do this, but...

WHERE will you PRINT the documents????

If ASPPDF component is installed on the server, then it can only print to printers that the *server* can see!

If you have a user in Boston accessing your server in Dallas, what will he do? Have the printout appear in Dallas and then have somebody send it to him via snail mail or Fax??

So you can see that the *CLIENT* is the one who needs this component, as a plugin to his/her browser. And so even if you could get all your users to download this plugin, it could get pretty expensive!

SO... I don't think this is practical for web usage. I think your users will just have to do what all of us do with PDF files: Use the free PDF reader plugin and, yes, view it first and then print it.
 
Old July 8th, 2008, 05:11 PM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the info. Yes, we would need something so clients worldwide would be able to send to their printer. Unfortunately, we are talking about a list of 60 or more pdfs. (It's an application that provides cut sheets for new restaurant builds.)

Thanks again, and sorry about the cross-post.

 
Old July 8th, 2008, 05:48 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

What you COULD do is have the list of PDF files available with checkboxes beside each and then, when the user clicks the "GO" button, you could put each PDF file into its own popup window. So then the user would just go to each window and hit PRINT and CLOSE until all were printed.

Alternatively, you could put all the PDF files onto a single page by putting each one into an <IFRAME>. You could have a control on the main page that would expand them, one at a time, to fill the available space, allowing the user to view and print them one at a time. Unfortunately, I don't know any way to use JavaScript to "tell" the PDF page to print itself. If that is possible, you might find it on Adobe's site.
 
Old July 8th, 2008, 07:07 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

I found a way to do this!

But only in Firefox browsers. It used to work in MSIE but doesn't with the more recent Adobe Acrobat plugins. But it does still work in Firefox.

Could you convince your users to work with Firefox???

It's not perfect, by any manner or means, but at least it *SHOULD* popup the Acrobat Print dialog for each of the PDF files without the PDF files themselves. Since the Print dialog is the only way of identifying *WHICH* file is about to be printed, you need to make sure that page 1 of each document has the name of the doc in very large text. Might want to a add a cover page to each existing doc.

Interested? Or is this too weird to bother with?
 
Old July 8th, 2008, 09:36 PM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Unfortunately, my client is a big company & they are married to MSIE. I will pitch them the popup window idea, which would save them some trouble.

Thanks so much for your help & enthusiasm!







Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Generated XHTML Mr Fett BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 February 7th, 2007 01:33 AM
Pass value from dropdown list to another ASP SQL Thamil Classic ASP Databases 19 August 29th, 2006 11:37 AM
Pass value from dropdown list to another ASP SQL Thamil BOOK: Professional Crystal Reports for VS.NET 0 August 25th, 2006 04:18 AM
txt file generated from SQl BCP nidhigarg9 SQL Server 2000 1 June 16th, 2006 02:16 PM
Alternative print output for fo generated pdf Ma7T XSLT 0 August 2nd, 2005 08:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.