Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - 请教:qnx4下使用HP p2055dn打印机,lpd方式为何打印不出来俄文?: (1 Item)
   
请教:qnx4下使用HP p2055dn打印机,lpd方式为何打印不出来俄文?  
我公司工控机采用QNX4.25操作系统,licenses全部安装,配有激光网络打印机HP P2055dn一台(俄文字库,无中文字库). 
现在想采用lpd方式打印一个txt文件,txt文件中内容是俄文。但是却打印乱码,并且换行也不正确。如果txt文件中是英文,就可以正确
的打印。
对打印机进行自检,发现可以打出正常的俄文字符。是不是我对QNX设置会有错误?或者我配置不全?

具体方法如下:
1、网卡正常使用,可ping通打印机(设打印机地址为192.168.16.53)

2、/etc/printcap:
#
p2055dn|P2055dn:\
	:rm=192.168.16.53:rp=p2055dn:\
	:sd=/usr/spool/output/p2055dn:sh=false:

3、/etc/config/lpsrvr:
#
# Example LPSRVR configuration file
#
# This example creates a single device called "/dev/spool/ps.phs" which
# will support multiple Photon print streams and give them
# one at a time to the physical Postscript printer connected to "/dev/par1".
#
#	Use "lpsrvr -fThisFile &" to make it all happen (put in sysinit)

[]
#	Define QNX name of this print spooler
#	sp=/qnx/PhSpool
#	Specify where spool files are kept (lpsrvr will delete them for you)
#	cd=/tmp


[Phps]
#	Use the Postscript Filter and Feed into Raw Queue
	ta=nullpt
	co=/usr/photon/bin/Pp.ps -l1 $(spfile) | /usr/ucb/lpr -Pp2055dn

[Phpcl]
#	Use the PCL Filter and Feed into Raw Queue
	ta=nullpt
	co=/usr/photon/bin/Pp.pcl $(spfile) | /usr/ucb/lpr -Pp2055dn

[Phpsc]
#	Use the Postscript Filter and Feed into Raw Queue
	ta=nullpt
	co=/usr/photon/bin/Pp.ps -l1 $(spfile) | /usr/ucb/lpr -Pc2025dn

[Phpclc]
#	Use the PCL Filter and Feed into Raw Queue
	ta=nullpt
	co=/usr/photon/bin/Pp.pcl $(spfile) | /usr/ucb/lpr -Pc2025dn

[t]
 ta=nullpt
 co=/usr/ucb/lpr -Pp2055dn $(spfile)
 
[tfake]
 co=cat "$(spfile)" >> "$(device)"
 ta=lptl0

[-lptl]
 dv=/dev/par1

[-lptl0]
 dv=/.registry.log

[-nullpt]
	dv=/dev/null

4、运行打印命令
#lpsrvr &
#lpd &
#lpr -Pp2055dn /tmp/1.txt



不知道/etc/config/sysinit.8设置会不会也有影响,我全贴出来了
#Image: /bin/Fsys 
#Image: /bin/Fsys.eide fsys -Ndsk0 -n0=hd0. -n5=cd0. eide -a1f0 -i14
#Image: /bin/mount -p /dev/hd0.0 /dev/hd0.0t77 /
#Image: /bin/sinit TERM=qnxm
#export NODE=48
export KBD=ru_RU_102.kbd
export ABLANG=ru
export TZ=mst-08,M3.5.0/2,M10.5.0/2
/bin/rtc -l at
Dev &
Pipe &
Dev.ansi -Q -n6 &
reopen /dev/con1
prefix -A /dev/console=/dev/con1
Dev.par &
Dev.pty -n16 &
# /bin/Fsys.floppy -a3f0 -i6
# /bin/Iso9660fsys /cd=/dev/cd0.0 &
# Define the default CD Rom
# /bin/prefix -A /cd=//0/cd0.0
# mount /dev/fd0 /fd/fd0 
chkfsys -P /
/bin/mcyr &
license -r
nameloc &
export LPSRVR=/qnx/spooler
cfont -f1 /etc/config/cfont/unim.f8 
cfont -f0 /etc/config/cfont/vga!.f16
Mqueue -a -d &
export LOGNAME=mag
/etc/netstart
tinit -c "login -p -f root" -t /dev/con1 &
tinit -c "login -p -f root" -T /dev/con[2-6] &