Print a chart in a page in landscape orientation


I want to print a chart in landscape orientation, but when I execute my script only my chart is in landscape orientation not my page. Do you know how to do this ? My chart is attached in PDF format.

Here is my script :

job = system.print.createPrintJob(event.source.parent.getComponent("Chart")) job.setMargins(0.5) job.zoomFactor = -1 job.showPageFormat = 4 job.pageWidth = 8.5 job.pageHeight=11 job.orientation = system.print.LANDSCAPE job.print()

chart.pdf (140 KB)