After creating the pdf, when I go to print it always prints portrait. The code is below, any help would be great.
PdfHtmlLayoutFormat pdfHtml = new PdfHtmlLayoutFormat();
PdfDocument doc = new PdfDocument();
PdfPageSettings ps = new PdfPageSettings();
pdfHtml.FitToHtml = Clip.None;
pdfHtml.Layout = PdfLayoutType.Paginate;
var letter = PdfPageSize.A4;
ps.Orientation = PdfPageOrientation.Landscape;
ps.Margins.Top = 10;
ps.Margins.Bottom = 10;
ps.Size = letter;
String url = "internal url";
doc.LoadFromHTML(xxx, false, false, true, ps, pdfHtml);
doc.PrintDocument.PrinterSettings.DefaultPageSettings.Landscape = true;
doc.PrintDocument.PrinterSettings.DefaultPageSettings.Margins.Left = (int) .25;
doc.PrintDocument.PrinterSettings.DefaultPageSettings.Margins.Right = (int) .25;
doc.PageScaling = PdfPrintPageScaling.FitSize;
doc.PrintDocument.Print();
doc.SaveToFile(@"c:\zzz.pdf");
doc.Close();
PDFDocumentViewer(@"c:\zzz.pdf");