473,811 Members | 3,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ref : How To Send a PCL or PostScript File Directly to a Printer

ref : article ID 298141

Hi i have implement this part into my program, how do i recieve information
whether the printer has printed out correctly so that i can carry on to my
next phase?

is it all right if there is no indication on my windows when i start this
printing process, because it will be another week before i get my actual
printer. currently i have been testing it without a printer and when i run
the program, it would just end without showing anything, can i presume that
it would not show anyhting because it print directly to the printer bypassing
the driver?


Nov 21 '05 #1
1 2604

how do i convert this to dot net form?

Open FILE_NAME For Binary As #1

' Calculate size of file and amount left over.
NumLoops = LOF(1) \ MaxSize
LeftOver = LOF(1) Mod MaxSize

For i = 1 To NumLoops
sWrittenData = Input(MaxSize, #1)
lReturn = WritePrinter(lh Printer, ByVal sWrittenData, _
Len(sWrittenDat a), lpcWritten)
Next

' Grab what is left over.
If LeftOver <> 0 Then
sWrittenData = Input(LeftOver, #1)
lReturn = WritePrinter(lh Printer, ByVal sWrittenData, _
Len(sWrittenDat a), lpcWritten)
End If

Close #1
lReturn = EndDocPrinter(l hPrinter)
lReturn = ClosePrinter(lh Printer)

"notregiste r" wrote:
ref : article ID 298141

Hi i have implement this part into my program, how do i recieve information
whether the printer has printed out correctly so that i can carry on to my
next phase?

is it all right if there is no indication on my windows when i start this
printing process, because it will be another week before i get my actual
printer. currently i have been testing it without a printer and when i run
the program, it would just end without showing anything, can i presume that
it would not show anyhting because it print directly to the printer bypassing
the driver?

Nov 21 '05 #2

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

Similar topics

4
6413
by: Arthur | last post by:
Hi Everyone, I'm having a real hard time with this. Maybe some smarter people can assist. I'm running Mandrake 9.2. I have a Laserjet 4M Plus. I want to be able to print Postscript, bold, underline, different fonts, etc from within a Perl script. I have absolutely no idea where to start or what to do. My
4
2280
by: Yash Sharma | last post by:
I am planning to propose an XML vocabulary at a consortium. It is aimed to substitute PostScript as a printing standard. I wish to know if there was any parallel effort similar to this, and also a general opinion on how feasible it might be. What I am looking to do is create a vocabulary which can carry all the information that a PostScript file carries to a custom developed interpreter that will rasterize it for print. The advantages this...
1
6951
by: Michael Kilpatrick | last post by:
I'm writing a command-line PHP script that gets executed by a virtual printer (a redirected port using the Redmon tool). The PHP modifies the Postscript data before forwarding it to the real printer. In this case the real printer is an HP LaserJet 5100 with a JetDirect wireless server. My machine runs Windows XP. The printer, as well as being accessible through the usual print methods within applications, is available through its server...
13
21716
by: Susan Beebe | last post by:
I have downloaded the code described in Microsoft article Q154078. I am trying to send raw ZPL (zebra barcode printer) code from Microsoft access. It works just fine if I hard code the actual data in the string being sent to the printer. However, if I prompt the user for data or if I insert data from a particular record/field in a form Access crashes/closes on its own. I have included the code below, if anyone has any suggestions,...
0
1556
by: tSureZureGuza | last post by:
Hi, I need to read a stream and convert this to postscript. I can't use ghostScript since ghostscript needs the file to be specified, I need someting that accepts a stream of pdf data and convert this to postscript to be sent to the printer... I'm a C# newbie and any sample codes or suggestions will be hugely appreciated :)
1
12299
by: Uwe Schmitt | last post by:
Hi, I am trying to print raw postscript data on windows. win32print should do the work like this: h=win32print.OpenPrinter(name) win32print.StartDocPrinter(h, 1, ("", "", "RAW")) win32print.WritePrinter(h, file("p.ps").read()) win32print.EndDocPrinter(h) win32print.ClosePrinter(h)
1
1812
by: Hector M Banda | last post by:
Hi all, Need advice on how to send output to a tiket printer using VB2005. I cannot figure out how to send scape sequences to change fonts, etc. I am using a generic printer driver but no luck. -hb
1
6012
by: remya1000 | last post by:
how to send a .txt file to a printer. after creating a .txt file i need to send that .txt file to a printer.using vb.net and while sending that file to printer i need to tell, which printer i need to send. and i can't used printdialog, to select to which printer i need to send and number of pages and all. everything i need to hardcode. after creating a .txt file, hardcode to which printer i need to send the data and just send to printer. ...
1
5829
by: Peter Afonin | last post by:
Hello, I'm using Crystal Reports for Visual Studio 2005. I'm trying to print my reports to the postscript file: PrinterSettings ps = new PrinterSettings(); ps.PrinterName = "HP Deskjet 3840 Series"; ps.PrintFileName = txtPath.Text.Trim() + "\\" + txtFormNo.Text.Trim() + ".ps";
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
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...
0
10136
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9208
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...
0
5555
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
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4341
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3868
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.