I'm Generating my PDF file using MvcRazorToPdf and ITextSharp. My code is like this:
public ActionResult Print()
{
var model = new recordListModel();
model.records = db.Records.Select(x => new recordModel {
Id = x.Id,
Date = x.Date,
PaidTo = x.PaidTo,
CheckNo = x.CheckNo,
Payor = x.Payor
}).ToList();
return new PdfActionResult(model, (writer, document) =>
{
document.SetPageSize(new Rectangle(612f, 396f, 90));
document.NewPage();
});
}
When PDf is generated it will display for example 2 landscape pages that is a half of letter size sheet that you will see in this line of code:
document.SetPageSize(new Rectangle(612f, 396f, 90)); // half of letter size
But when i print it the first page is printed in a whole sheet and the second page also printed in a whole sheet.
How can i print this 2 landscape pages in one sheet? Thanks in advance.