Monitoring Service plugin should export unicode characters in PDF
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
Removing the 'fix version' for all unresolved issues that were scheduled for version 7.8.2. We're releasing this version today - the remaining issues should be rescheduled later.
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