0

Using Rotativa in an ASP.NET project and I'm wondering if there is a way to programmatically tell it to shrink the HTML content used to generate the PDF into a single landscape-orientated page?

My current code looks like this:

public ActionResult PrintStratgicMap(int employeeId, string slug, string fiscalYear)
{
     return new ActionAsPdf("Goals", new { employeeId = employeeId, slug = slug, fiscalYear = fiscalYear }) 
     { FileName = "strategic_map.pdf", 
       FormsAuthenticationCookieName = ".auth", 
       CustomSwitches = "--print-media-type", 
       PageOrientation=Rotativa.Options.Orientation.Landscape
     };
}
wgpubs
  • 8,131
  • 15
  • 62
  • 109

1 Answers1

0

Have you tried using page-break-inside: avoid; combined with dynamically changing changing your font size?

Calidus
  • 1,374
  • 2
  • 14
  • 31