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
325
ultraGridDocumentExporter Publish XPS does not correctly export to Landscape
posted

We are using Infragistics v10.3

UltraGridDocumentExporter properly exports a PDF in Landscape but not to XPS LandScape:

This is the screen shot of the PDF Export:

 

This is the screen shot of the XPS Export:

 

 

ultraGridDocumentExporter1.TargetPaperOrientation = PageOrientation.Landscape;

ultraGridDocumentExporter1.TargetPaperSize = PageSizes.A4;

ultraGridDocumentExporter1.Margins = new PageMargins(30f, 30f, 30f, 30f);

Report rpt = new Report();

ISection summary = rpt.AddSection();

summary.PageMargins.Left = 30f;

summary.PageMargins.Right = 30f;

summary.PageMargins.Top = 30f;

summary.PageMargins.Bottom = 30f;

summary.PageOrientation = PageOrientation.Landscape;

summary.PageSize = PageSizes.A4;

 

ultraGridDocumentExporter1.Export(GridHourly, summary);

ultraGridDocumentExporter1.Export(GridHourlyDetail, summary);

var reportFileName = @"c:\temp\mssreport.xps";

using (PrintDialog prtDlg = new PrintDialog())

{

if (prtDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)

{

try

{

// change to PDF and it creates the document correctly

rpt.Publish(reportFileName, FileFormat.XPS);

}

finally

{

}

}

}