Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
370
How do I make the grid layout occupy entire whitespace available on exported PDF document
posted

I have been trying to make the grid export to PDF in a WYSIWYG manner

I have been "almost" successful with very less code

void ultraGridDocumentExporter1_ExportStarted
(object sender, Infragistics.Win.UltraWinGrid.DocumentExport.ExportStartedEventArgs e)
{
e.Section.PageSize = PageSizes.A4;
e.Section.PageMargins = new Infragistics.Documents.Reports.Report.Margins(
PageMargins.Narrow.Left, PageMargins.Narrow.Right,
PageMargins.Narrow.Top, PageMargins.Narrow.Bottom);
e.Section.PagePaddings = new Paddings(0);
e.Section.PageOrientation = Infragistics.Documents.Reports.Report.PageOrientation.Landscape;
e.Section.PageAlignment = Infragistics.Documents.Reports.Report.ContentAlignment.Center;
}

I get the fonts, column widths, row height correctly as seen in the grid inside of windows forms container

But the grid layout inside of PDF document does not occupy (stretch or shrink) the entire whitespace available on the PDF document (see red blocks in the attached PDF screenshot) - what am I not doing right?

Thanks!

Screenshot: https://doc-0s-44-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/8p6fggpi7eli97l0n6cojs6v6nrda7je/1423749600000/12612333493395018583/*/0B42CvR3rv2CxUjJZRGJwd25aSzA