[Koha-devel] Unicode and PDF... a work-around?

LAURENT Henri-Damien henridamien.laurent at gmail.com
Mon Jan 10 09:13:50 CET 2011


Le 09/01/2011 15:56, Ian Walls a écrit :
> Fellow developers,
> 
> 
> I've got a client who needs to print some pocket labels for their books.
> Sadly, since some of these titles have some funky Unicode characters in
> the 245$abc, the PDF they generate comes out corrupted and unusable. 
> This is a serious problem for their move forward with Koha.
> 
> My research on in the list archives shows that this is well-known
> problem, and is in many ways out of our hands.  PDFs don't handle
> Unicode as natively as we need, and the compromises to make it work are
> much less encouraging.  It seems like this just isn't going to work
> unless Adobe decides to help.  (see
> http://koha.1045719.n5.nabble.com/Diacriticals-Unicode-and-PDF-s-td3068755.html#none
> for more details)
> 
> This got me thinking about a potential alternative.  Perhaps we could
> offer a 4th Label Creator output option (in addition to PDF, CSV and
> XML), of HTML.  Using similar markup that we use for print holds and
> overdues, it may be possible to recreate the page on the browser window
> in a format that anyone can read (and if they can't, their local machine
> can install the necessary fonts or language packs).  There are numerous
> Print To PDF options for all kinds of browsers and platforms, so the end
> result could be the same, only without our code having to do the heavy
> PDF lifting.
> 
> Does this sound like a feasible plan?  Am I missing any subtleties that
> would make this untenable?
Hi Ian
For what it is worth,
we made some HTML to PDF work.
you can see a result here http://test.koha.nimes.fr/relances_html/
It is based on pisa http://www.xhtml2pdf.com/doc/pisa-en.html and works
pretty out of the box. It consists in a post process after
gather_print_notices.pl.
here is the script :
http://git.biblibre.com/?p=koha;a=blob;f=misc/cronjobs/printoverdues.sh;h=f7b677ee82bb2475d5e7879a44d24abb9196b836;hb=refs/heads/master

Hope that helps.
-- 
Henri-Damien LAURENT
BibLibre


More information about the Koha-devel mailing list