 |
| 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
|
|
|
|

March 23rd, 2009, 02:48 PM
|
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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!
|
|

March 23rd, 2009, 03:36 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
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??
|
|

March 23rd, 2009, 03:57 PM
|
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

March 23rd, 2009, 07:56 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
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.
|
|

May 29th, 2009, 02:11 PM
|
|
Authorized User
|
|
Join Date: May 2009
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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.
|
|

May 31st, 2009, 02:25 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
(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.
|
|

May 31st, 2009, 12:40 PM
|
|
Authorized User
|
|
Join Date: May 2009
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by Old Pedant
(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.
|
|
 |