These are my settings
Code: Select all
.TwainSetHideUI(True)
.TwainSetAutoFeed(True)
.TwainSetAutoScan(True)
.TwainSetPixelType(TwainPixelType.TWPT_BW)
.TwainSetBitDepth(1)
Code: Select all
.TwainSetHideUI(True)
.TwainSetAutoFeed(True)
.TwainSetAutoScan(True)
.TwainSetPixelType(TwainPixelType.TWPT_BW)
.TwainSetBitDepth(1)
Code: Select all
With pictureImaging
.TwainSelectSource(Me.Handle)
If .TwainOpenDefaultSource(Me.Handle) Then
.TwainSetHideUI(True)
.TwainSetAutoFeed(True)
.TwainSetAutoScan(True)
.TwainSetPixelType(TwainPixelType.TWPT_BW)
.TwainSetBitDepth(1)
AlterTimeArraysToTimesheetLayout()
Do
scannedImage = .TwainAcquireToGdPictureImage(Me.Handle)
If scannedImage <> 0 Then
.AutoDeskew(scannedImage)
.Crop(scannedImage, 70, 300, 2370, 2860)
.RotateAngle(scannedImage, CSng(0 - .Barcode1DReaderGetBarcodeSkewAngle(1)))
AnalyzeTimesheet(scannedImage)
End If
Dim file As String = pdfLocation & tsName & ".pdf"
.SaveAsPDF(scannedImage, file, True, tsName, "ScanTool.Net OCR Component", tsName, "PDF OCR", "ScanTool.Net OCR Component")
timesheets = TimesheetManager.GetAllScannedTimesheets()
LoadDatesIntoComboBox()
Loop While .TwainGetState > TwainStatus.TWAIN_SOURCE_ENABLED
'OCRComponentGdViewer.Focus()
End If
.TwainCloseSource()
timesheets = TimesheetManager.GetAllScannedTimesheets()
LoadDatesIntoComboBox()
End With
Code: Select all
.ConverTo1Bpp()
Code: Select all
.RotateAngle(scannedImage, CSng(0 - .Barcode1DReaderGetBarcodeSkewAngle(1)))
Code: Select all
Can not find GdPicture.NET.pdf.gdpdfplug.dll. Please, copy last version of this dll into your application directory at: C:\Users\Ben\Documents\Xenon54\3.Source\X54\ScanTool.NET\ScanTool.NET\bin\Debug
Code: Select all
Dim timesheetPdf As Integer = pictureImaging.PdfReaderLoadFromFile(pdfLocation & "TS" & name & "-" & d & "-" & page & ".pdf")
Users browsing this forum: No registered users and 1 guest