Forum How do I...?

Convert xhtml page to full page PDF?

BaconCatBug
I have an xhtml file I want to convert to a PDF. The conversion works fine but it doesn't make it a full A4 page, it has a massive amount of whitespace along all the edges. Is there any way I can make it scale to the full A4 sized page with no border?

I've tried the --page-size=A4 command line option to no avail. --page-margin=0mm pushes it to the top left corner but doesn't expand it to the rest of the page.
mikeday
That should work fine, perhaps there is a width attribute on the content?
BaconCatBug
It's from a fixed layout epub3, so there are a a lot of different width attributes. Any idea which is the one I am looking for? I apologise for the vague/idiot question

Edit: It looks like it's being set to a fixed size by the CSS and everything else is dependent on it being that size. Is there any way to just flat out scale it up or is it a lost cause as I'd have to manually edit the position of each and every word?

Edited by BaconCatBug

mikeday
It's difficult to say without seeing the document. If it has sizes set in pixels you can use the --css-dpi option on the command-line, eg. setting it to 72 instead of the default 96. This is an awkward way of doing things, though.
BaconCatBug
Wow! That option is exactly what I needed. 72 wasn't perfect but it was damn close. Just have to tinker and find the right number. Thank you so much!

Edited by BaconCatBug