Package com.shaft.tools.io
Class PdfFileManager
java.lang.Object
com.shaft.tools.io.PdfFileManager
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPdfFileManager(String pdfFilePath) PdfFileManager(String folderName, String fileName, int numberOfRetries) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringreadFileContent(String relativeFilePath, boolean... deleteFileAfterReading) Read PDF file content given relative path and optionally delete the file after reading itreadPDFContentFromDownloadedPDF(int startPageNumber, int endPageNumber, PdfFileManager.DeleteFileAfterValidationStatus deleteFileAfterValidationStatus) readPDFContentFromDownloadedPDF(PdfFileManager.DeleteFileAfterValidationStatus deleteFileAfterValidationStatus)
-
Constructor Details
-
PdfFileManager
-
PdfFileManager
-
-
Method Details
-
readFileContent
Read PDF file content given relative path and optionally delete the file after reading it- Parameters:
relativeFilePath- relative path to the PDF filedeleteFileAfterReading- optional boolean to delete the file after reading it or not, default is to leave the file as is- Returns:
- a string value representing the entire content of the pdf file
-
readFileContent
-
readPDFContentFromDownloadedPDF
public String readPDFContentFromDownloadedPDF(int startPageNumber, int endPageNumber, PdfFileManager.DeleteFileAfterValidationStatus deleteFileAfterValidationStatus) - Parameters:
startPageNumber- the starting page for the document to be validatedendPageNumber- the ending page for the document to be validateddeleteFileAfterValidationStatus- the status of deleting the file after get the document text- Returns:
- returns the pdf content in string so that can be validated
-
readPDFContentFromDownloadedPDF
public String readPDFContentFromDownloadedPDF(PdfFileManager.DeleteFileAfterValidationStatus deleteFileAfterValidationStatus)
-