is there any example available for writing the results of an OCR to a DOCX file?
all the samples i found just do a console.write
i would like to use aspose.words with the partsinfo collections to recreate the scan in a word docx.
any help is appreciated.
thanks.
@gavinduffy,
You may use the code snippet given below to save the results of OCR scanning to DOCX file.
OcrEngine ocrEngine = new OcrEngine();
ocrEngine.Image = ImageStream.FromFile("Sample.jpg");
ocrEngine.Process();
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln(ocrEngine.Text.ToString());
doc.Save("ocrResult.docx");
We hope that this answered your question. Please feel free to reach us if additional information is required.
so there is no example to show how to use the x / y coordinates, font information etc to rebuild a similar output?
@gavinduffy,
There is no example to represent this at the moment. We will take this under consideration while updating the documentation. Regarding the styling of the Word document, you can visit the link given below for more detail.
Using DocumentBuilder to Modify a Document