Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Birt 2.x: Charts cut in PDF output
Birt 2.x: Charts cut in PDF output [message #689815] Tue, 28 June 2011 12:33 Go to next message
tscdeu is currently offline tscdeuFriend
Messages: 4
Registered: June 2011
Junior Member
Hi everybody.
We've encountered a problem with Birt 2.3.1 an higher. Each time we're creating a PDF document, the chart within it will be cut instead of being scaled automatically to fit in page margins. PNGs are all ok.
Upgrading to 2.6.2 did not solve this problem. Does anybody has an idea how to fix this problem?
Many thanks!
Re: Birt 2.x: Charts cut in PDF output [message #689943 is a reply to message #689815] Tue, 28 June 2011 15:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Are you using fixed or auto layout? Can you post your report design?

Jason

On 6/28/2011 8:33 AM, forums-noreply@eclipse.org wrote:
> Hi everybody.
> We've encountered a problem with Birt 2.3.1 an higher. Each time we're
> creating a PDF document, the chart within it will be cut instead of
> being scaled automatically to fit in page margins. PNGs are all ok.
> Upgrading to 2.6.2 did not solve this problem. Does anybody has an idea
> how to fix this problem?
> Many thanks!
>
Re: Birt 2.x: Charts cut in PDF output [message #690246 is a reply to message #689943] Wed, 29 June 2011 09:12 Go to previous messageGo to next message
tscdeu is currently offline tscdeuFriend
Messages: 4
Registered: June 2011
Junior Member
Hi Jason,
thanks for your reply.
Attached please find our report design file.
Sorry, but we don't know which kind of layout is used. I searched the design file, but could not find anything. Do you have any idea how to fix this issue?
Many thanks.

[Updated on: Thu, 30 June 2011 10:42]

Report message to a moderator

Re: Birt 2.x: Charts cut in PDF output [message #690440 is a reply to message #690246] Wed, 29 June 2011 14:25 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Layout preference is in the general properties tab of the report. Just
click on the report canvas (not a report item) and look at the general
properties. Why do you have you chart sized greater than the width of
your page?

Jason

On 6/29/2011 5:12 AM, tscdeu wrote:
> Hi Jason,
> thanks for your reply.
> Attached please find our report design file.
> Sorry, but we don't know which kind of layout is used. I searched the design file, but could not find anything. Do you have any idea how to fix this issue?
> Many thanks.
Re: Birt 2.x: Charts cut in PDF output [message #690853 is a reply to message #690440] Thu, 30 June 2011 10:28 Go to previous messageGo to next message
tscdeu is currently offline tscdeuFriend
Messages: 4
Registered: June 2011
Junior Member
Hi Jason,
out Layout preference is set to 'Auto Layout'.
It seems, the chart size was actually wrong. Thanks for the hint. We're using the same design file for HTML and PDF output. We've changed the width so that the chart size is larger on HTML output. Is there any possibilty to scale charts to fit in PDF page width or do we need two separate designs?
Many thanks!
Re: Birt 2.x: Charts cut in PDF output [message #691063 is a reply to message #690853] Thu, 30 June 2011 15:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Because charts are created at render time you may be able to use a
script like:

function beforeGeneration( chart, icsc )
{
var formatout = icsc.getExternalContext().getScriptable().getOutputFormat();
if( formatout == "pdf"){
chart.getBlock().getBounds().setHeight(250);
chart.getBlock().getBounds().setWidth(600);
}else{
chart.getBlock().getBounds().setHeight(100);
chart.getBlock().getBounds().setWidth(600);
}

}

Jason

On 6/30/2011 6:28 AM, tscdeu wrote:
> Hi Jason,
> out Layout preference is set to 'Auto Layout'.
> It seems, the chart size was actually wrong. Thanks for the hint. We're
> using the same design file for HTML and PDF output. We've changed the
> width so that the chart size is larger on HTML output. Is there any
> possibilty to scale charts to fit in PDF page width or do we need two
> separate designs?
> Many thanks!
>
Re: Birt 2.x: Charts cut in PDF output [message #692447 is a reply to message #691063] Mon, 04 July 2011 13:04 Go to previous message
tscdeu is currently offline tscdeuFriend
Messages: 4
Registered: June 2011
Junior Member
Hi Jason,

that's what I was looking for. I was able to fix the bug.
Thank you very much for your support.

Previous Topic:how to set the content of a text element runtime in brit 2.2.1
Next Topic:Free gauges?
Goto Forum:
  


Current Time: Thu Apr 25 01:51:15 GMT 2024

Powered by FUDForum. Page generated in 0.03516 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top