I am using the “ultraGanttViewPrintDocument” control to preview “ultraGanttView”. How can I know the dimensions of the paper in the “InitializeGanttView” event?
The Fit Timescale to End of Page option enlarges or shrinks the timescale's width to meet the page's end. This stops a page from being printed with bars or data on only a portion of the pages, resulting in a blank timeframe beyond the last bar or column of data.
If you want to scale the entire project (rather than just the timeframe section, as in approach 1), scale it to suit the desired number of pages. Follow these steps to accomplish this:
Hello Antonio,
The page and printer related properties are exposed on the UltraGanttViewPrintDocument itself not the Ganttview which is the only event arg of the InitializeGanttView. Keep in mind this GanttView event arg in the event is a new "print" version instance and not the one on-screen. So you can do things like modify the print version of the gantt without affecting what is on-screen.
For more information please visit Customizing the Print Version of the WinGanttView control