Package digilib.pdf
Class PDFStreamWorker
java.lang.Object
digilib.pdf.PDFStreamWorker
- All Implemented Interfaces:
Callable<OutputStream>
Worker that creates a PDF document in an OutputStream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DigilibConfiguration
protected com.itextpdf.layout.Document
protected DigilibJobCenter
<DocuImage> protected PDFRequest
protected static org.slf4j.Logger
protected OutputStream
-
Constructor Summary
ConstructorsConstructorDescriptionPDFStreamWorker
(DigilibConfiguration dlConfig, OutputStream outputfile, PDFRequest job_info, DigilibJobCenter<DocuImage> imageJobCenter) -
Method Summary
Modifier and TypeMethodDescriptioncom.itextpdf.layout.Document
addImage
(com.itextpdf.layout.Document doc, ImageJobDescription iji) adds an image to the document.call()
protected OutputStream
-
Field Details
-
logger
protected static org.slf4j.Logger logger -
dlConfig
-
doc
protected com.itextpdf.layout.Document doc -
outstream
-
job_info
-
imageJobCenter
-
-
Constructor Details
-
PDFStreamWorker
public PDFStreamWorker(DigilibConfiguration dlConfig, OutputStream outputfile, PDFRequest job_info, DigilibJobCenter<DocuImage> imageJobCenter) - Parameters:
dlConfig
-outputfile
-job_info
-
-
-
Method Details
-
call
- Specified by:
call
in interfaceCallable<OutputStream>
- Throws:
Exception
-
renderPDF
protected OutputStream renderPDF() throws InterruptedException, ExecutionException, IOException, ImageOpException -
addImage
public com.itextpdf.layout.Document addImage(com.itextpdf.layout.Document doc, ImageJobDescription iji) throws InterruptedException, ExecutionException, IOException adds an image to the document.- Parameters:
doc
-iji
-- Returns:
-