Link to home
Create AccountLog in
Delphi

Delphi

--

Questions

--

Followers

Top Experts

Avatar of pr_wainwright
pr_wainwright

Send RAW data to network printer
I have a need to send raw data to a network printer. I use the following code.

procedure TForm1.Button1Click(Sender: TObject);
var
 F: TextFile;
begin
 //AssignFile(F, '\\LDSSFP5\145.17.203.39'); <- does not work.
 AssignFile(F, '\\LDSSFP5\ZPA5'); <- works fine.
 ReWrite(F);
 WriteLn(F, '#!A1#A9#ERN0///0.00#M1/1#T10#J20');
 CloseFile(F);
end;

Using the UNC printer name works fine but I need to be able to use an IP address as in the first line. Any help would be appreciated.

Thanks
Paul.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of ChadakChadak

Hi!

   I'm kind of skeptical about this one, i never saw a assignfile working on a printer, tried it here didn't work either.
If you want to send raw data to a printer, just give a look the the unit printer.

Chad

ASKER CERTIFIED SOLUTION
Avatar of DragonSlayerDragonSlayer🇲🇾

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of pr_wainwrightpr_wainwright

ASKER

The printer is actually a print and apply labeller for an aerosol production line. In the windows setup the printer is called 'Avery' & has a ports set to an IP address. If this port IP address is changed it will send print 'jobs' to other production lines. I was hoping I could control all print jobs from one place as we have 8 production lines, at the moment each line has a dedicated PC for the task.

Paul.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

Delphi

Delphi

--

Questions

--

Followers

Top Experts

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.