Package digilib.pdf
Class PDFStreamWorker
- java.lang.Object
-
- digilib.pdf.PDFStreamWorker
-
- All Implemented Interfaces:
Callable<OutputStream>
public class PDFStreamWorker extends Object implements Callable<OutputStream>
Worker that creates a PDF document in an OutputStream.
-
-
Field Summary
Fields Modifier and Type Field Description protected DigilibConfiguration
dlConfig
protected com.itextpdf.layout.Document
doc
protected DigilibJobCenter<DocuImage>
imageJobCenter
protected PDFRequest
job_info
protected static org.slf4j.Logger
logger
protected OutputStream
outstream
-
Constructor Summary
Constructors Constructor Description PDFStreamWorker(DigilibConfiguration dlConfig, OutputStream outputfile, PDFRequest job_info, DigilibJobCenter<DocuImage> imageJobCenter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.itextpdf.layout.Document
addImage(com.itextpdf.layout.Document doc, ImageJobDescription iji)
adds an image to the document.OutputStream
call()
protected OutputStream
renderPDF()
-
-
-
Field Detail
-
logger
protected static org.slf4j.Logger logger
-
dlConfig
protected DigilibConfiguration dlConfig
-
doc
protected com.itextpdf.layout.Document doc
-
outstream
protected OutputStream outstream
-
job_info
protected PDFRequest job_info
-
imageJobCenter
protected DigilibJobCenter<DocuImage> imageJobCenter
-
-
Constructor Detail
-
PDFStreamWorker
public PDFStreamWorker(DigilibConfiguration dlConfig, OutputStream outputfile, PDFRequest job_info, DigilibJobCenter<DocuImage> imageJobCenter)
- Parameters:
dlConfig
-outputfile
-job_info
-
-
-
Method Detail
-
call
public OutputStream call() throws Exception
- Specified by:
call
in interfaceCallable<OutputStream>
- Throws:
Exception
-
renderPDF
protected OutputStream renderPDF() throws InterruptedException, ExecutionException, IOException, ImageOpException
- Throws:
DocumentException
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:
- Throws:
InterruptedException
ExecutionException
IOException
DocumentException
-
-