[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dev help...




Ahmad, I for one am not sure what is needed with regards to CUPS
and how to make its 'lp' and 'lpr' print Arabic UTF-8 files properly.
I had probed about this previous, but don't recall getting an answer,

http://lists.arabeyes.org/archives/developer/2004/February/msg00059.html

so I'm not sure that the CUPS topic is a done-deal just yet.

Did you try CUPS' "lp" and/or "lpr" and they worked fully for you ?
Were you able to do this from the command-line and get fully shaped
and bidi'ed print-outs ?  If so, can you give us details on what it
is that one needs to do or setup to get it to work properly.  We'll
augment our HOWTO docs with this info at a minimum :-)

well, im not sure that 'lp' and 'lpr' can print shaped text files, but they can print shaped .ps files, because .ps files contain fonts and the exact data to be printed... on my RH8.0 i dont have arabic Type1 fonts, so my lp and lpr print out boxes instead of arabic (i think mainly because they lack the Type1 arabic fonts), anyway using gedit i can print Unshaped (separate letters) arabic but i think that is something wrong with my gedit and if gedit shaped ok, the printing would come out ok, because gedit send a .ps file to the printer (i mean CUPS)....

anyway here is a few extra stuff that i remember off the top of my
head...
to print, your data needs to be in a file of certain format. i.e .ps .txt
or .bmp i thiink...
anyway, the caller (an app that wants to print) spits the data to be
printed to a file and calls cupsPrintFile() or cupsPrintFiles()... and thats
what 'lp' and 'lpr', they just call cupsPrintFile()...
lp and lpr are in lp.c and lpr.c respectively...
cupsPrintFile() is declared in "cups/cups.h"...
cupsPrintFile() implements the Internet Printing Protocol (IPP), which
is a protocol to print over networks... CUPS has a daemon running on
port 631 (i dont remember if thats the right port) that listens for IPP
connections... IPP is a standard by the Internet Printing Workgroup that
has a website somewhere, they also have internet fax and other things...

anyway, so even if you're printing to a local printer (connected to the
same PC by a cable) the cupsPrintFile() implements the IPP and sends
the data to port 631...
btw if you have CUPS installed, try going to
"http://localhost:631/documentation";

anyway, for every file CUPS starts a chain of filters that ends with the
Printer driver, redirecting each filter's stdout to the next one's stdin...

example: if your printing a text file, this is what i think happens
the filter chain looks like this:
txttops >> pstops >> pstohp
something similar happens, im not sure exactly what...

anyway, the problem (if there is one) would be in the 'txttops'
filter, that converts text files to .ps documents and prints it on
stdout so pstohp can receive it on stdin and send it to some backchain
driver or whatever...

so, either .ps files are not shaped correctly by 'txttops' or it needs
some configuration that im not aware of... im a linux newbie remember..!

anyway, the reason i said that printing works is for 2 reasons
1- printing .ps files is OK...
2- there is an article on www.linux-egypt.com that talks about printing...
 (i think it was a forum post, im not sure)

this is what i remember... the next move is from someone who knows
more about Linux than me, to try lp and lpr and read the article and
do any necessary configuration and see if the problem exists or not...

:))


i hope this helps... if you need anything more, i'll look at the code maybe i can remember some more...

ak.

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail