You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > PDF Creation > Building Searchable PDF & PDF/A > PdfOCRStop Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.PdfOCRStop Method

Closes and Saves the PDF file created by the PdfOCRStart() or PdfOCRStartStream() function.

C#
public GdPictureStatus PdfOCRStop(
    int PdfID
);
Visual Basic
Public Function PdfOCRStop(
    ByVal PdfID As Integer
) As GdPictureStatus
Parameters
Parameters 
Description 
PdfID 
A PDF identifier returned by a PdfOCRStart() or PdfOCRStartStream() function.  
Returns

A member of the GdPictureStatus enumeration.

How to scan pages of a document feeder to a multipage searchable PDF file.

Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer
Dim bContinue As Boolean = True
Dim PdfID As Integer
 
oGdPictureImaging.SetLicenseNumber("XXX") 'Replace XXX by a demo or commercial license key
 
 
oGdPictureImaging.TwainOpenDefaultSource(Me.Handle)
oGdPictureImaging.TwainSetAutoFeed(True)
oGdPictureImaging.TwainSetAutoScan(True)
PdfID = oGdPictureImaging.PdfOCRStart("output.pdf", True, "", "", "", "", "")
 
If PdfID <> 0 Then
   While bContinue
         ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(Me.Handle)
         oGdPictureImaging.PdfAddGdPictureImageToPdfOCR(PdfID, ImageID, TesseractDictionary.TesseractDictionaryEnglish, "C:Program FilesGdPicture.NETRedistOCR", "")
         oGdPictureImaging.ReleaseGdPictureImage(ImageID)
         bContinue = (oGdPictureImaging.TwainGetState > TwainStatus.TWAIN_SOURCE_ENABLED)
   End While
   oGdPictureImaging.PdfOCRStop(PdfID)
End If
oGdPictureImaging.TwainCloseSource()
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.