onenote UpdatePageContent Error

G

gustavo echeverry

hi there
i'm working on a C# application which takes a word's document content and
pastes it in oneNote, i got to a point when a need to add an image -base64
BMP- inside an outline -already added and image outside and works fine- and i
keep getting hrInvalidXML -0x80042001-, is there a way to validate the XML
issued to UpdatePageContent method.

here is the general structure:
<one:page ...
<one:pageSettings RTL="false" color="automatic">
<one:pageSize>
<one:Automatic />
</one:pageSize>
<one:RuleLines visible="false" />
</one:pageSettings>
<one:Title style="font-family:Calibri;font-size:17.0pt" lang="en-US">
<one:OE ...>
<one:T><![CDATA[text]]></one:T>
</one:OE>
</one:Title>
<one:Image format="png" originalPageNumber="0"
lastModifiedTime="2008-05-23T11:11:58.000Z"
objectID="{3711BDB5-54CB-4D89-AA81-825CE4C16668}{71}{B0}">
<one:position x="36.0" y="40.0" z="1" />
<one:Size width="320.0" height="240.0" />
<one:CallbackID
callbackID="{3711BDB5-54CB-4D89-AA81-825CE4C16668}{71}{B0}" />
</one:Image>
<one:Outline ... >
<one:position x="36.0" y="310.0000305175781" z="0" />
<one:Size width="520.0" height="29.2968635559082" />
<one:OEChildren>
<one:OE ...
</one:OE>
</one:OEChildren>
</one:Outline>
<one:Outline ... >
<one:position x="36.0" y="359.2969055175781" z="2" />
<one:Size width="520.0" height="95.12889862060547" />
<one:OEChildren>
<one:OE ... >
<one:T><![CDATA[some text]]></one:T>
</one:OE>
<one:OE creationTime="2008-05-23T11:11:58.000Z"
lastModifiedTime="2008-05-23T11:11:58.000Z" alignment="left">
<one:Image format="bmp" originalPageNumber="0">
<one:position x="36.0" y="40.0" z="4" />
<one:Size width="320" height="240" />
<one:Data>
<![CDATA[BASE64 image]]>
</one:Data>
</one:Image>
</one:OE>
</one:OEChildren>
</one:Outline>
</one:page>

Regards
 
I

Ilya Koulchin

gustavo said:
i'm working on a C# application which takes a word's document content and
pastes it in oneNote, i got to a point when a need to add an image -base64
BMP- inside an outline -already added and image outside and works fine- and i
keep getting hrInvalidXML -0x80042001-, is there a way to validate the XML
issued to UpdatePageContent method.

Two things to keep in mind:

First, when creating objects that didn't previously exist (such as
inserting a new image), make sure that you don't have object IDs for the
new objects - otherwise, OneNote will think that you're trying to modify
an existing object and will complain if it can't find it.

Second, when importing image data, you will be unable to use callback
IDs. To import image data, you'll either need to provide the serialized
base64 binary inline, or reference a file.

Ilya
 
Joined
Jun 7, 2010
Messages
1
Reaction score
0
How to add OneNote image using API?

How do you do that? How do you import image data programmatically?

OK, so you create a new page, no image in there yet. Now you want to add an image to the page using the API. You cannot use UpdatePageContent() method, because it expects XML only - you can use Image tag in your XML but cannot use objectID because you will get error code that page object does not exist. Neither can you use callbackIDs.

Let's say, I want to copy an image to my page which I see in another OneNote page. I can use GetPageContent() method to get the callbackID of that image object. Then I can use this as a parameter for GetBinaryPageContent() method to get the image object as a base 64–encoded string. What then? Which API method will take this encoded string as a parameter and import the image into my new page?

And what if the image is an image on my hard drive? How do I specify that this image must be imported into my page, by using the API methods?

Am I missing something obvious? All help appreciated.
 
Joined
Mar 14, 2011
Messages
1
Reaction score
0
Скачать crack для pl

geidiu sytes net/#7040
И Короленко не имел силы никому из просителей отказать

rvom sytes net/index php?segu=88]Скачать симулятор пдд 2010 d3dx9 41 dll
evalea tk/index php?aset=14]Драйвер s5230 скачать
urvalear co cc/?da=51]Скачать реферат рекордские обряды
puihe tk/77/70/49/skachat_drayvera_besplatno_dlya_bearpaw_3 html]Скачать драйвера бесплатно для bearpaw 2400cu plus
ienuipre co cc/84/82/42/]Скачать драйвера для ноутбука hp compaq gr654ea 6715s
reatirpu co cc/index php?lubip=35]Скачать ipod аудио конвертер
iewykr tk/index php?bule=91]Скачать драйвер для transcend jf v90
ycrode co cc/?ravur=42]Скачать драйвера для материнской платы gigabyte ga p35-s3g
ycraqien co cc/60 htm]Я не вернусь минусовка скачать виа гра
ofrirp sytes net/index php?ru=97]Canyon cn-mp18f 2gb скачать драйверы

fearearae co cc/SATA/50 htm
zeilitrur co cc/zyxel/48_skachat_drayver_dlya_ga_m57sli_s4_win_7 html
kraxaese co cc/40_skachat_drayvera_dlya_mobilnogo_telefona_iph/
rpizu co cc/5 html
rceiseis co cc/?opa=87

sreafa no-ip org/Windows_DLL/Skachat_plugin_videoogl_dll_73 html]Скачать plugin videoogl dll
rcuisaejr co cc/?amego=12]Скачать ntfs драйвер dos
eogyxol co cc/skachat-fail-msv70-dll-dlya-ks-57 htm]Скачать фаил msv70 dll для кс
weoj tk/29/10/10/57 html]Скачать для айфона всё
wuqoeja co cc/62-Skachat-besplatno-instrukciyu-b htm]Скачать бесплатно инструкцию blaunpunt davos
pemni co cc/?ru_ivo=20]Mobility radeon x1250 драйвер скачать
fraevrux co cc/?a_oso=72]Скачать драйвера hp laserjet p2014
uiqiko co cc/Pesni/53/]Скачать one republic all the right moves минусовка бесплатно
jyrce co cc/?arugo=20]Dp83905 atlantic драйвер скачать
aeziuve co cc/2011-01-10/48 html]Курсовая по метод аудита финансовой отчетности скачать
sreagopi co cc/index php?ava=7]Скачать руководство пользователя пк
ejuiq co cc/?edasu=2]Скачать драйвер c-media cmi8738 c3dx audio device pci
rpuvy co cc/90-skachat-chistyy-opengl32-dll html]Скачать чистый opengl32 dll
iuhoho co cc/index php?to_o=75]Скачать драйвера бесплатно pro 1
wrevreot co cc/44 htm]Меня засосала опасная трясина минусовка скачать

uibesijr co cc/#8043]здесь
krysric co cc/#212]сайт
wriuhien co cc/#4256]сайт
utrujy co cc/#2905]ссылка
ievro no-ip org/#6700]ссылка
 

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