469,616 Members | 1,823 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

Print Serverside and Specifying Margins and Paper Size

We are trying to send the results page to a Zebra LP2844 Printer with 4" x 2"
Thermal Transfer Label loaded on the network. The share is \\server01\ups
and it is installed on the Web Server that the clients are accessing.

I need to built a script to send the results page to this printer.

If i open Notepad and select this printer and set the Page Size to 4 x 2 and
the Margin to .01 all around I can send the job successfully from the server.
I have tried scripts that I found on some dev sites and can print to a
shared printer that is loaded with 8.5 x 11 but when I try to send it to the
4 x 2 printer it fails. I can see the job going to the printer but it never

Here is the code i used and I did a net use LPT1: \\server01\dell_laserjet
on the Web Server.

<%@ Language="VBScript" %>
<% Option Explicit %>
<title>ASP 101's Server-Side Printing Sample</title>

Dim objFSO
Dim objPrinter

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

Set objPrinter = objFSO.CreateTextFile("LPT1:", True)

objPrinter.WriteLine "This is a test of printing from ASP!"
objPrinter.Write vbFormFeed


Set objPrinter = Nothing

Set objFSO = Nothing


This is the final step on a project I have due and I am stumped....Can
someone PLEASE help.

Thank you so much,
Sep 20 '05 #1
0 1421

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Wes Groleau | last post: by
5 posts views Thread by Devin Dow | last post: by
reply views Thread by vbmania | last post: by
2 posts views Thread by Dennis | last post: by
1 post views Thread by Mango | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.