iRex DR1000 Manager v0.5.3

it.andynaz.irex.dr1000.document
Class PdfDocument

java.lang.Object
  extended by it.andynaz.irex.dr1000.document.Document
      extended by it.andynaz.irex.dr1000.document.PdfDocument

public class PdfDocument
extends Document

Represent a DR1000 PDF file. An object of that kind is associated with a path to a PDF file.

Version:
2013/11/06
Author:
andynaz

Field Summary
static String DB_DEFAULT_NAME
          Name of the default SQLite database file for PDF documents.
private  File file
          Source PDF file.
 
Fields inherited from class it.andynaz.irex.dr1000.document.Document
db
 
Constructor Summary
PdfDocument(File file)
          Creates a PDF document.
PdfDocument(File file, File db)
          Creates a PDF document.
 
Method Summary
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.
 
Methods inherited from class it.andynaz.irex.dr1000.document.Document
exportToPNG, exportToPNG, exportToPNG, format, getDocument, getScribbleMgr, merge, merge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DB_DEFAULT_NAME

public static final String DB_DEFAULT_NAME
Name of the default SQLite database file for PDF documents.

See Also:
Constant Field Values

file

private File file
Source PDF file.

Constructor Detail

PdfDocument

public PdfDocument(File file)
Creates a PDF document.

Parameters:
file - the PDF file
Throws:
IllegalArgumentException - if file does not represent a file

PdfDocument

public PdfDocument(File file,
                   File db)
Creates a PDF document.

Parameters:
file - PDF file
db - database file
Throws:
IllegalArgumentException - if file does not represent a file
Method Detail

getDbName

protected String getDbName()
Return the name of the PDF file.

Specified by:
getDbName in class Document
Returns:
the name of the PDF file
See Also:
ScribbleMgr

getDefaultFileName

protected String getDefaultFileName()
Return the name of the PDF source file, without the extension.

Specified by:
getDefaultFileName in class Document
Returns:
the name of the PDF source file, without the extension

merge

public void merge(File output)
Merge the scribbles with the original PDF in a new PDF file. The color for the strokes is taken from the 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.

Specified by:
merge in class Document
Parameters:
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 used
Throws:
IllegalArgumentException - if the output file is the same as the PDF or database file

iRex DR1000 Manager v0.5.3

© 2013 andynaz - http://andynaz.altervista.org