[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpprintipp] Re: PHP p rintipp, problème d'encodage avec CUPS
From: |
Thomas Harding |
Subject: |
Re: [Phpprintipp] Re: PHP p rintipp, problème d'encodage avec CUPS |
Date: |
Tue, 5 Aug 2008 18:33:50 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Tue, Aug 05, 2008 at 01:45:51PM +0800, Romain Pontida wrote:
> >the user complains about utf-8 data printed as iso-8859-1
> >[Note: you shall use a CUPS server, as most print server won't support
> >utf-8]
> >you'll got supported data types by getPrinterAttributes()
> >operation
> >(see phpprintipp command (CVS HEAD version), or
> ><http://www.nongnu.org/phpprintipp/usage> for implementation samples)
> >php::print::ipp is transparent against data, only meta-data are
[...]
> >so the solution is to send the good meta-data
> >[sample for CUPS]
> >
> >#####################################
> >$ipp->setMimeMediaType('text/plain');
> >$ipp->setCharset('utf-8');
> >$ipp->printJob();
> >#####################################
> OK, thank you for answering quickly.
>
> I I didn't succeed in making it work with CUPS. I was indeed using the
> last version, but since anyway I want to use it with other printer
> servers than CUPS afterwards, I decided to convert unicode characters
> to their ASCII equivalents as much as I could.
That's a solution. Personnaly I rely on a CUPS server, because it is
safer than low-costs or printer-integrated print servers (CUPS handle
them better than my backend ;), and because I use most of time pdf
documents (=> $ipp->setMimeMediaType('application/pdf');) produced
with fpdf class.
This allows a good rendering, tables construction, compound documents
(image inclusion)...
> I'm planning to distribute a drupal module based on your great work.
^[1]
Good :) The CVS version is stable, so I point you on:
#############
cvs -z3 \
-d:pserver:address@hidden:/sources/phpprintipp co \
phpprintipp
#############
One thing you can do if you plan to redistribute it is to totally
re-indent the code "à la C", because it is currently quite unreadable
for everyone except me (and each time it gives me headashes) :/
So, if you plan to do it, feel free to send me, or to the list, the
patched version (I'm very lazy!), so I will update the CVS from.
[1] This is not a great work, but a painful job :) -- it consists to
read the related RFCs and concatenate the good character strings...
--
=== The BOFH Excuse Server ===
Your excuse is: your process is not ISO 9000 compliant