The problem of export pdf
The problem of export pdf
hi stimulsoft;
I use the next java code to export pdf file , but it isnt working, the size of this pdf file is zero , I cannt open this pdf file , how to modify the code ?
, thanks
I use the next java code to export pdf file , but it isnt working, the size of this pdf file is zero , I cannt open this pdf file , how to modify the code ?
, thanks
Re: The problem of export pdf
Hello.
You deserialize report template, but not run render, therefore report is empty.
Please add before export.
You deserialize report template, but not run render, therefore report is empty.
Please add
Code: Select all
stiReport.render();
Re: The problem of export pdf
thanks ,but how to fix Chinese messy code ?
Re: The problem of export pdf
Hello.
Can you explain your problem in more detail, maybe with pictures?
Can you explain your problem in more detail, maybe with pictures?
Re: The problem of export pdf
I use a demo such as
,
and on html preview is
,
but export pdf file is
thanks
,
and on html preview is
,
but export pdf file is
thanks
Re: The problem of export pdf
Hello.
You must use font wich include Chinese symbols (for example Arial Unicode)
Browsers use system Fallback font functions (https://en.wikipedia.org/wiki/Fallback_font) to display symbols from other fonts, but PDF can't use it.
You must use font wich include Chinese symbols (for example Arial Unicode)
Browsers use system Fallback font functions (https://en.wikipedia.org/wiki/Fallback_font) to display symbols from other fonts, but PDF can't use it.
Re: The problem of export pdf
Hello.
How can I use font wich include Chinese symbols on java code? and can you give me an API?
How can I use font wich include Chinese symbols on java code? and can you give me an API?
Re: The problem of export pdf
Hello.
You must setup font for each components you need. For example in our system font "Arial Unicode MS" include Chinese symbols, by designer or by code:
Or you can replace font name in .mrt file in text editor.
You must setup font for each components you need. For example in our system font "Arial Unicode MS" include Chinese symbols, by designer or by code:
Code: Select all
((StiText) report.GetComponentByName("Text1")).setFont(new StiFont("Arial Unicode MS", 8));
Re: The problem of export pdf
Thank you ,it is working.
But it can be tedious to maintain because it imposes a duplication of code, I must setup the font on the .jsp and the java code on exporting to PDF file
But it can be tedious to maintain because it imposes a duplication of code, I must setup the font on the .jsp and the java code on exporting to PDF file
Re: The problem of export pdf
It also too difficulty to set a variety of fonts on the report