Replies: 6 comments 10 replies
-
The output to PDF still appears to be broken with the latest release. Looking at the test case code: bool success = true;
BeginDocument fails as well as the rest of the calls to the renderer. We would like to proceed with a purchase of the professional license but we need this functionality to work for us. Please advise. We tested the code on Windows/.NET 7.0(and 6.0 as well). |
Beta Was this translation helpful? Give feedback.
-
Attached is the sample code. You will see a Winforms app that does work and a Maui app that fails.
From: Emgu ***@***.***>
Sent: Tuesday, January 17, 2023 1:51 PM
To: emgucv/emgucv ***@***.***>
Cc: Michael Hansen ***@***.***>; Author ***@***.***>
Subject: Re: [emgucv/emgucv] Render OCR as PDF (Discussion #737)
Please shared the code.
One of the important item to check is that, the 2nd parameter passed to the constructor of "PDFRenderer" must be a folder that is accessable by the app, and contains the PDF font file "pdf.ttf". If not, the PDFRender will fail.
—
Reply to this email directly, view it on GitHub<#737 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABBPYDFHTYWU56CRPSK5LZDWS3S2NANCNFSM5ZYRMZSQ>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
WARNING: Do not click links or open attachments unless you recognize the source of the email and know the contents are safe.
|
Beta Was this translation helpful? Give feedback.
-
New project file to show error. Updated to Maui 7.0. Same failure of PDF. Note: run as Windows build rather than compile. The compile throws the static main error because it's trying to create a Mac Catalyst build and I've torn that out of the project. Would seem to be a bug by MS. But I've tested what is in the zip file and it will run as a Windows build. Run the app and click on the Click Me button to execute the emgu/OCR code. |
Beta Was this translation helpful? Give feedback.
-
There is one issue we have discovered: PdfRenderer.AddImage, if the image passed in to the Tesseract engine is RGB color(24 or 32 bit) the call to AddImage returns a false. The PDF is still generated with the detected text but the image is missing from the PDF. Is this a bug, I assume this is not limited to adding 1 channel gray images only. In the sample code if you generate the Mat img object with 3 channels instead of 1 you will get a failure of Addimage. This is the line that returns a false: |
Beta Was this translation helpful? Give feedback.
-
I see the PDFRenderer class as part of the OCR package but there are no examples on how to use it. I want to be able to create a searchable PDF from a performed OCR. Can anyone point at sample code to create a PDF from OCR?
Beta Was this translation helpful? Give feedback.
All reactions