* @throws DocumentException on error
*/
public void addWriter(PdfWriter writer) throws DocumentException {
if (this.writer == null) {
this.writer = writer;
annotationsImp = new PdfAnnotationsImp(writer);
return;
}
throw new DocumentException(MessageLocalization.getComposedMessage("you.can.only.add.a.writer.to.a.pdfdocument.once"));
}