473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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

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

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

objPrinter.Close

Set objPrinter = Nothing

Set objFSO = Nothing
%>

</body>
</html>

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

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Wes Groleau | last post by:
Is there a good how-to and/or example of a simple way to have a web page look decent on both screen (in most browsers) and in print? The example in the W3C CSS manual does NOT do it. -- Wes...
5
by: Devin Dow | last post by:
Print Preview looks perfect, but the Printout is cut off (extends off the page). Has anyone else experienced this? A3 paper size seems to exacerbate the problem. I can't believe it because...
0
by: epederiva | last post by:
Hi, I have a problem with a laser feed tractor printer, paper size is 8.3 X 11 inc.. For print in windows xp home from a c# application i use a custom paper size added at the printer server...
0
by: vbmania | last post by:
Hello, I am going to print paper of 15 X 4 Inch. It's a continuous form. But When I Print Multiple Paper, Printer does'nt print back to back. If I am goint to print 3 pages. Jump over...
0
by: Pete Petersen | last post by:
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...
2
by: Dennis | last post by:
I use the PageSetUpDialog to set the margins on my HP Laser Jet 4 printer. I set both margins to 1 with a paper size of 8.5 x 11 (Letter). When printing, print starts as it should on the left...
7
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change...
4
by: sachin | last post by:
Hi I am working on report using print preview dialog control in windows application. Report is displayed properly in control. With paper size 850X1350 (Legal)(Lanscape mode=true) . But when...
1
by: Mango | last post by:
I'm trying to print some text in a very specific position on a page, so that it will show through the window of an envelope when folded. This is easy to do, as long as the browser's print margins...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.