Interface PdfGenerator
-
- All Implemented Interfaces:
public interface PdfGenerator
Provides methods for PDF generation.
-
-
Method Summary
Modifier and Type Method Description abstract File
generateFromUris(Array<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig)
Generate PDF from given images uris abstract Boolean
generateFromUris(Array<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig)
Generate PDF from given images uris abstract File
generateFromPages(Array<Page> pages, PdfConfiguration pdfConfig)
Generate PDF from given array of Page objects abstract Boolean
generateFromPages(Array<Page> pages, File outputFile, PdfConfiguration pdfConfig)
Generate PDF from given array of Page objects abstract Boolean
generateFromDocument(Document document, PdfConfiguration pdfConfig)
Generate PDF from given Document abstract Boolean
generateFromDocument(Document document, File outputFile, PdfConfiguration pdfConfig)
Generate PDF from given Document abstract File
generateWithOcrFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages. abstract File
generateWithOcrFromUris(List<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages. abstract File
generateWithOcrFromPages(List<Page> pages, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. abstract Boolean
generateWithOcrFromPages(List<Page> pages, File outputFile, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. abstract Boolean
generateWithOcrFromDocument(Document document, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. abstract Boolean
generateWithOcrFromDocument(Document document, File outputFile, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. abstract File
generateWithOcrPagesFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given image file URIs and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. abstract File
generateWithOcrPagesFromUris(List<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given image file URIs and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. abstract File
generateWithOcrPagesFromPages(List<Page> pages, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given Page objects and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. abstract Boolean
generateWithOcrPagesFromPages(List<Page> pages, File outputFile, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given Page objects and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. abstract Boolean
generateWithOcrPagesFromDocument(Document document, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given Document and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. abstract Boolean
generateWithOcrPagesFromDocument(Document document, File outputFile, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given Document and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. -
-
Method Detail
-
generateFromUris
abstract File generateFromUris(Array<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig)
Generate PDF from given images uris
- Parameters:
imageFileUris
- array of source images urissourceFilesEncrypted
- should be true if source files are encrypted with Scanbot SDK encryption mechanism, otherwise - falsepdfConfig
- extra PDF configuration
-
generateFromUris
abstract Boolean generateFromUris(Array<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig)
Generate PDF from given images uris
- Parameters:
imageFileUris
- array of source images urisoutputFile
- target PDF filesourceFilesEncrypted
- should be true if source files are encrypted with Scanbot SDK encryption mechanism, otherwise - falsepdfConfig
- extra PDF configuration
-
generateFromPages
@Deprecated(message = "Use generateFromDocument() instead") abstract File generateFromPages(Array<Page> pages, PdfConfiguration pdfConfig)
Generate PDF from given array of Page objects
- Parameters:
pages
- array of source pagespdfConfig
- extra PDF configuration
-
generateFromPages
@Deprecated(message = "Use generateFromDocument() instead") abstract Boolean generateFromPages(Array<Page> pages, File outputFile, PdfConfiguration pdfConfig)
Generate PDF from given array of Page objects
- Parameters:
pages
- array of source pagesoutputFile
- target PDF filepdfConfig
- extra PDF configuration
-
generateFromDocument
abstract Boolean generateFromDocument(Document document, PdfConfiguration pdfConfig)
Generate PDF from given Document
- Parameters:
document
- source documentpdfConfig
- extra PDF configuration
-
generateFromDocument
abstract Boolean generateFromDocument(Document document, File outputFile, PdfConfiguration pdfConfig)
Generate PDF from given Document
- Parameters:
document
- source documentoutputFile
- target PDF filepdfConfig
- extra PDF configuration
-
generateWithOcrFromUris
abstract File generateWithOcrFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages.
- Parameters:
imageFileUris
- list of image file URIssourceFilesEncrypted
- if true, the image files are encrypted and will be decrypted before OCRpdfConfig
- the PDF configurationocrConfig
- the OCR configuration
-
generateWithOcrFromUris
abstract File generateWithOcrFromUris(List<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages.
- Parameters:
imageFileUris
- list of image file URIsoutputFile
- the output PDF filesourceFilesEncrypted
- if true, the image files are encrypted and will be decrypted before OCRpdfConfig
- the PDF configurationocrConfig
- the OCR configuration
-
generateWithOcrFromPages
@Deprecated(message = "Use generateWithOcrFromDocument() instead") abstract File generateWithOcrFromPages(List<Page> pages, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Use the document image from a Page.) with provided languages.
- Parameters:
pages
- list of Page objects.pdfConfig
- the PDF configurationocrConfig
- the OCR configuration
-
generateWithOcrFromPages
@Deprecated(message = "Use generateWithOcrFromDocument() instead") abstract Boolean generateWithOcrFromPages(List<Page> pages, File outputFile, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Use the document image from a Page.) with provided languages.
- Parameters:
pages
- list of Page objects.outputFile
- the output PDF filepdfConfig
- the PDF configurationocrConfig
- the OCR configuration
-
generateWithOcrFromDocument
abstract Boolean generateWithOcrFromDocument(Document document, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. Use the document image from a io.scanbot.sdk.docprocessing.Page.) with provided languages.
- Parameters:
document
- the document to perform OCR on and create a PDF from.pdfConfig
- the PDF configuration.ocrConfig
- the OCR configuration.
-
generateWithOcrFromDocument
abstract Boolean generateWithOcrFromDocument(Document document, File outputFile, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. Use the document image from a io.scanbot.sdk.docprocessing.Page.) with provided languages.
- Parameters:
document
- the document to perform OCR on and create a PDF from.outputFile
- the output PDF filepdfConfig
- the PDF configuration.ocrConfig
- the OCR configuration.
-
generateWithOcrPagesFromUris
abstract File generateWithOcrPagesFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given image file URIs and provided source list of io.scanbot.sdk.ocr.model.Page OCR data.
- Parameters:
imageFileUris
- list of image file URIssourceFilesEncrypted
- if true, the image files are encrypted and will be decrypted before OCRpdfConfig
- the PDF configurationsourceOcrPages
- the source list of io.scanbot.sdk.ocr.model.Page OCR data.
-
generateWithOcrPagesFromUris
abstract File generateWithOcrPagesFromUris(List<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given image file URIs and provided source list of io.scanbot.sdk.ocr.model.Page OCR data.
- Parameters:
imageFileUris
- list of image file URIsoutputFile
- the output PDF filesourceFilesEncrypted
- if true, the image files are encrypted and will be decrypted before OCRpdfConfig
- the PDF configurationsourceOcrPages
- the source list of io.scanbot.sdk.ocr.model.Page OCR data
-
generateWithOcrPagesFromPages
@Deprecated(message = "Use generateWithOcrPagesFromDocument() instead") abstract File generateWithOcrPagesFromPages(List<Page> pages, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given Page objects and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. Use the document image from a Page. with provided languages.
- Parameters:
pages
- list of Page objects.pdfConfig
- the PDF configuration.sourceOcrPages
- the source list of io.scanbot.sdk.ocr.model.Page OCR data.
-
generateWithOcrPagesFromPages
@Deprecated(message = "Use generateWithOcrPagesFromDocument() instead") abstract Boolean generateWithOcrPagesFromPages(List<Page> pages, File outputFile, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given Page objects and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. Use the document image from a Page. with provided languages.
- Parameters:
pages
- list of Page objects.outputFile
- the output PDF filepdfConfig
- the PDF configurationsourceOcrPages
- the source list of io.scanbot.sdk.ocr.model.Page OCR data.
-
generateWithOcrPagesFromDocument
abstract Boolean generateWithOcrPagesFromDocument(Document document, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given Document and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. Use the document image from a io.scanbot.sdk.docprocessing.Page. with provided languages.
- Parameters:
document
- the document to perform OCR on and create a PDF from.pdfConfig
- the PDF configuration.sourceOcrPages
- the source list of io.scanbot.sdk.ocr.model.Page OCR data.
-
generateWithOcrPagesFromDocument
abstract Boolean generateWithOcrPagesFromDocument(Document document, File outputFile, PdfConfiguration pdfConfig, List<Page> sourceOcrPages)
Creates sandwiched OCR PDF file from given Document and provided source list of io.scanbot.sdk.ocr.model.Page OCR data. Use the document image from a io.scanbot.sdk.docprocessing.Page. with provided languages.
- Parameters:
document
- the document to perform OCR on and create a PDF from.outputFile
- the output PDF filepdfConfig
- the PDF configuration.sourceOcrPages
- the source list of io.scanbot.sdk.ocr.model.Page OCR data.
-
-
-
-