leadtools-sdk

JVM randomly crashes EXCEPTION_ACCESS_VIOLATION during Leadtools OCR process

a 夏天 提交于 2020-02-07 01:28:46
问题 We are developing multi-threaded java application using licensed Leadtools SDK 20 for converting large pdf documents to searchable pdf documents. During OCR process Java Virtual Machine randomly crashes - EXCEPTION_ACCESS_VIOLATION(Problematic frame: C [Ltocrx.dll+0x2af3a]). I've noticed that it may happens if user try to cancel OCR process. public class OcrProgressCallback implements OcrProgressListener { @Override public void onProgress(OcrProgressData ocrProgressData) { if (ocrProgressData

Image Created using GDI+ is not showing in VB6 LeadTools

家住魔仙堡 提交于 2019-12-31 05:37:10
问题 We have legacy applications built using VB6. These applications are using lead-tools. Everything was perfectly working. We have another .NET process that optimizes the image (and do some water-marking) and save it in tiff format. Here is glimpse of .NET code, using (var bitmap = new Bitmap(contractWidth, contractHeight)) { using (var canvas = Graphics.FromImage(bitmap)) { canvas.InterpolationMode = InterpolationMode.Default; // Play with canvas canvas.Save(); } using (var stream = new

How to convert ImageSource to Byte array?

倖福魔咒の 提交于 2019-12-17 07:50:35
问题 I use LeadTools for scanning. I want to convert scanning image to byte. void twainSession_AcquirePage(object sender, TwainAcquirePageEventArgs e) { ScanImage = e.Image.Clone(); ImageSource source = RasterImageConverter.ConvertToSource(ScanImage, ConvertToSourceOptions.None); } How to convert ImageSource to Byte array? 回答1: Unless you explicitly need an ImageSource object, there's no need to convert to one. You can get a byte array containing the pixel data directly from Leadtools.RasterImage

Document Scanning from ASP.net Web Application

跟風遠走 提交于 2019-12-10 16:23:59
问题 I have a ASP.Net C# 4.0 Web Application I need to Add a scanning feature for my users. This is what I want to achieve On my web application user clicks on a button opens a window with preview of document in Scanning device attached to the client system User confirms the Scan this will save the Scanned document in jpg/pdf format on the server then do the OCR on document Can any one suggest a way to achieve this. I read about this https://www.leadtools.com/sdk/engine/imaging not sure how much

LEADTOOLS adding QRBarcode to an existing image

怎甘沉沦 提交于 2019-12-10 11:19:52
问题 My current code writes a qr code but it over writes my file with just the qr code. I am not sure how to adjust the size of the qr code to be placed in one corner of the document rather than taking up the whole page. Also not sure if the RasterImage.Create means that it creates a new file with just the qr and discard my original file? Code: - Convert PDF to Bmp to add QR then saving back to PDF public void PDFFileExample() { RasterCodecs codecs1 = new RasterCodecs(); codecs1.Options.Pdf

LEADTOOLS adding QRBarcode to an existing image

一个人想着一个人 提交于 2019-12-06 13:14:07
My current code writes a qr code but it over writes my file with just the qr code. I am not sure how to adjust the size of the qr code to be placed in one corner of the document rather than taking up the whole page. Also not sure if the RasterImage.Create means that it creates a new file with just the qr and discard my original file? Code: - Convert PDF to Bmp to add QR then saving back to PDF public void PDFFileExample() { RasterCodecs codecs1 = new RasterCodecs(); codecs1.Options.Pdf.InitialPath = @"C:\LEADTOOLS 18\Bin\Dotnet4\Win32"; codecs1.Dispose(); RasterCodecs codecs2 = new

Image Created using GDI+ is not showing in VB6 LeadTools

你说的曾经没有我的故事 提交于 2019-12-02 09:02:21
We have legacy applications built using VB6. These applications are using lead-tools. Everything was perfectly working. We have another .NET process that optimizes the image (and do some water-marking) and save it in tiff format. Here is glimpse of .NET code, using (var bitmap = new Bitmap(contractWidth, contractHeight)) { using (var canvas = Graphics.FromImage(bitmap)) { canvas.InterpolationMode = InterpolationMode.Default; // Play with canvas canvas.Save(); } using (var stream = new MemoryStream()) { bitmap.Save(stream, ImageFormat.Tiff); return stream.ToArray(); } } When we save this in

How to convert ImageSource to Byte array?

六眼飞鱼酱① 提交于 2019-11-27 05:32:20
I use LeadTools for scanning. I want to convert scanning image to byte. void twainSession_AcquirePage(object sender, TwainAcquirePageEventArgs e) { ScanImage = e.Image.Clone(); ImageSource source = RasterImageConverter.ConvertToSource(ScanImage, ConvertToSourceOptions.None); } How to convert ImageSource to Byte array? Unless you explicitly need an ImageSource object, there's no need to convert to one. You can get a byte array containing the pixel data directly from Leadtools.RasterImage using this code: int totalPixelBytes = e.Image.BytesPerLine * e.Image.Height; byte[] byteArray = new byte