powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / itext проблема с рускими символами
1 сообщений из 1, страница 1 из 1
itext проблема с рускими символами
    #34466008
shadaORG
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Может кто встречался и решил такую проблему
у меня не отображаются в pdf русские символы

возможно, что ктото заметит ошибку в следующем куске кода:
Map documentProperties = new HashMap();
FileInputStream templateStream = new FileInputStream("itext.xml");
DocumentPrinter documentPrinter = new DocumentPrinter(templateStream, documentProperties);
documentPrinter.setXmlReaderClass("org.apache.xerces.parsers.SAXParser");
documentPrinter.setFormatHelper(new FormatHelper(Locale.getDefault()));
FileResourceLoader fileResourceLoader = new FileResourceLoader("../");
documentPrinter.setResourceLoader(fileResourceLoader);
FileOutputStream pdfStream = new FileOutputStream("pdf.pdf");
documentPrinter.printDocument(pdfStream);

itext файл :
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "-//UJAC.org//Print Document//EN" "http://ujac.sourceforge.net/ujac-print-document.dtd">
<document size="A4" margin-left="25" margin-right="25" margin-top="25" margin-bottom="25">
<register-font family="Cyberbit" source="arial.ttf" />
<font-def name="role" family="Cyberbit" style="normal" size="18"/>
<paragraph font="title">Test</paragraph>
<font name="role">
<paragraph>
Test Русских символов!
</paragraph>
</font>
</document>
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / itext проблема с рускими символами
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]