Skip navigation.
Home
The QNX Community Portal

View topic - Network printer - how to send escape sequences?

Network printer - how to send escape sequences?

For the old QNX2 and QNX4 RTOS

Network printer - how to send escape sequences?

Postby Pilotek » Thu Sep 22, 2016 8:27 am

Please help.

In our old application (QNX 4.25, Photon 1.13) we used LPT connected laser printer (PCL compatible) for printing of plain text data tables on operator's demand. Because the tables were too wide to fit into common A4 paper sheet (even landscape oriented) before printing each text table (operator's pressing the "Print Table" icon) we have sent control codes to the printer to change the font size, pitch etc.:

echo "\033(10U\033(s0p16.67h8..." >/dev/par

We had to change the printer for a network printer (own IP address) Samsung Xpress C467W. We succeeded to set it up for printing the tables:

lpr -Pprintername filename, but the font size is default and they won't fit the paper width (landscape paper orientation is not sufficient).

Question: Is there a way to send some control characters to [Samsung Xpress C467W] network printer to change the default font/pitch to a small one?

- Is it even possible to send escape codes to a network printer with own IP address?

- What should the printer be compatible with to understand (accept) Escape control sequences? The printer is PCL and PostScript compatible - we succeeded in Photon graphics (window screenshot) color printing with both Pcl and Ps filters.

- Or is there some other way to force the network printer [Samsung Xpress C467W] to change the text font size/pitch before plain text file printing?

Thank you.
Last edited by Pilotek on Tue Sep 27, 2016 5:46 am, edited 3 times in total.
Pilotek
Senior Member
 
Posts: 124
Joined: Thu Jan 25, 2007 3:52 pm

Re: Network PCL+PS printer - send escape sequences?

Postby Pilotek » Mon Sep 26, 2016 6:15 am

Well, maybe the questions are not completely clear...

What is the "command" (or configuration file) and syntax for sending printer control sequences (escape sequences) to network attached printer (own IP address, PCL and PostScript compatible) under QNX 4?
Pilotek
Senior Member
 
Posts: 124
Joined: Thu Jan 25, 2007 3:52 pm

Re: Network PCL+PS printer - escape sequences?

Postby Linkman » Mon Sep 26, 2016 12:39 pm

You might want to work this using a different method. Since your printer works with Postscript you might convert plain text files being printed to Postscript. In Unix I have used the a2ps command to get around printers converting plain text to their own strange formats. While I have little experience with QNX printing, it does appear that it has a similar feature (search for a2ps):

http://www.qnx.com/developers/docs/qnx_ ... ml?lang=kr
Linkman
New Member
 
Posts: 7
Joined: Tue Sep 20, 2016 11:52 am

Re: Network printer - how to send escape sequences?

Postby Pilotek » Fri Sep 30, 2016 6:13 am

Thank you Linkman, a2ps looks interesting. But I cannot find where to download a2ps for QNX4.

And also ghostscript utility (convert PS to PCL) - do you anybody know where to download it for QNX4?
Pilotek
Senior Member
 
Posts: 124
Joined: Thu Jan 25, 2007 3:52 pm

Re: Network printer - how to send escape sequences?

Postby Linkman » Mon Oct 03, 2016 4:25 pm

The link I posted for QNX print spooling has this which implies a feature similar to the a2ps command:

Code: Select all
ci=a2ps -H"$(file)" | awk '/%%EndProlog/ { print "<< /Duplex \
    true >> setpagedevice"; } { print $0; }'
co=echo $(username)"\n" "put" $(spfile) | SOCK=666 /usr/ucb/ftp net_printer
Linkman
New Member
 
Posts: 7
Joined: Tue Sep 20, 2016 11:52 am


Return to QNX2 and QNX4

Who is online

Users browsing this forum: Bing [Bot] and 1 guest