Library and tools for handling papersize