/** * Read the image stream of the signature and set height and width. * * @param stream stream of your visible signature image * @throws IOException If we can't read, flush, or close stream of image */ private void readImageStream(InputStream stream) throws IOException { ImageIO.setUseCache(false); setImage(ImageIO.read(stream)); }
/** * Constructor. * * @param document Already created PDDocument of your PDF document. * @param image * @param page The 1-based page number for which the page size should be calculated. */ public PDVisibleSignDesigner(PDDocument document, BufferedImage image, int page) { setImage(image); calculatePageSize(document, page); }
/** * Constructor. * * @param filename Path of the PDF file * @param image * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(String filename, BufferedImage image, int page) throws IOException { // set visible signature image setImage(image); // calculate height and width of document page calculatePageSizeFromFile(filename, page); }
/** * Constructor. * * @param documentStream Original PDF document as stream * @param image * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(InputStream documentStream, BufferedImage image, int page) throws IOException { // set visible signature image setImage(image); // calculate height and width of document page calculatePageSizeFromStream(documentStream, page); }
/** * Constructor. * * @param document Already created PDDocument of your PDF document. * @param image * @param page The 1-based page number for which the page size should be calculated. */ public PDVisibleSignDesigner(PDDocument document, BufferedImage image, int page) { setImage(image); calculatePageSize(document, page); }
/** * Read the image stream of the signature and set height and width. * * @param stream stream of your visible signature image * @throws IOException If we can't read, flush, or close stream of image */ private void readImageStream(InputStream stream) throws IOException { ImageIO.setUseCache(false); setImage(ImageIO.read(stream)); }
/** * Constructor. * * @param document Already created PDDocument of your PDF document. * @param image * @param page The 1-based page number for which the page size should be calculated. */ public PDVisibleSignDesigner(PDDocument document, BufferedImage image, int page) { setImage(image); calculatePageSize(document, page); }
/** * Read the image stream of the signature and set height and width. * * @param stream stream of your visible signature image * @throws IOException If we can't read, flush, or close stream of image */ private void readImageStream(InputStream stream) throws IOException { ImageIO.setUseCache(false); setImage(ImageIO.read(stream)); }
/** * Constructor. * * @param filename Path of the PDF file * @param image * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(String filename, BufferedImage image, int page) throws IOException { // set visible signature image setImage(image); // calculate height and width of document page calculatePageSizeFromFile(filename, page); }
/** * Constructor. * * @param documentStream Original PDF document as stream * @param image * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(InputStream documentStream, BufferedImage image, int page) throws IOException { // set visible signature image setImage(image); // calculate height and width of document page calculatePageSizeFromStream(documentStream, page); }
/** * Constructor. * * @param filename Path of the PDF file * @param image * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(String filename, BufferedImage image, int page) throws IOException { // set visible signature image setImage(image); // calculate height and width of document page calculatePageSizeFromFile(filename, page); }
/** * Constructor. * * @param documentStream Original PDF document as stream * @param image * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(InputStream documentStream, BufferedImage image, int page) throws IOException { // set visible signature image setImage(image); // calculate height and width of document page calculatePageSizeFromStream(documentStream, page); }