Change the page size data extraction method

I change it for 2 reasons.

The first one was because there was a case where an error was raised but
not the one expected. If you enter something like "100:" it matches the
condition in that method thus the exception was not raised. The error was
catch later.
The second one was because there was to many constants and they were
duplicated since only the orientation change.

Now, there is less constants and the exception is raised earlier.
fix page-size attribute