pdf/src/main/java/se/idsec/signservice/integration/document/pdf/utils/PDDocumentUtils.java
public static PDDocument load(final byte[] contents) throws DocumentProcessingException {
    try {
      return PDDocument.load(contents);
    }
    catch (IOException e) {
      log.error("Failed to load PDF document", e);
      throw new DocumentProcessingException(new ErrorCode.Code("decode"), "Failed to load PDF object", e);
    }
  }
/**
   * Loads a {@link PDDocument} given its byte contents.
   * <p>
   * The returned object must later be closes (see {@link #close(PDDocument)}).
   * </p>
   * 
   * @param contents
   *          the PDF file contents
   * @return a loaded PDDocument object
   * @throws DocumentProcessingException
   *           for loading errors
   */
Loads a  PDDocument given its byte contents.

The returned object must later be closes ).

@param contents
the PDF file contents
@return a loaded PDDocument object
@throws DocumentProcessingException
for loading errors
Loads a PDDocument given its byte contents . The returned object must later be closes ) . @param contents the PDF file contents @return a loaded PDDocument object @throws DocumentProcessingException for loading errors
public static PDDocument load(final byte[] contents) throws DocumentProcessingException {
    try {
      return PDDocument.load(contents);
    }
    catch (IOException e) {
      log.error("Failed to load PDF document", e);
      throw new DocumentProcessingException(new ErrorCode.Code("decode"), "Failed to load PDF object", e);
    }
  }
public static PDDocument load ( final byte [ ] contents ) throws DocumentProcessingException { try { return PDDocument . load ( contents ) ; } catch ( IOException e ) { log . error ( "Failed to load PDF document" , e ) ; throw new DocumentProcessingException ( new ErrorCode . Code ( "decode" ) , "Failed to load PDF object" , e ) ; } }
Loads a {@link PDDocument} given its byte contents.
Loads a { @link PDDocument } given its byte contents .