A powertoy to make using Adapx pens for OneNote a little easier for me
I managed to get my hands on a Capturx pen a while back from AdapX. If you haven't seen these pens, they are pretty nice - you can use their pen and their notebooks to take notes and sync the data to OneNote. It works well, but one aspect of the page their software created always bothered me. If you watch their video on their website closely, you'll see that the pen is "smart" enough to know the physical size of the paper in the notebook you are using. See in the video how the white paper surface doesn't quite go to the edges (and past) in OneNote's UI? When you sync your notes, the page OneNote creates is the same physical size as the paper. In my case, I was using a physical notebook that was about 5 inches by 8 inches, so the resulting pages look something like this:
See all that gray to the right and below? This is to help show you the physical size of the page. The addin Adapx provides gives me an accurate mirror image of my notes from the physical world by sizing the page exactly the same as the physical notebook.
I did not like this behavior, though. Once I sync the notes to OneNote, I want to add more notes to the far right or below what I had already written. In short, I wanted the page to be "infinite" size - this is the OneNote default for new pages. I suppose I had just grown too attached to that automatic sizing.
I had a few choices to get the page size I wanted. I could click File | Page Setup and change the "Custom" size the page had to "Auto:"
This worked, but was tedious after changing a few page sizes. This took me four clicks to complete (the File menu, the Page Setup item, changing the dropdown to Auto and then closing the Page Setup Pane).
I really wanted to change this with one click somewhere in the UI. So I wrote a simple powertoy to do this for me.
In the UI, I added a toolbar icon that is supposed to be a small page at the bottom left getting changed into a bigger page with an infinity symbol on it.
Graphic design skills are not my forte, obviously.
The change to the page XML was pretty simple. Here's the XML from the 5x8 page:
<one:PageSize>
<one:Orientation landscape="false" />
<one:Dimensions width="360.0" height="576.0" />
<one:Margins top="36.0" bottom="36.0" left="72.0" right="72.0" />
</one:PageSize>
Like I said, it's pretty simple. What I want is simpler still:
<one:PageSize>
<one:Automatic />
</one:PageSize>
So all the addin does is get the page content (including the binary information since there is ink on the page) and replaces the existing page size with the "auto" setting. Undo is even supported.
Instead of posting the source code for this powertoy as a VC# project, I'm just pasting the few lines needed for this change here:
In the OnClick Event:
String origPageXML;
onApp.GetPageContent(strActivePageID, out origPageXML, OneNote.PageInfo.piBinaryData );
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(origPageXML);
XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);
nsmgr.AddNamespace("one", strNamespace);
XmlNode pageSizeNode = xmlDoc.SelectSingleNode("//one:PageSize", nsmgr);
xmlDoc.SelectSingleNode("//one:PageSize",nsmgr).InnerXml = "<one:Automatic xmlns:one=\"https://schemas.microsoft.com/office/onenote/2007/onenote\" />";
onApp.UpdatePageContent(xmlDoc.InnerXml, System.DateTime.MinValue);
I had one last option. I could have done this with OMSpy - but I hit some problems with that that I want to explain later.
For now, the download link for this page expander powertoy should be under my signature. Have fun!
Questions, comments, concerns and criticisms always welcome,
John
Comments
Anonymous
March 12, 2009
One of the reasons it took me too long to finish the Page Expander powertoy (I haven’t used the AdapxAnonymous
March 14, 2009
Your posts certainly show that you are understanding of the end-user who not only has to use the software, but has to get the whole "system" to work. I think the digital pen has the possibility of really making OneNote useful to a very broad audience. There ought to be a special package of OneNote for non-tablet PCs that comes paired with a digital pen. Being attached to a tablet PC isn't widely accepted in many environments and isn't always available as an option, or even affordable. But for those of us who use OneNote a lot, and really want to use it more, a digital pen has potential for allowing comparable functionality with relatively small investment, and it is also discreet. Now I know you are not in the business of doing product reviews. But the pens I've seen that I am most interested in don't require the special paper. The pens work as a unit with a small clip that attaches to the top of the paper notepad. The clip records the penstrokes, and then the clip detaches from the paper pad and plugs into the USB port for download. I would be curious if you have tried, or are planning on trying, some of these new digital pens with OneNote. The whole system together. Your post above is a great example of an issue that could be the difference between a friendly or frustrating pen system! Also, does OneNote have its own facility for directly interfacing with devices like these, bypassing the manufacturer software? If it doesn't it should. The pen should only be expected to do its job of being a pen. Having manufacturers write intermediate download software has to be worse for the user. OneNote should be able to directly take the raw penstroke information from a digital pen and also control all the user options for the import (like in your post, being able to choose between scaling the external page to a standard size, or expanding the OneNote page to the right for the actual size of the writing). I know this would require some work but I bet Microsoft has enough clout that it could demand some standard export format from all manufacturers and "certify" the pen as "OneNote ready". That bit of marketing would be extremely helpful to consumers. I'm stuck right now, because there is no way that I can justify buying a pen without first knowing if it is going to work WELL with OneNote. At the same time, while I currently use OneNote extensively, I know I'm not using it to its full potential because I don't have the hardware. I bet there are many of us. Thanks John. Great blog. I appreciate being able to throw these kinds of things directly at someone at Microsoft, who I know "gets it"!Anonymous
April 23, 2009
Hey John, I'm trying to make a page with a set width (8.5") and an infinite height. The idea is that when I make pdfs from (or print) my onenote notebook pages then it doesn't all get squished and shrink the font down. I'm not having any luck so far. Seems like it should be fairly easy to do. Any ideas?Anonymous
April 27, 2009
Let me see what I can find out.Anonymous
May 07, 2009
The comment has been removedAnonymous
May 08, 2009
Sadly, there is no way to do this. I've been OOF this week but will post the details soon. JohnAnonymous
January 25, 2010
What a great idea Seth !! I would buy a "OneNote Ready" pen as well. The main reason I have not bought one is potential compatibility issues and that would assure it would work with the software I use daily.Anonymous
September 21, 2010
Thank you! Great powertoy. Also useful for the ACE CAD Digimemo A402!