?
Solved

Print directly to TCP/IP printer port

Posted on 2006-04-19
7
Medium Priority
?
2,868 Views
Last Modified: 2012-06-21
Does anyone know how to raw print directly to a network tcp/ip printer port (i mean like IP_192.168.0.100)? I know the winspool.writeprinter method and it seems that does not work for printers connected via tcp/ip port. Also tried with the windows.escape method and the PASSTHROUGH param but it sends jobs containing just formfeeds without any text.
My problem is that i need to send some escape codes directly to the printer (for text compression) so i must write directly to it. It works fine with a local printer.
0
Comment
Question by:Ferruccio Accalai
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:Mainiacfreakus
ID: 16488074
Hi

Can't you use some networking components or sockets to do the job?

tcpclient1.Sendln(); tcpclient1 == TTcpClient.

Mainiacfreakus
0
 
LVL 23

Author Comment

by:Ferruccio Accalai
ID: 16488172
As you can guess i need to print to whatever printer without knowing its port til the job start, so a specified tcp component isn't the right solution, but tnx anyway
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 16493504
hmm, if i telnet 192.168.1.22 (my printer) I can then see a list of access methods by typeing ?
maybe yours does the same
I can actually just FTP into it, and "Put <file>" to print
ports open are
IPP 631,
FTP 20, 21
LDP 515
9100 9100
don't know if any of this is of use to you, but I sure get a lot of info when I telnet into it
0
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 1000 total points
ID: 16493524
In fact if I do the following
telnet 192.168.1.22 9100
then type
hello
and then close the telnet session
the printer prints "hello", so it looks like just using a TCP component _may_ do what you want :-)
0
 
LVL 2

Assisted Solution

by:Mainiacfreakus
Mainiacfreakus earned 1000 total points
ID: 16495748
Just as I suggested above...

As I see it u have a few choices...
use Indy - TCP or Telnet components
or use sockets - built it yourself components
or use shell commands to telnet in and print.

Best Regards
Mainiacfreakus
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question