I have been looking in the documentation but can\'t find the answer. How can I specify the page size of my pdf document and what are the available page sizes? I keep on look
You can set the page size when creating a new PDF like this:
kit = PDFKit.new(source, :page_size => "Legal")
PDFKit uses WKHTMLTOPDF which in turn uses QPrinter. You can find the available sizes in the QPrinter documentation (there's a bunch), but its pretty safe to say that any size paper you want is available. Also, you can set a custom size if you can't find what you need.
NB: If you don't set a default option for page_size
in a config somewhere AND don't supply one in your method call, PDFKit will use its internal default (Letter). See line 10 of lib/pdfkit/configuration.rb