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 class
PaymentSlipPDF.Format
-
Field Summary
Fields Modifier and Type Field Description static float
POINT_TO_MM
ConstantPOINT_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.PDDocument
createPDFDocument()
createPDFDocument.List<String>
getAccountInfo(ContentBarcodeCH content)
getAccountInfo.float
getCutoffLimit()
Getter for the fieldcutoffLimit
.float
getCutoffLimitButtom()
Getter for the fieldcutoffLimitButtom
.float
getCutoffLimitInformation()
Getter for the fieldcutoffLimitInformation
.float
getCutoffLimitReceipt()
Getter for the fieldcutoffLimitReceipt
.org.apache.pdfbox.pdmodel.PDPageContentStream
getPDPageContentStream()
getPDPageContentStream.boolean
isAutoClose()
isAutoClose.boolean
isPrintReceipt()
isPrintReceipt.org.apache.pdfbox.pdmodel.PDPageContentStream
print(ContentBarcodeCH content, String requestedLangauge, PaymentSlipPDF.Format format, boolean printLines, boolean printReceipt)
Prints the payment slipvoid
setAutoClose(boolean autoClose)
Setter for the fieldautoClose
.void
setCutoffLimit(float cutoffLimit)
Setter for the fieldcutoffLimit
.void
setCutoffLimitButtom(float cutoffLimitButton)
Setter for the fieldcutoffLimitButtom
.void
setCutoffLimitInformation(float cutoffLimitInformation)
Setter for the fieldcutoffLimitInformation
.void
setCutoffLimitReceipt(float cutoffLimitReceipt)
Setter for the fieldcutoffLimitReceipt
.void
setPrintReceipt(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
- aContentBarcodeCH
objectrequestedLangauge
- aString
objectformat
- aPaymentSlipPDF.Format
objectprintLines
- a booleanprintReceipt
- a boolean- Throws:
BarcodeException
IOException
-
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
- aContentBarcodeCH
objectrequestedLangauge
- aString
object- Throws:
BarcodeException
IOException
-
PaymentSlipPDF
public PaymentSlipPDF(org.apache.pdfbox.pdmodel.PDDocument document) throws BarcodeException
Constructor for existing PDDocument- Parameters:
document
- aPDDocument
object- 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
- aContentBarcodeCH
objectrequestedLangauge
- aString
objectformat
- aPaymentSlipPDF.Format
objectprintLines
- a booleanprintReceipt
- a boolean- Returns:
- a
PDPageContentStream
object - Throws:
BarcodeException
IOException
-
createPDFDocument
public org.apache.pdfbox.pdmodel.PDDocument createPDFDocument() throws BarcodeException, IOException
createPDFDocument.
- Returns:
- a
PDDocument
object - Throws:
BarcodeException
- if any.IOException
- if any.
-
getAccountInfo
public List<String> getAccountInfo(ContentBarcodeCH content)
getAccountInfo.
- Parameters:
content
- aContentBarcodeCH
object- Returns:
- a
List
object
-
getPDPageContentStream
public org.apache.pdfbox.pdmodel.PDPageContentStream getPDPageContentStream()
getPDPageContentStream.
- Returns:
- a
PDPageContentStream
object
-
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
-
-