Margin adjustment and detection of odd/even pages
