This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Page Format?

krisoye wrote on 2011-03-16:
When using the on-line feature titled "Convert Web Page" there is an option labeled "Page Format". How can I specify this when using the API?

e.g.

<form method='post' target='_blank' action='http://pdfcrowd.com/api/pdf/convert/uri/' id='createPdfForm'>
<input type='hidden' name='username' value='FOO' />
<input type='hidden' name='key' value='BAR' />
<input type='hidden' name='src' id='pdfsrc' value='' />
<input type='hidden' name='page_layout' value='1' />
<input type='hidden' name='initial_pdf_zoom_type' value='4' />
<input type='hidden' name='hmargin' value='0.0 in' />
<input type='hidden' name='vmargin' value='0.0 in' />
<input type='hidden' name='pdf_name' value='1001_1.pdf' />

<!-- this does not seem to work -->
<input type='hidden' id='page_format' name='page_format' value='legal' />

<input type='hidden' name='pdf_scaling_factor' value='1.00' />
<input type='hidden' name='single_page' value='1' />
</form>
support wrote on 2011-03-16:
There is no page_format option in the API but you can use the width and height API options. Here are examples of some common page formats:

Legal:
<input type='hidden' name='width' value='8.5in' /> 
<input type='hidden' name='height' value='14in' />


Letter:
<input type='hidden' name='width' value='8.5in' /> 
<input type='hidden' name='height' value='11in' />


A4:
<input type='hidden' name='width' value='210mm' /> 
<input type='hidden' name='height' value='297mm' />
krisoye wrote on 2011-03-16:
That did the trick... many thanks!