princexml

How do I increase the dimensions of pages in PDFs that I have created using the program Prince?


Prince uses a CSS file to set the properties of the PDFs it generates. I have tried adding the commands body {height: 1536; width: 1024} to the CSS file for which I received the prince error:

prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/15. drug therapy of depression and anxiety disorders.htm:32: error: Unexpected end tag : table
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/15. drug therapy of depression and anxiety disorders.htm:33: error: Unexpected end tag : td
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/15. drug therapy of depression and anxiety disorders.htm:35: error: Unexpected end tag : tr
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/15. drug therapy of depression and anxiety disorders.htm:36: error: Unexpected end tag : tbody
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/15. drug therapy of depression and anxiety disorders.htm:36: error: Unexpected end tag : table
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/16. pharmacotherapy of psychosis and mania.htm:32: error: Unexpected end tag : table
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/16. pharmacotherapy of psychosis and mania.htm:33: error: Unexpected end tag : td
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/16. pharmacotherapy of psychosis and mania.htm:35: error: Unexpected end tag : tr
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/16. pharmacotherapy of psychosis and mania.htm:36: error: Unexpected end tag : tbody
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/16. pharmacotherapy of psychosis and mania.htm:36: error: Unexpected end tag : table
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/16. pharmacotherapy of psychosis and mania.htm:380: error: ID popup already defined
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/16. pharmacotherapy of psychosis and mania.htm:578: error: error parsing attribute name
prince: /home/brentonhorne/Drugs/CHM/Goodman and gillman_html/ii. neuropharmacology/16. pharmacotherapy of psychosis and mania.htm:774: error: ID popup already defined

Without this line the text doesn't fit to the PDF.

enter image description here


Solution

  • Use @page { size: A4 } to set the paper size. If you need bigger paper, try A3, or A4 landscape. Making the paper very big will make it difficult to print out, though.