DocRaptor makes it easy to generate PDF files with customized sizes and orientations. Our service uses Prince XML for PDF generation, and setting customized sizes is simply a matter of using optional CSS rules.
Here’s some sample code that will generate a US Letter sized PDF in landscape format:
<html>
<head>
<style type="text/css">
@page { margin: 1em; }
@page { size: US-Letter landscape; }
body { font-size: 200%; }
</style>
</head>
<body>
Behold: a landscape oriented PDF!
</body>
</html>
You can use optional Prince CSS parameters to create PDF files with a wide variety of standardized sizes and formats, as well as setting your own custom dimensions.
Here’s a link to Prince’s documentation, with a full list of their optional page size CSS parameters: