Looking at the XML schema for page width and height in OneNote

I received an email a short time ago which had a request for a particular page size format. In short, the college student wanted to have page which was a fixed width, but infinite height in order to take all notes for a semester long class on one page. Sadly, that is not possible, but I thought it may be interesting to see what I did to confirm this. In the process, I can demonstrate a workaround that may be "good enough."

First, I started the ONOMSpy tool. This is what I use to quickly modify the XML for a given page in OneNote. I also ensured I had the XML schema reference downloaded and was ready to go.

First, I opened the schema reference to look at the OneNote XSD. I looked up the PageSize schema:


I can see from here that the PageSize XML node exposes the Dimensions element, so I am in business.  (And sorry for the image – the XML formatting gets lost when pasting into Live Writer.  I will leave a bug on http://connect.microsoft.com.  In the meantime, OneNote screen clipping to the rescue!)

Looking in the Dimensions element of the schema shows two pieces of information. First is the actual schema:


Which shows the height and width of a page are individually exposed. This made me slightly optimistic that I could set a fixed width and infinite height. Then I noticed the limits on the parameters:


And here's where the request became impossible. The minimum value of the height is zero, but it has a maximum height, albeit of one million.

And here's where "good enough" may come into play. I can set the width to whatever width the user wants (let's say 1000 for sake of argument) and set the height to 1000000. This may be satisfactory if the user never lets his pages go over one million pixels in height. If the real constraint is that he wants all of his notes for a given period (one college class) on a single page, this may well be enough since the data set he's working with is finite.

I'll go through some testing I did for this next. Stay tuned.

Questions, comments, concerns and criticisms always welcome,


Skip to main content