Class PdfGenerator
- java.lang.Object
-
- com.netgrif.application.engine.pdf.generator.service.PdfGenerator
-
- All Implemented Interfaces:
IPdfGenerator
@Service public class PdfGenerator extends java.lang.Object implements IPdfGenerator
Generates PDF from the given transition form
-
-
Constructor Summary
Constructors Constructor Description PdfGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustomField(PdfField field, PdfResource pdfResource)protected voiddrawTransitionForm(java.util.List<PdfField> pdfFields)voidgenerateData(PdfField pdfField, PdfResource pdfResource)voidgenerateData(PetriNet petriNet, Case useCase, Transition transition, PdfResource pdfResource)voidgenerateData(PetriNet petriNet, Case useCase, Transition transition, PdfResource pdfResource, java.util.List<java.lang.String> excludedFields)java.io.FilegeneratePdf(PdfResource pdfResource)voidgeneratePdf(Case formCase, Transition transition, PdfResource pdfResource, java.io.OutputStream stream)java.io.FilegeneratePdf(Case formCase, java.lang.String transitionId, PdfResource pdfResource)voidgeneratePdf(Case formCase, java.lang.String transitionId, PdfResource pdfResource, java.io.OutputStream stream)java.io.FilegeneratePdf(Case formCase, java.lang.String transitionId, PdfResource pdfResource, java.util.List<java.lang.String> excludedFields)protected org.apache.pdfbox.pdmodel.graphics.form.PDFormXObjectgetSvg(org.springframework.core.io.Resource resource)voidsetupPdfGenerator(PdfResource pdfResource)voidsetupPdfGenerator(PdfResource pdfResource, float version)protected java.io.FiletransformRequestToPdf(java.util.List<PdfField> pdfFields, PdfResource pdfResource)protected voidtransformRequestToPdf(java.util.List<PdfField> pdfFields, PdfResource pdfResource, java.io.OutputStream stream)
-
-
-
Method Detail
-
setupPdfGenerator
public void setupPdfGenerator(PdfResource pdfResource) throws java.io.IOException
- Specified by:
setupPdfGeneratorin interfaceIPdfGenerator- Throws:
java.io.IOException
-
setupPdfGenerator
public void setupPdfGenerator(PdfResource pdfResource, float version) throws java.io.IOException
- Specified by:
setupPdfGeneratorin interfaceIPdfGenerator- Throws:
java.io.IOException
-
addCustomField
public void addCustomField(PdfField field, PdfResource pdfResource)
- Specified by:
addCustomFieldin interfaceIPdfGenerator
-
generatePdf
public java.io.File generatePdf(Case formCase, java.lang.String transitionId, PdfResource pdfResource, java.util.List<java.lang.String> excludedFields)
- Specified by:
generatePdfin interfaceIPdfGenerator
-
generatePdf
public java.io.File generatePdf(Case formCase, java.lang.String transitionId, PdfResource pdfResource)
- Specified by:
generatePdfin interfaceIPdfGenerator
-
generatePdf
public java.io.File generatePdf(PdfResource pdfResource)
- Specified by:
generatePdfin interfaceIPdfGenerator
-
generatePdf
public void generatePdf(Case formCase, java.lang.String transitionId, PdfResource pdfResource, java.io.OutputStream stream)
- Specified by:
generatePdfin interfaceIPdfGenerator
-
generatePdf
public void generatePdf(Case formCase, Transition transition, PdfResource pdfResource, java.io.OutputStream stream)
- Specified by:
generatePdfin interfaceIPdfGenerator
-
generateData
public void generateData(PetriNet petriNet, Case useCase, Transition transition, PdfResource pdfResource, java.util.List<java.lang.String> excludedFields)
- Specified by:
generateDatain interfaceIPdfGenerator
-
generateData
public void generateData(PetriNet petriNet, Case useCase, Transition transition, PdfResource pdfResource)
- Specified by:
generateDatain interfaceIPdfGenerator
-
generateData
public void generateData(PdfField pdfField, PdfResource pdfResource)
- Specified by:
generateDatain interfaceIPdfGenerator
-
transformRequestToPdf
protected java.io.File transformRequestToPdf(java.util.List<PdfField> pdfFields, PdfResource pdfResource) throws java.io.IOException
- Throws:
java.io.IOException
-
transformRequestToPdf
protected void transformRequestToPdf(java.util.List<PdfField> pdfFields, PdfResource pdfResource, java.io.OutputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
drawTransitionForm
protected void drawTransitionForm(java.util.List<PdfField> pdfFields) throws java.io.IOException
- Throws:
java.io.IOException
-
getSvg
protected org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject getSvg(org.springframework.core.io.Resource resource) throws java.io.IOException- Throws:
java.io.IOException
-
-