<html>
<head>
<style>
@page {
  size: 200px 200px;
  margin: 30px;
  
  -fs-max-overflow-pages: 10;
  -fs-overflow-pages-direction: ltr;
}
body {
  margin: 0;
  width: 140px;
  height: 140px;
}
.header {
  height: 30px;
  position: fixed;
  bottom: 0;
  right: 0;
}
.footer {
  height: 30px;
  position: fixed;
  top: 0;
  left: 0;
}
.header .inner {
  display: inline-block;
}
.footer .inner {
  display: inline-block;
  float: right;
}
.inner {
  background-color: orange;
  border: 2px solid black;
  width: 5