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 DigilibConfigurationprotected com.itextpdf.layout.Documentprotected DigilibJobCenter<DocuImage> protected PDFRequestprotected static org.slf4j.Loggerprotected OutputStream -
Constructor Summary
ConstructorsConstructorDescriptionPDFStreamWorker(DigilibConfiguration dlConfig, OutputStream outputfile, PDFRequest job_info, DigilibJobCenter<DocuImage> imageJobCenter) -
Method Summary
Modifier and TypeMethodDescriptioncom.itextpdf.layout.DocumentaddImage(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:
callin 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:
-