Class PdfDrawer
- java.lang.Object
-
- com.netgrif.application.engine.pdf.generator.service.PdfDrawer
-
- All Implemented Interfaces:
IPdfDrawer
@Service public class PdfDrawer extends java.lang.Object implements IPdfDrawer
A drawer service that is able to draw elements to a content stream
-
-
Constructor Summary
Constructors Constructor Description PdfDrawer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckBooleanValue(java.util.List<java.lang.String> values, java.lang.String text)voidcheckOpenPages()voidcloseContentStream()voidcloseTemplate()voiddrawBooleanBox(java.util.List<java.lang.String> values, java.lang.String text, int x, int y)voiddrawBooleanField(PdfField field)voiddrawDataGroupField(PdfField field)voiddrawEnumerationField(PdfField field)voiddrawI18nDividerField(PdfField field)voiddrawLine(int x, int y, int fieldPosY, int width, int lineCounter, float strokeWidth, java.awt.Color color)voiddrawMultiChoiceField(PdfField field)voiddrawPageNumber()booleandrawSelectionButton(java.util.List<java.lang.String> values, java.lang.String choice, int x, int y, FieldType fieldType)voiddrawStroke(int x, int y, int fieldPosY, int width, int lineCounter, float strokeWidth)protected voiddrawSvg(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject resourceObject, int x, int y)voiddrawTextField(PdfField field)voiddrawTitleField(PdfField field)voidnewPage()voidsetupDrawer(org.apache.pdfbox.pdmodel.PDDocument pdf, PdfResource pdfResource)voidwriteLabel(org.apache.pdfbox.pdmodel.font.PDType0Font font, int fontSize, int x, int y, java.lang.String text, java.awt.Color color)voidwriteString(org.apache.pdfbox.pdmodel.font.PDType0Font font, int fontSize, int x, int y, java.lang.String text, java.awt.Color color)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.netgrif.application.engine.pdf.generator.service.interfaces.IPdfDrawer
setTemplatePdf
-
-
-
-
Method Detail
-
setupDrawer
public void setupDrawer(org.apache.pdfbox.pdmodel.PDDocument pdf, PdfResource pdfResource)- Specified by:
setupDrawerin interfaceIPdfDrawer
-
closeContentStream
public void closeContentStream() throws java.io.IOException- Specified by:
closeContentStreamin interfaceIPdfDrawer- Throws:
java.io.IOException
-
closeTemplate
public void closeTemplate() throws java.io.IOException- Specified by:
closeTemplatein interfaceIPdfDrawer- Throws:
java.io.IOException
-
newPage
public void newPage() throws java.io.IOException- Specified by:
newPagein interfaceIPdfDrawer- Throws:
java.io.IOException
-
checkOpenPages
public void checkOpenPages() throws java.io.IOException- Specified by:
checkOpenPagesin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawPageNumber
public void drawPageNumber() throws java.io.IOException- Specified by:
drawPageNumberin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawTitleField
public void drawTitleField(PdfField field) throws java.io.IOException
- Specified by:
drawTitleFieldin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawDataGroupField
public void drawDataGroupField(PdfField field) throws java.io.IOException
- Specified by:
drawDataGroupFieldin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawTextField
public void drawTextField(PdfField field) throws java.io.IOException
- Specified by:
drawTextFieldin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawI18nDividerField
public void drawI18nDividerField(PdfField field) throws java.io.IOException
- Specified by:
drawI18nDividerFieldin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawBooleanField
public void drawBooleanField(PdfField field) throws java.io.IOException
- Specified by:
drawBooleanFieldin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawEnumerationField
public void drawEnumerationField(PdfField field) throws java.io.IOException
- Specified by:
drawEnumerationFieldin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawMultiChoiceField
public void drawMultiChoiceField(PdfField field) throws java.io.IOException
- Specified by:
drawMultiChoiceFieldin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawBooleanBox
public void drawBooleanBox(java.util.List<java.lang.String> values, java.lang.String text, int x, int y) throws java.io.IOException- Specified by:
drawBooleanBoxin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawSelectionButton
public boolean drawSelectionButton(java.util.List<java.lang.String> values, java.lang.String choice, int x, int y, FieldType fieldType) throws java.io.IOException- Specified by:
drawSelectionButtonin interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawStroke
public void drawStroke(int x, int y, int fieldPosY, int width, int lineCounter, float strokeWidth) throws java.io.IOException- Specified by:
drawStrokein interfaceIPdfDrawer- Throws:
java.io.IOException
-
drawLine
public void drawLine(int x, int y, int fieldPosY, int width, int lineCounter, float strokeWidth, java.awt.Color color) throws java.io.IOException- Specified by:
drawLinein interfaceIPdfDrawer- Throws:
java.io.IOException
-
writeString
public void writeString(org.apache.pdfbox.pdmodel.font.PDType0Font font, int fontSize, int x, int y, java.lang.String text, java.awt.Color color) throws java.io.IOException- Specified by:
writeStringin interfaceIPdfDrawer- Throws:
java.io.IOException
-
writeLabel
public void writeLabel(org.apache.pdfbox.pdmodel.font.PDType0Font font, int fontSize, int x, int y, java.lang.String text, java.awt.Color color) throws java.io.IOException- Specified by:
writeLabelin interfaceIPdfDrawer- Throws:
java.io.IOException
-
checkBooleanValue
protected boolean checkBooleanValue(java.util.List<java.lang.String> values, java.lang.String text)
-
drawSvg
protected void drawSvg(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject resourceObject, int x, int y) throws java.io.IOException- Throws:
java.io.IOException
-
-