I need the width/height of my PDF to correspond to the width/height of my HTML. For example, if my rendered HTML ends up being 600px x 400px, I'd like my PDF to be the same size (or at least the same aspect ratio).
Unfortunately, I don't know what the width/height of the HTML will be before it is rendered. If I knew the width/height beforehand, I could use the @page CSS property.
Is there a way to tell the PDF to match the size of the HTML content? Or is there a way to use JavaScript to calculate the page size onload and set the @page property accordingly?
Unfortunately, I don't know what the width/height of the HTML will be before it is rendered. If I knew the width/height beforehand, I could use the @page CSS property.
Is there a way to tell the PDF to match the size of the HTML content? Or is there a way to use JavaScript to calculate the page size onload and set the @page property accordingly?
Edited by justin.barkhuff