Package ch.swissqr.paymentslip
Class PaymentSlipPDF
- java.lang.Object
-
- ch.swissqr.pdf.DocumentBase
-
- ch.swissqr.paymentslip.PaymentSlipPDF
-
public class PaymentSlipPDF extends DocumentBase
Payment Slip DPF document- Author:
- pschatzmann
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPaymentSlipPDF.Format
-
Field Summary
Fields Modifier and Type Field Description static floatPOINT_TO_MMConstantPOINT_TO_MM=0.352778f
-
Constructor Summary
Constructors Constructor Description PaymentSlipPDF()Constructor for PaymentSlipPDF.PaymentSlipPDF(ContentBarcodeCH content, String requestedLangauge)Constructor for creating an unformatted payment slip with just prints the relevant content w/o left margin and cut off line printingPaymentSlipPDF(ContentBarcodeCH content, String requestedLangauge, PaymentSlipPDF.Format format, boolean printLines, boolean printReceipt)Default constructorPaymentSlipPDF(org.apache.pdfbox.pdmodel.PDDocument document)Constructor for existing PDDocument
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.pdfbox.pdmodel.PDDocumentcreatePDFDocument()createPDFDocument.List<String>getAccountInfo(ContentBarcodeCH content)getAccountInfo.floatgetCutoffLimit()Getter for the fieldcutoffLimit.floatgetCutoffLimitButtom()Getter for the fieldcutoffLimitButtom.floatgetCutoffLimitInformation()Getter for the fieldcutoffLimitInformation.floatgetCutoffLimitReceipt()Getter for the fieldcutoffLimitReceipt.org.apache.pdfbox.pdmodel.PDPageContentStreamgetPDPageContentStream()getPDPageContentStream.booleanisAutoClose()isAutoClose.booleanisPrintReceipt()isPrintReceipt.org.apache.pdfbox.pdmodel.PDPageContentStreamprint(ContentBarcodeCH content, String requestedLangauge, PaymentSlipPDF.Format format, boolean printLines, boolean printReceipt)Prints the payment slipvoidsetAutoClose(boolean autoClose)Setter for the fieldautoClose.voidsetCutoffLimit(float cutoffLimit)Setter for the fieldcutoffLimit.voidsetCutoffLimitButtom(float cutoffLimitButton)Setter for the fieldcutoffLimitButtom.voidsetCutoffLimitInformation(float cutoffLimitInformation)Setter for the fieldcutoffLimitInformation.voidsetCutoffLimitReceipt(float cutoffLimitReceipt)Setter for the fieldcutoffLimitReceipt.voidsetPrintReceipt(boolean printReceipt)Setter for the fieldprintReceipt.-
Methods inherited from class ch.swissqr.pdf.DocumentBase
addPDF, close, getBarcodeContent, getBarcodeStrings, getBytes, getDocument, getErrors, getImages, getSwissBarcodeContent, getText, getTextContent, save, setDocument, write, write
-
-
-
-
Field Detail
-
POINT_TO_MM
public static final float POINT_TO_MM
ConstantPOINT_TO_MM=0.352778f- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PaymentSlipPDF
public PaymentSlipPDF()
Constructor for PaymentSlipPDF.
-
PaymentSlipPDF
public PaymentSlipPDF(ContentBarcodeCH content, String requestedLangauge, PaymentSlipPDF.Format format, boolean printLines, boolean printReceipt) throws BarcodeException, IOException
Default constructor- Parameters:
content- aContentBarcodeCHobjectrequestedLangauge- aStringobjectformat- aPaymentSlipPDF.FormatobjectprintLines- a booleanprintReceipt- a boolean- Throws:
BarcodeExceptionIOException
-
PaymentSlipPDF
public PaymentSlipPDF(ContentBarcodeCH content, String requestedLangauge) throws BarcodeException, IOException
Constructor for creating an unformatted payment slip with just prints the relevant content w/o left margin and cut off line printing- Parameters:
content- aContentBarcodeCHobjectrequestedLangauge- aStringobject- Throws:
BarcodeExceptionIOException
-
PaymentSlipPDF
public PaymentSlipPDF(org.apache.pdfbox.pdmodel.PDDocument document) throws BarcodeExceptionConstructor for existing PDDocument- Parameters:
document- aPDDocumentobject- Throws:
BarcodeException
-
-
Method Detail
-
print
public org.apache.pdfbox.pdmodel.PDPageContentStream print(ContentBarcodeCH content, String requestedLangauge, PaymentSlipPDF.Format format, boolean printLines, boolean printReceipt) throws BarcodeException, IOException
Prints the payment slip- Parameters:
content- aContentBarcodeCHobjectrequestedLangauge- aStringobjectformat- aPaymentSlipPDF.FormatobjectprintLines- a booleanprintReceipt- a boolean- Returns:
- a
PDPageContentStreamobject - Throws:
BarcodeExceptionIOException
-
createPDFDocument
public org.apache.pdfbox.pdmodel.PDDocument createPDFDocument() throws BarcodeException, IOExceptioncreatePDFDocument.
- Returns:
- a
PDDocumentobject - Throws:
BarcodeException- if any.IOException- if any.
-
getAccountInfo
public List<String> getAccountInfo(ContentBarcodeCH content)
getAccountInfo.
- Parameters:
content- aContentBarcodeCHobject- Returns:
- a
Listobject
-
getPDPageContentStream
public org.apache.pdfbox.pdmodel.PDPageContentStream getPDPageContentStream()
getPDPageContentStream.
- Returns:
- a
PDPageContentStreamobject
-
isAutoClose
public boolean isAutoClose()
isAutoClose.
- Returns:
- a boolean
-
setAutoClose
public void setAutoClose(boolean autoClose)
Setter for the field
autoClose.- Parameters:
autoClose- a boolean
-
isPrintReceipt
public boolean isPrintReceipt()
isPrintReceipt.
- Returns:
- a boolean
-
setPrintReceipt
public void setPrintReceipt(boolean printReceipt)
Setter for the field
printReceipt.- Parameters:
printReceipt- a boolean
-
getCutoffLimit
public float getCutoffLimit()
Getter for the field
cutoffLimit.- Returns:
- a float
-
setCutoffLimit
public void setCutoffLimit(float cutoffLimit)
Setter for the field
cutoffLimit.- Parameters:
cutoffLimit- a float
-
getCutoffLimitInformation
public float getCutoffLimitInformation()
Getter for the field
cutoffLimitInformation.- Returns:
- a float
-
setCutoffLimitInformation
public void setCutoffLimitInformation(float cutoffLimitInformation)
Setter for the field
cutoffLimitInformation.- Parameters:
cutoffLimitInformation- a float
-
getCutoffLimitButtom
public float getCutoffLimitButtom()
Getter for the field
cutoffLimitButtom.- Returns:
- a float
-
setCutoffLimitButtom
public void setCutoffLimitButtom(float cutoffLimitButton)
Setter for the field
cutoffLimitButtom.- Parameters:
cutoffLimitButton- a float
-
getCutoffLimitReceipt
public float getCutoffLimitReceipt()
Getter for the field
cutoffLimitReceipt.- Returns:
- a float
-
setCutoffLimitReceipt
public void setCutoffLimitReceipt(float cutoffLimitReceipt)
Setter for the field
cutoffLimitReceipt.- Parameters:
cutoffLimitReceipt- a float
-
-