com.qoppa.pdfNotes
Interface IPDFSaver
- All Known Implementing Classes:
- HTTPSaver, PDFEditorBean, PDFNotesBean
public interface IPDFSaver
This interface is used to save the modified PDF documents. The interface is provided so that
the host application can override the standard saving behaviour with a customized saver. To
override the default saver, the host application can call PDFNotesBean.setPDFSaver
with an object that implements IPDFSaver.
- Author:
- Qoppa Software
save
boolean save(PDFNotesBean notesBean,
String docName,
File pdfFile)
- This method is called by
PDFNotesBean when the document needs to be
saved. It's default implementation, by PDFNotesBean, saves the document to a file.
- Parameters:
notesBean - A reference to the PDFNotesBean object that holds the document. This object
has save methods to save the document to an OutputStream and to a file name. For further flexibility,
the PDFNotesBean also has a method to get the contents of the PDF document as a byte array.docName - The name of the PDF document. The meaning of this name differs
according to how the document was opened.
- If the document was opened from a file, the document name is the name of the file.
- If the document was opened from a URL, the document name is name of the url page.
- If the document was opened from an InputStream, the document name is set to "untitled" @see PDFNotesBean#UNTITLED.
pdfFile - If the document was opened from a file, this is a reference to the
File object. This parameter is null if the document was opened from a URL or from an
InputStream
- Returns:
- The method should return true if the document was saved successfully, false o.w.