Uploaded image for project: 'Openfire'
  1. Openfire
  2. OF-404

Monitoring Service plugin should export unicode characters in PDF

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Moved to GH
    • Affects Version/s: 4.0.3
    • Fix Version/s: None
    • Component/s: Plugins
    • Labels:
      None

      Description

      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

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

      1) 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 {

      2) 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)

      3) 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

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            wroot wroot
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: