public class OptionsPDF
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
PDFConvertServer
Modifier and Type | Field and Description |
---|---|
static int |
LOG_HTML |
static int |
LOG_HTML_BYTES |
static int |
LOG_NONE |
static int |
LOG_TXT |
static int |
PDF_BAL |
static int |
PDF_PL |
static int |
PDF_STATEMENT |
static int |
PDF_TAX |
static int |
TRANS_BYTES |
static int |
TRANS_CSV |
static int |
TRANS_JSON |
static int |
TRANS_POJO |
Constructor and Description |
---|
OptionsPDF()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAccountnumber()
Get the current account number
|
int |
getAccountSeq()
Get the account sequence number
|
java.lang.String |
getBankID()
Get the current bankid
|
boolean |
getCombineLines()
Get the combine lines flag
|
boolean |
getCreateMap()
Return the value previously set for createMap
|
int |
getDocType() |
boolean |
getDoOCR() |
java.lang.String |
getLanguage() |
java.io.File |
getLogPath()
Get the current log path value
|
int |
getLogType()
return the log type
|
int |
getMonthSeq()
Get the month sequence number
|
boolean |
getNeedAlphas() |
boolean |
getNosepdates()
Get the option for whether dates must have a separator.
|
int |
getOutputType()
Return the value of the output type
|
ConverterSetProgress |
getProgressUpdate()
Get the progress update methods
|
int |
getStatementSeq()
Get the statement sequence number
|
java.lang.String |
getTrackingID() |
void |
setAccountNumber(java.lang.String accountnumber)
Set an account number to search for in the statement, used if the statement has multiple accounts
|
void |
setAccountSeq(int accountSequenceNnumber)
Set which account to process if there are multiple accounts in a single statement
|
void |
setAccountType(java.lang.String accountType)
Set the account type to be processed.
|
void |
setBankID(java.lang.String bankid)
Set the bankid to use when created OFX, QFX, QBO files
|
void |
setCallBack(ConverterCallback callback)
Set callback method for when OCR processing is complete
|
void |
setCombineLines(boolean combineLines)
Set option to combine description lines
|
void |
setCreateMap(boolean createMap)
Set option to create a .map file with page number and position of each transaction
|
void |
setDocType(int doctype)
Set the document type.
|
boolean |
setDoOCR(boolean doOCR)
Set the option for whether OCR should always be run, even if the PDF appears to be text based.
|
boolean |
setDoOCRnr(boolean doOCR)
Set option for always running OCR if the statement did not reconcile with text processing.
|
void |
setEndAccount(java.lang.String endAccount) |
void |
setFid(java.lang.String fid)
Set the Intuit FID, used by Quicken and QuickBooks in QBO and QFX files
|
void |
setFirstpage(int firstpage)
Set the first page in the PDF which should be processed.
|
void |
setFixedColumns(boolean fixedColumns)
Set option for how columns are defined in a csv file
|
void |
setLanguage(java.lang.String language)
Set the language of the statement to process
|
void |
setLastpage(int lastpage)
Set the last page in the PDF which should be processed.
|
void |
setLogPath(java.io.File logPath)
Set the path for the log file.
|
void |
setLogType(int logType)
Set the type of the log file
|
void |
setMonthSeq(int monthSequenceNnumber)
Set which statement to process if there are multiple (i.e.
|
boolean |
setNeedAlphas(boolean needalphas) |
boolean |
setNosepdates(boolean nosepdates)
Set the option for whether dates must have a separator.
|
void |
setOnecurrencycol(boolean onecurrencycol) |
void |
setOutputType(int outputType)
Set the method for returning transactions
|
void |
setPagewidth(java.lang.Float pagewidth) |
void |
setPassword(java.lang.String password)
Set the password required to read a password protected PDF
|
void |
setProgressupdate(BKProgressUpdate progressupdate)
Deprecated.
- use setProgressUpdate instead
|
void |
setProgressUpdate(ConverterSetProgress progressupdate)
Set method to receive updates as the OCR processing proceeds
|
void |
setReadUSDates(boolean readUSDates)
Set the format for reading dates
|
void |
setRunOCRThread(boolean runOCRThread)
Flag for running OCR in a separate thread.
|
void |
setSpacing(java.lang.Float spacing) |
void |
setStartAccount(java.lang.String startAccount) |
void |
setStatementSeq(int statementSequenceNnumber)
Deprecated.
- use setMonthSeq instead
|
void |
setTrackingID(java.lang.String trackingid)
Set an optional tracking ID on the conversion.
|
void |
setWriteUSDates(boolean writeUSDates)
Set the format for writing dates to csv files
|
void |
setYear(int year) |
public static final int LOG_NONE
public static final int LOG_TXT
public static final int LOG_HTML
public static final int LOG_HTML_BYTES
public static final int TRANS_CSV
public static final int TRANS_POJO
public static final int TRANS_BYTES
public static final int TRANS_JSON
public static final int PDF_STATEMENT
public static final int PDF_TAX
public static final int PDF_PL
public static final int PDF_BAL
public void setAccountType(java.lang.String accountType)
accountType
- the account type, valid types are Bank, Invst, or CCardpublic void setReadUSDates(boolean readUSDates)
readUSDates
- whether date formats are in US format (true) or EU format (false)public void setWriteUSDates(boolean writeUSDates)
writeUSDates
- whether output csv date formats are in US format (true) or EU format (false)public void setStartAccount(java.lang.String startAccount)
startAccount
- regex that defines the start of the account to process, useful if multiple accountspublic void setEndAccount(java.lang.String endAccount)
endAccount
- regex that defines the end of the account to process, useful if multiple accountspublic void setSpacing(java.lang.Float spacing)
spacing
- spacing factor for text that is very spread out or compressed.
Default is 1.0, useful values range from .5 for closely packed text to 5.0 for text with lots of spacepublic void setPagewidth(java.lang.Float pagewidth)
pagewidth
- override pagewidth from what is specified in the PDF file.
Some PDF files have extraneous text outside the supposedly visible limits.public void setYear(int year)
year
- override for the base year of the statementpublic boolean setNeedAlphas(boolean needalphas)
needalphas
- set to false if transaction descriptions can just be an (account) number with no letterspublic boolean getNeedAlphas()
public boolean setNosepdates(boolean nosepdates)
nosepdates
- set if dates have no separator,public boolean getNosepdates()
public void setOnecurrencycol(boolean onecurrencycol)
onecurrencycol
- Set if the statement should be considered as having a single currency column.
Currently only needed for PNC Bank statements that use different columns for different kinds of debits.public boolean setDoOCR(boolean doOCR)
doOCR
- - true if should always run OCR.public boolean getDoOCR()
public boolean setDoOCRnr(boolean doOCR)
doOCRnr
- - true if should always run OCR if the statement did not reconcile.public void setFirstpage(int firstpage)
firstpage
- the first page number to process, the first page is 1public void setLastpage(int lastpage)
lastpage
- the last page number to processpublic void setDocType(int doctype)
doctype
- the document type. Options are PDF_STATEMENT, PDF_TAX. Default value is PDF_STATEMENTpublic int getDocType()
public void setFixedColumns(boolean fixedColumns)
fixedColumns
- true to output a fixed column layout rather than the columns layout from the statement, false to take column from PDF statement.
The fixed column layout is Date, Payee, Amount, Memo, Check Number, Transaction Type.public void setTrackingID(java.lang.String trackingid)
trackingid
- the trackingid to set.
The use of this field is optional. If present it may be used to track the conversion request.
It is also returned as part of the conversion results.public java.lang.String getTrackingID()
public void setPassword(java.lang.String password)
password
- the password to setpublic void setCreateMap(boolean createMap)
createMap
- value of flagpublic boolean getCreateMap()
public int getOutputType()
public void setOutputType(int outputType)
outputType
- the method for returning transactions. TRANS_CSV to create a .csv file, TRANS_POJO to create a list of Java Transaction objects in ConverterResults.
Default value is TRANS_CSVpublic void setLogType(int logType)
logType
- the type of log file to create. LOG_NONE for no log, LOG_TXT for a readable text log, LOG_HTML for an html formatted log;public int getLogType()
public void setLogPath(java.io.File logPath)
logPath
- the full file spec for creating the log file. If blank, the input pdf path/file will be used with an appropriate extensionpublic java.io.File getLogPath()
public void setAccountNumber(java.lang.String accountnumber)
accountnumber
- to search for.public java.lang.String getAccountnumber()
public void setRunOCRThread(boolean runOCRThread)
runOCRThread
- set to true if OCR processing should be done on a separate thread.
When this is set calls to PDFConvertServer.convert will return as soon as OCR processing is started.
Use SetCallBack to set a call back when the OCR processing is complete. Also see setProgressUpdatepublic void setCallBack(ConverterCallback callback)
callback
- The callback Method that is called when OCR processing has completed on another threadpublic void setProgressupdate(BKProgressUpdate progressupdate)
public void setProgressUpdate(ConverterSetProgress progressupdate)
-
- a method that implements the ConverterSetProgress interface to handle progress callbackspublic ConverterSetProgress getProgressUpdate()
public void setBankID(java.lang.String bankid)
bankid
- - For OFX, QFX, QBO files, the bankid to set in the filepublic java.lang.String getBankID()
public void setFid(java.lang.String fid)
fid
- For QBO or QFX format, the fid to set in the filepublic void setAccountSeq(int accountSequenceNnumber)
accountSequenceNnumber
- - the account sequence number to search for. 1 is the first etc. 0 is to ignore multiple accounts and process all transactions.
Setting the sequence number to -1 will process all accounts, but PDFConvertServer.convertMultiple has to be called in order to return multiple accounts.public int getAccountSeq()
public void setStatementSeq(int statementSequenceNnumber)
public void setMonthSeq(int monthSequenceNnumber)
monthSequenceNnumber
- - the month sequence number to search for. 1 for the first, 2 for the second etc.
Setting the sequence number to -1 will process all monthly statements, but PDFConvertServer.convertMultiple has to be called in order to return multiple statements.public int getStatementSeq()
public int getMonthSeq()
public void setLanguage(java.lang.String language)
language
- the language to set - standard ISO language codes such as "en", "fr", "es" "de", "nl", 'il", "pt"public java.lang.String getLanguage()
public void setCombineLines(boolean combineLines)
combineLines
- - true to combine multiple description lines into a single payee, false to consider subsequent lines as the memo fieldpublic boolean getCombineLines()