public abstract class AbstractWordProcessing
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
dataFolder |
Constructor and Description |
---|
AbstractWordProcessing()
Creates word processing driver.
|
AbstractWordProcessing(java.lang.String inputFileName,
java.lang.String logFileName)
Creates word processing driver.
|
Modifier and Type | Method and Description |
---|---|
void |
beginWorkingWithTable()
Starts working with table 1.
|
void |
beginWorkingWithTable(int index)
Starts working with table to be specified.
|
void |
changeDocumentDirectory(java.lang.String documentDirectory)
Sets the document directory for future document saving.
|
void |
closeDocument()
Closes the active document.
|
protected void |
closeWordInput() |
void |
createNewDocumentFromTemplate(java.lang.String templateName)
Creates a new document based on the desired template.
|
void |
endWorkingWithTable()
Starts working with table.
|
void |
exec()
Starts the execution of the above instructions without waiting for end of process.
|
void |
exec(boolean waitForExecution)
Starts the execution of the above instructions.
|
void |
executeMacro(java.lang.String macroName)
Executes an arbitrary WordBasic macro.
|
void |
exportDocumentAsPdf(java.lang.String documentName)
Exports the active document using the indicated name.
|
void |
exportDocumentAsPdfAndClose(java.lang.String documentName)
Exports the active document using the indicated name and closes it.
|
protected void |
finalize() |
protected abstract java.lang.String |
getDriverExecutableName() |
void |
newRow()
Tells WordAPI to place bookmark text into a new table row.
|
protected void |
output(java.lang.String key,
java.lang.String value) |
void |
printAndForget()
Prints the document on the standard printer and closes the document without saving.
|
void |
printAndForget(int copies) |
void |
printAndForget(java.lang.String printerName)
Prints the document on the specified printer and closes the document without saving.
|
void |
quitApplication()
Quits the word processing application.
|
void |
quitApplicationAfterWaiting(int milliseconds)
Quits the word processing application after a pause.
|
void |
saveDocumentAs(java.lang.String documentName)
Saves the active document using the indicated name
(usually without extension).
|
void |
saveDocumentAsAndClose(java.lang.String documentName)
Saves the active document using the indicated name and closes it.
|
void |
setNoteNotMatchingBookmarks(boolean noteNotMatchingBookmarks)
Set the warning flag about not matching bookmarks
Decides whether the user shall be informed that the template didn't
include certain bookmarks.
|
void |
setPrinterName(java.lang.String printerName) |
void |
typeTextAtBookmark(java.lang.String bookmark,
java.lang.String textToType)
Goes to the specified bookmark and types the desired text.
|
void |
typeTextAtBookmark(java.lang.String bookmark,
java.lang.String[] linesToType)
Goes to the specified bookmark and types the desired text with line feed.
|
public AbstractWordProcessing() throws java.io.IOException
java.io.IOException
public AbstractWordProcessing(java.lang.String inputFileName, java.lang.String logFileName) throws java.io.IOException
inputFileName
- the name of the input file to be used by the driverlogFileName
- the name of the log file to be used by the driverjava.io.IOException
public void createNewDocumentFromTemplate(java.lang.String templateName)
templateName
- the name of the template to be usedpublic void setNoteNotMatchingBookmarks(boolean noteNotMatchingBookmarks)
noteNotMatchingBookmarks
- whether the user should be warnedpublic void beginWorkingWithTable()
newRow()
from the second row on.newRow()
,
endWorkingWithTable()
public void beginWorkingWithTable(int index)
newRow()
from the second row on.index
- the index of the table to work with, beginning with 1newRow()
,
endWorkingWithTable()
public void newRow()
public void endWorkingWithTable()
public void typeTextAtBookmark(java.lang.String bookmark, java.lang.String textToType)
bookmark
- the bookmark where text type startstextToType
- the text to be includedpublic void typeTextAtBookmark(java.lang.String bookmark, java.lang.String[] linesToType)
bookmark
- the bookmark where text type startslinesToType
- the lines to be includedpublic void changeDocumentDirectory(java.lang.String documentDirectory)
documentDirectory
- the name of the directorypublic void saveDocumentAs(java.lang.String documentName)
documentName
- the name of the documentpublic void saveDocumentAsAndClose(java.lang.String documentName)
documentName
- the name of the documentpublic void exportDocumentAsPdf(java.lang.String documentName)
documentName
- the name of the documentpublic void exportDocumentAsPdfAndClose(java.lang.String documentName)
documentName
- the name of the documentpublic void closeDocument()
public void setPrinterName(java.lang.String printerName)
public void printAndForget()
public void printAndForget(java.lang.String printerName)
printerName
- the name of the desired printerpublic void printAndForget(int copies)
public void executeMacro(java.lang.String macroName)
macroName
- the name of the macro to be executedpublic void quitApplication()
public void quitApplicationAfterWaiting(int milliseconds)
milliseconds
- waiting time in milliseconds prior leaving applicationprotected void output(java.lang.String key, java.lang.String value)
protected void closeWordInput()
public void exec()
public void exec(boolean waitForExecution)
waitForExecution
- whether or not the application should wait until process is finishedprotected abstract java.lang.String getDriverExecutableName()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de