powered by Jive Software

Plugin "Monitoring Service" doesn't export non-english conversations into PDF


#1

Hello.

I’m using Openfire to organize chat between employees in my company, and I’m using plugin “Monitoring Service” by Jive Software to resolve contentious situations.

I discovered the non-english (russian in my situation) characters aren’t exported to PDF at all, but in webpage it displays correctly.

Is there a way to resolve that issue?

I’ve attached example of PDF.


#2

Maybe this depends on database encoding. Are you using unicode?


#3

http://community.igniterealtime.org/message/183655

nobody cares about this since 2008


#4

i’m sorry…
i don’t know java at all, english also is not my best-known language

you must change souce and build plugin to get russian pdf.
on my freebsd it is:
/usr/ports/net-im/openfire/work/openfire_src/src/plugins/monitoring/src/java/org /jivesoftware/openfire/archive/ConversationUtils.java

  1. add two imports:
    import com.lowagie.text.pdf.BaseFont;
    import java.io.IOException;

  2. add throws to definition of methods:
    public ByteArrayOutputStream getConversationPDF(Conversation conversation) throws DocumentException, IOException {
    private ByteArrayOutputStream buildPDFContent(Conversation conversation,Map<String, Font> colorMap) throws DocumentException, IOException {

  3. change font definitions in both those methods

add this line as first to both methods:
BaseFont bf = BaseFont.createFont("/path/to/unicode-font.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

and replace all “FontFactory.getFont(FontFactory.HELVETICA” to “new Font(bf” (10 entries)

  1. just build plugins:
    #cd /usr/ports/net-im/openfire/work/openfire_src/build
    #ant plugins

if build is successfull, you can delete original plugin in admin console and upload your plugin from
/usr/ports/net-im/openfire/work/openfire_src/work/plugins

based on:
http://blog.eveel.ru/2008/04/pdf-itext.html (russian)
http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg07137.html
and google


#5

here, i have created a ticket with your information OF-404, maybe someday someone will fix this and release the new version of plugin


#6

Thanks a lot!


#7

anyone can fix it

i just don’t know what about licensing of external fonts…

and how to get their path unchanged in different OSes


#8

Where I can find source code of Monitoring service plugin last version?