Examples of DocumentException


Examples of ag.ion.bion.officelayer.document.DocumentException

          message = Messages
              .getString(
                  "PersistenceService.error_io_message", String.valueOf(((ErrorCodeIOException) throwable).ErrCode)); //$NON-NLS-1$
      } else if (message == null || message.length() == 0)
        message = ERROR_MESSAGE;
      throw new DocumentException(message, throwable);
    }
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.document.DocumentException

    } else if (value instanceof InputStream) {
      bytes = IO.toByteArray((InputStream) value);
    }

    if (bytes == null) {
      throw new DocumentException("Invalid PDF source type");
    }

    PdfReader reader = new PdfReader(bytes);
    return reader;
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.office.DocumentException

        default:
          break;
      }

      if (type == -1) {
        throw new DocumentException("Unsupported image type " + imageType);
      }

      short row = (short) image.getRow();
      short column = (short) image.getColumn();
      //int width = Math.abs(image.getWidth());
View Full Code Here

Examples of com.imaginea.mongodb.exceptions.DocumentException

        String response = new ResponseTemplate().execute(logger, connectionId, request, new ResponseCallback() {
            public Object execute() throws Exception {
                GridFSService gridFSService = new GridFSServiceImpl(connectionId);
                String result = null;
                if ("".equals(_id)) {
                    ApplicationException e = new DocumentException(ErrorCodes.DOCUMENT_DOES_NOT_EXIST, "File Data Missing in Request Body");
                    result = formErrorResponse(logger, e);
                } else {
                    result = gridFSService.deleteFile(dbName, bucketName, _id);
                }
                return result;
View Full Code Here

Examples of com.itextpdf.text.DocumentException

        else if (isCJKFont)
            fontBuilt = new CJKFont(name, encoding, embedded);
        else if (noThrow)
            return null;
        else
            throw new DocumentException(MessageLocalization.getComposedMessage("font.1.with.2.is.not.recognized", name, encoding));
        if (cached) {
            synchronized (fontCache) {
                fontFound = fontCache.get(key);
                if (fontFound != null)
                    return fontFound;
View Full Code Here

Examples of com.lowagie.text.DocumentException

        if (this.writer == null) {
            this.writer = writer;
            annotationsImp = new PdfAnnotationsImp(writer);
            return;
        }
        throw new DocumentException("You can only add a writer to a PdfDocument once.");
    }
View Full Code Here

Examples of com.lowagie.text.DocumentException

            }
            lastElementType = element.type();
            return true;
        }
        catch(Exception e) {
            throw new DocumentException(e);
        }
    }
View Full Code Here

Examples of com.lowagie.text.DocumentException

         if (!(actionType.equals(DOCUMENT_CLOSE) ||
         actionType.equals(WILL_SAVE) ||
         actionType.equals(DID_SAVE) ||
         actionType.equals(WILL_PRINT) ||
         actionType.equals(DID_PRINT))) {
             throw new DocumentException("Invalid additional action type: " + actionType.toString());
         }
         pdf.addAdditionalAction(actionType, action);
     }
View Full Code Here

Examples of com.lowagie.text.DocumentException

    }
   
    /** @see com.lowagie.text.pdf.interfaces.PdfEncryptionSettings#setEncryption(byte[], byte[], int, int) */
    public void setEncryption(byte userPassword[], byte ownerPassword[], int permissions, int encryptionType) throws DocumentException {
        if (pdf.isOpen())
            throw new DocumentException("Encryption can only be added before opening the document.");
        crypto = new PdfEncryption();
        crypto.setCryptoMode(encryptionType, 0);
        crypto.setupAllKeys(userPassword, ownerPassword, permissions);
    }
View Full Code Here

Examples of com.lowagie.text.DocumentException

    }
   
    /** @see com.lowagie.text.pdf.interfaces.PdfEncryptionSettings#setEncryption(java.security.cert.Certificate[], int[], int) */
    public void setEncryption(Certificate[] certs, int[] permissions, int encryptionType) throws DocumentException {
        if (pdf.isOpen())
            throw new DocumentException("Encryption can only be added before opening the document.");
        crypto = new PdfEncryption();
        if (certs != null) {
            for (int i=0; i < certs.length; i++) {
                crypto.addRecipient(certs[i], permissions[i]);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.