public class PdfDocument extends Document
Modifier and Type | Field and Description |
---|---|
static String |
DB_DEFAULT_NAME
Name of the default SQLite database file for PDF documents.
|
private File |
file
Source PDF file.
|
Constructor and Description |
---|
PdfDocument(File file)
Creates a PDF document.
|
PdfDocument(File file,
File db)
Creates a PDF document.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getDbName()
Return the name of the PDF file.
|
protected String |
getDefaultFileName()
Return the name of the PDF source file, without the extension.
|
void |
merge(File output)
Merge the scribbles with the original PDF in a new PDF file.
|
exportToPNG, exportToPNG, exportToPNG, format, getDocument, getScribbleMgr, merge, merge, merge
public static final String DB_DEFAULT_NAME
private File file
public PdfDocument(File file)
file
- the PDF fileIllegalArgumentException
- if file
does not represent a filepublic PdfDocument(File file, File db)
file
- PDF filedb
- database fileIllegalArgumentException
- if file
does not represent a fileprotected String getDbName()
getDbName
in class Document
ScribbleMgr
protected String getDefaultFileName()
getDefaultFileName
in class Document
public void merge(File output)
ColorMgr
class. If a
value of true
is found in the config parameter strictMerge
, in the output there will be only the pages with scribbles.merge
in class Document
output
- the output file/path; if it is a folder, the output file
will be written in a file inside the folder named as "getDefaultFileName()
__NOTED.pdf"; if it is null
, the default value
will be usedIllegalArgumentException
- if the output file is the same as the PDF
or database file© 2013 andynaz - http://andynaz.altervista.org