Different page size 9

Added code to support different page sizes (3x5in, etc.) and also portrait/landscape mode.