Handle double sided documents

close #24