Closed GoogleCodeExporter closed 9 years ago
It seems that it's a problem with iText and installed font on your Linux OS.
I cannot help you more because I have not OS Linux.
Regards Angelo
Original comment by angelo.z...@gmail.com
on 29 May 2013 at 2:08
First of all thanks for quick reply.
I cheched the embedded fonts on PDF generated on Win and Ubuntu, the Arial Font
(the one I use) is in both of them.
The only difference if on Font Encoding: on Win generated PDF it is "WinAnsi"
while on Ubuntu generated one it is "Custom"
Is there any configuration I can Use to force to use WinAnsi encoding or it is
out of control of xdocreport?
Aside Note: If I populate only the docx file, without converting into PDF all
characters are displayed fine.
Thanks
Original comment by pietroma...@gmail.com
on 31 May 2013 at 7:46
Attachments:
Hi,
Have you tried to force the encoding with pdf options
https://code.google.com/p/xdocreport/wiki/XWPFConverterPDFViaIText
Regards Angelo
Original comment by angelo.z...@gmail.com
on 2 Jun 2013 at 2:47
[deleted comment]
Yes! it works, now it converts with accent letter.
But how to generate a report not having the IXDocReport instance?
Thanks
Original comment by pietroma...@gmail.com
on 4 Jun 2013 at 6:59
I'm sorry, I don't understand what you mean with IXDocReport instance?
You wish just convert a docx to pdf? If it that please read
https://code.google.com/p/xdocreport/wiki/XWPFConverterPDFViaIText
Original comment by angelo.z...@gmail.com
on 4 Jun 2013 at 7:04
I'll try to explain better.
I need to generate report from docx model (replace some merged fields) and then
convert it to PDF.
Previously I used this code:
final IXDocReport report = XDocReportRegistry.getRegistry().loadReport(in, TemplateEngineKind.Velocity);
final IContext context = report.createContext();
final OutputStream out = new FileOutputStream(new File(file + ".pdf"));
final Options options = Options.getTo(ConverterTypeTo.PDF).via(ConverterTypeVia.XWPF);
report.convert(context, options, out);
And on IXDocReport instance "report" I can call "convert" method to have a PDF
file.
With different version you suggested as
https://code.google.com/p/xdocreport/wiki/XWPFConverterPDFViaIText
I don't know how to have the report functions, but only convert the file.
I hope I'm explained my needs
Original comment by pietroma...@gmail.com
on 4 Jun 2013 at 7:36
Ok I understand you wish to customize the font encoding for report#convert. The
report#convert is based on
https://code.google.com/p/xdocreport/wiki/XWPFConverterPDFViaIText
To customize pdf settings it, try that :
--------------------------------------------------
...
final Options options =
Options.getTo(ConverterTypeTo.PDF).via(ConverterTypeVia.XWPF).subOptions(PdfOpti
ons.create().fontEncoding("windows-1250"));
report.convert(context, options, out);
--------------------------------------------------
Original comment by angelo.z...@gmail.com
on 4 Jun 2013 at 7:45
Yes! good product great support.
Thanks, you can close the issue
Original comment by pietroma...@gmail.com
on 4 Jun 2013 at 7:56
Original issue reported on code.google.com by
pietroma...@gmail.com
on 29 May 2013 at 2:00Attachments: