Two Questions for OneNote Importer API

F

Fritz Switzer

Using the "classic" HelloWorld Importer API example, how would you add both
the "position" ie X and Y parameters and secondly, if importing a graphic
object, the scale is always to small when the object appears in OneNote.

Can someone provide some C# example of implementing both of these API
functions. X,Y placement and scale an object.

Page p = new Page("General.One","Test");

OutlineObject outline = new OutlineObject();

outline.AddContent(new HtmlContent("Hello World"));

// Here I'd like to add another line with "Hello World Line 2 at Position
X,Y"

// Next I'd like to add a graphic object ie, "test.jpg" and use a scale
factor so the image doesn't have to be resized in OneNote

p.AddObject(outline);

p.Commit();

p.NavigateTo();

Any additional references to the Importer API with C# code or examples would
be appreciated.

TIA,

Fritz
 
F

Fritz Switzer

I'm still searching for an example of using the Height and Width for
importing an object in C#. Anyone have an idea?




Here is an example of the position feature when importing an object to
OneNote.

OutlineObject outline = new OutlineObject();
outline.Position.X=10;
outline.Position.Y=10;

TIA,

Fritz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top