page-size-010

@page size smaller than paper

WeasyPrint

This browser

Flags
paged
Assertion
The computed value of the 'size' property is its specified value. If the page box is smaller than the page size the user agent SHOULD either center the page box on the sheet or position the page box in the upper left corner of the page sheet.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 <head>
 4 <title>CSS Test: @page size smaller than paper</title>
 5 <link rel="author" title="Tom Clancy" href="mailto:tclancy@revenution.com">
 6 <link rel="author" title="Hewlett-Packard Company" href="http://www.hp.com/">
 7 <link rel="help" href="http://www.w3.org/TR/css3-page/#page-size">
 8 <meta name="flags" content="paged">
 9 <meta name="assert" content="The computed value of the 'size' property is its specified value.">
10 <meta name="assert" content="If the page box is smaller than the page size the user agent SHOULD either center the page box on the sheet or position the page box in the upper left corner of the page sheet.">
11 <style type="text/css">
12 	@page {
13 		margin: 0.5in;
14 		border: 2pt solid black;
15    		size: 3in 3in;
16 	}
17 </style>
18 </head>
19 <body>
20 	<p>When printed on paper 3 inches x 3 inches or larger, this content should appear in a box whose exterior dimensions are 2 inches x 2 inches. The box should either be centered on the page or positioned in the upper left corner.</p>
21 </body>
22 </html>