Microsoft Office Forums Set OCR Language with OneNote COM-API

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 02-22-2017, 08:49 AM
zizou2981 zizou2981 is offline Set OCR Language with OneNote COM-API Windows 7 64bit Set OCR Language with OneNote COM-API Office 2013
Set OCR Language with OneNote COM-API
Join Date: Feb 2017
Posts: 1
zizou2981 is on a distinguished road
Default Set OCR Language with OneNote COM-API

I use the OneNote COM API and Python to recognize text from an image. To load a new image, I use method "UpdatePageContent" and it works very well.

import traceback
import win32com.client
def oneAddImage(OneNoteObject, PageID):
        ImagePath = r"C:\TestDir\TestImage.png"
        newContent = u'<?xml version="1.0"?><one:Page xmlns:one="" ID="%s"><one:PageSettings RTL="false" color="automatic"><one:PageSize><one:Automatic/></one:PageSize><one:RuleLines visible="false"/></one:PageSettings><one:Image format="png" originalPageNumber="0"><one:Position x="36.0" y="86.4000015258789" z="0"/><one:File path="%s"/></one:Image></one:Page>'%(PageID, ImagePath)

        OneNoteObject = win32com.client.gencache.EnsureDispatch('OneNote.Application')

        OneNoteObject.UpdatePageContent(newContent, xsSchema=win32com.client.constants.xs2013)

    except Exception:
        return False
My question is how can I Choose Language via API for Make Text in Image Searchable?

Last edited by zizou2981; 02-22-2017 at 06:24 PM.
Reply With Quote

api, ocr, onenote 2013

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not change Language in normal OneNote App - in OneNote 2016 it is possible Ziselz OneNote 0 09-20-2016 11:23 PM
Onenote 2016 desktop not syncing a particular page with onenote online Akash OneNote 0 07-07-2016 11:16 AM
OneNote "You must start OneNote before completing this task" after OneNote is open anonymous OneNote 1 05-27-2015 07:55 PM
Set OCR Language with OneNote COM-API OneNote app text is large when send to OneNote 2013 raineysky OneNote 2 02-18-2015 07:37 AM
Language settings are different in OneNote than other Office programs tjuel OneNote 0 09-02-2012 06:54 AM

All times are GMT -7. The time now is 09:14 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd. is not affiliated with Microsoft