Render PDF from image

Ask question on using Emgu CV with C#
Post Reply
jains
Posts: 2
Joined: Thu Dec 19, 2019 8:49 am

Render PDF from image

Post by jains » Thu Jan 02, 2020 7:49 am

Hello All,
I am unable to render a PDF from a scanned pdf image (.png) file using the PDFRenderer. It creates a blank pdf file . Any pointers will help. I just get the below message and no real error messages . The fonts file is present in the data directory.
The program '[12084] emgutest.vshost.exe' has exited with code -1073740777 (0xc0000417).
Below is snippet of my code

Mat My_Image2 = My_Image1.Clone();

Pix pix = new Pix(My_Image2);

string tessdata = "H:\\Tesseract\\tessdata";



var render = new PDFRenderer("\\test\\op1", tessdata1, false);
var ocrProvider = new Tesseract(tessdata1, "eng", OcrEngineMode.Default);
//ocrProvider.ProcessPage(pix, 1, "H:\\Python\\scannedpdf.png", null, 20000, render);
ocrProvider.SetImage(pix);

ocrProvider.Recognize();

ocrProvider.ProcessPage(pix, 1, null, null, 30000, render);

render.Dispose();

ocrProvider.Dispose();

Post Reply