|
Re: Problems with viewing report as PDF and also in Preview [message #654941 is a reply to message #654834] |
Thu, 17 February 2011 17:05 |
|
Is there any whitespace in the string? You may want to look at this:
//RE API method
http://dev.eclipse.org/newslists/news.eclipse.birt/msg30589. html
PDFRenderOption options = new PDFRenderOption();
options.setOption(IPDFRenderOption.PDF_HYPHENATION, true);
options.setOption(IPDFRenderOption.PDF_TEXT_WRAPPING, true);
options.setOutputFileName("output/resample/wordwrap.pdf");
options.setOutputFormat("pdf");
or
//javascript substring
http://www.birt-exchange.org/org/forum/index.php/topic/19827 -how-do-i-use-word-wrap-in-report-design/page__s__ad0bb32bbb ac95aee7b5556149417a73
Jason
On 2/17/2011 6:22 AM, Teresa Sanchez wrote:
> Hi everybody,
>
> recently I have started to use Birt to create reports from a database of
> research groups. I have detected some problems when generating a PDF and
> also when making a preview of the report, due to long lines that appear
> in the database.
>
> In my report, the data from the groups are collected in a table. In some
> cell I have added a grid with all the information. The problem is that
> when making a preview or generating the PDF, in the cells of the grid
> only the first line is shown, the rest of the content is cut off.
> If I choose the option "View as DOC" all the contents in the table are
> shown but I have to resize the cells.
>
> Do anybody know how to solve this problem with the PDF generator?
>
> Thank you very much for your help.
>
> Best regards
|
|
|
|
|
Re: Problems with viewing report as PDF and also in Preview [message #655567 is a reply to message #655518] |
Mon, 21 February 2011 18:55 |
|
longStr I believe in that example is whatever you pass in as a value.
For example in an expression wrap(row["mydata"], 20)
Width is the max length you want the string to be before inserting a new
line.
Jason
On 2/21/2011 9:39 AM, Sergey wrote:
> Hi Jason Weathersby,
>
> Can you please explain how it script work and hot they get parameter -
> longStr and width?
>
> function wrap(longStr,width){
> length = longStr.length;
> if(length <= width)
> return longStr;
> return (longStr.substring(0, width) + "\n" +
> wrap(longStr.substring(width, length), width));
|
|
|
Re: Problems with viewing report as PDF and also in Preview [message #655568 is a reply to message #655456] |
Mon, 21 February 2011 18:56 |
|
Teresa,
Currently there is no option to change this in the Viewer unless you
modify the source for it. Can you log a bug for this?
Jason
On 2/21/2011 3:58 AM, Teresa Sanchez wrote:
> Thank you Jason for your help, but I would like to know how to change
> the option in PDFRenderOption because I think that I don't have the
> source code.
> I am using the the gui environment of Birt.
> Again, thank a lot.
>
> Regards,
>
> Teresa.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05088 seconds