Class OCRJob
- java.lang.Object
-
- com.adobe.pdfservices.operation.PDFServicesJob
-
- com.adobe.pdfservices.operation.pdfjobs.jobs.OCRJob
-
public class OCRJob extends PDFServicesJob
A job that convert a PDF file into a searchable PDF file. Allows specifying locale(OCRSupportedLocale
) and OCR Type (OCRSupportedType
) for performing OCR (Optical Character Recognition)Sample Usage:
InputStream inputStream = new FileInputStream(new File("SOURCE_PATH")); Credentials credentials = new ServicePrincipalCredentials( System.getenv("PDF_SERVICES_CLIENT_ID"), System.getenv("PDF_SERVICES_CLIENT_SECRET")); PDFServices pdfServices = new PDFServices(credentials); Asset asset = pdfServices.upload(inputStream, PDFServicesMediaType.PDF.getMediaType()); OCRJob ocrJob = new OCRJob(asset); String location = pdfServices.submit(ocrJOB); PDFServicesResponse<OCRResult> pdfServicesResponse = pdfServices.getJobResult(location, OCRResult.class); Asset resultAsset = pdfServicesResponse.getResult().getAsset(); StreamAsset StreamAsset = pdfServices.getContent(linearizeAssetResult);
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OCRJob
setOutput(Asset asset)
Sets the output asset for the job.OCRJob
setParams(OCRParams ocrParams)
Set params for the job.
-