Class PdfExtractService
java.lang.Object
com.microservice.extractpdf4j.service.PdfExtractService
- Author:
- ronaldopaulino
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractTablesAsCsv(org.springframework.web.multipart.MultipartFile file) Asynchronously extracts tables from a given PDF file.
-
Constructor Details
-
PdfExtractService
public PdfExtractService()
-
-
Method Details
-
extractTablesAsCsv
@Async public CompletableFuture<String> extractTablesAsCsv(org.springframework.web.multipart.MultipartFile file) Asynchronously extracts tables from a given PDF file. This method is executed on a background thread pool managed by Spring.- Parameters:
file- The PDF file uploaded by the user.- Returns:
- A CompletableFuture containing the extracted tables formatted as a single CSV string. The future will complete exceptionally if an error occurs during processing.
-