473,787 Members | 2,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="VBScr ipt" %>
<% Option Explicit %>
<html>
<head>
<title>ASP 101's Server-Side Printing Sample</title>
</head>
<body>

<%
Dim objFSO
Dim objPrinter

Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")

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

objPrinter.Writ eLine "This is a test of printing from ASP!"
objPrinter.Writ e vbFormFeed

objPrinter.Clos e

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 1653

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

Similar topics

12
2474
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 Groleau Even if you do learn to speak correct English,
5
2246
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 the same code is executed with the same exact values when Printing and doing Print Preview. I've seen something like this in old Win32 programming caused by bad
0
1884
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 properties. The problem is that i have to print a value near bottom margin (sheets are pre-printed), but if i use custom papersize this value will not printed, i think because there is a bottom margin, but in my custom paper size i have set all margins...
0
1460
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 3~4(paper)Pages with empty after print 1page. And print second page on fifth paper. But it work's correctly in PrintPreviewDialog.
0
284
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 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...
2
1871
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 margin but the right margin is 1/2 inch off, i.e., 1/2 inch from the right side of the paper instead of 1 inch). Has anyone else had this problem and if so, is there a reason it does this? In code, the graphics in the PrintPage event has the...
7
20729
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 printer's physical margins using VB coding? Cheers -- Osmotion Blue
4
16342
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 page goes to printer for printing. It consider it as A4 size. and truncate printing document. any body help me...
1
2319
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 are set to 0, or I subtract the width of the margins from the position of the text. My question is: is there a technique for detecting browser print margins? It'd be nice not to have to warn users to set them to something specific.
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.