Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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 March 23rd, 2009, 02:48 PM
Authorized User
 
Join Date: Apr 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default Print to an LPT1 printer from asp page?

Hello All.
I am looking to have my .asp page print into my adobe PDF print driver that resides on its server so I can create pdf files from my page that is a purchase order.

I can create a document that can create a word.doc, put I now am looking to send that text into my adobe print driver. Any ideas what the code would like? I dont have a clue where to start.

I have searched hi and low. Thanks!
 
Old March 23rd, 2009, 03:36 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, there's a product called "ASPPDF" that might be what you are looking for. Not sure whether it has a command to print to the local [which would of course be the server-local] printer, but worth looking into.

Not to ask a silly question, but if you are able to produce a WORD .doc file, why not just print that??
 
Old March 23rd, 2009, 03:57 PM
Authorized User
 
Join Date: Apr 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using FSO so employees can view the created files in a pulldown and open them. We get issues when they try to open a word doc in web browser. PDF would be a better option.
 
Old March 23rd, 2009, 07:56 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Ummm...you can't use FSO to send either .doc or .pdf files from server to browser. FSO only handles *TEXT* files. You have to use ADODB.Stream to send binary files, which is what both .doc and .pdf files are.

But maybe you need to show some code.
 
Old May 29th, 2009, 02:11 PM
J_P J_P is offline
Authorized User
 
Join Date: May 2009
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default what issues ?

printing is a client side action, ASP runs on the server.

unless the user has word or a pdf viewer they won't be able to see/print the files.
 
Old May 31st, 2009, 02:25 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

(1) Why are you answering a post that is more than 2 months old?

(2) Read again what the original poster wanted. He wants to use ASP to "print" to a PDF *FILE*, not directly to a printer. And THEN he allows the user to download the PDF file. This is a quite reasonable thing to do; there are several free "print to PDF" drivers out there. You go into most any program (e.g., Word, or even Notepad) and select PRINT and then select the PDF Printer instead of a normal printer. The driver gives you a choice of what file name to print to and produces a ready-to-download PDF file. The problem: Selecting that PDF Printer from something like MS Word requires some pretty hefty "scripting" of the "application/msword" object. Non-trivial.

(3) If you know any Luddites who still don't have a PDF viewer (namely, Acrobat Reader) installed on their machines, tell them to move out of the Stone Age and stop using clay tablets to write on. And don't forget that you can save a Word document as ".rtf" which means that virtually any word processing program can read it, even those on Mac's and Linux machines.
 
Old May 31st, 2009, 12:40 PM
J_P J_P is offline
Authorized User
 
Join Date: May 2009
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Old Pedant View Post
(1) Why are you answering a post that is more than 2 months old?
why do you care ? it's not your post, it's not your forum.

Quote:
(2) Read again what the original poster wanted. He wants to bla bla bla....
let him speak for himself, you're not his mommy.

Quote:
(3) If you know any Luddites , bla bla bla...
just one.





Similar Threads
Thread Thread Starter Forum Replies Last Post
get the printer name chosen in print dialog deep_ocean Classic ASP Basics 0 March 14th, 2007 10:27 AM
print page in ASP palu_2702 Classic ASP Basics 0 May 3rd, 2005 02:47 AM
Print From ASP Page arnabghosh Classic ASP Basics 0 April 19th, 2005 05:25 AM
printer.print problem rajanikrishna Pro VB 6 5 December 13th, 2004 10:25 PM
VB Printer.print command Hiddenattractor Java GUI 3 December 30th, 2003 09:08 AM





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