/** * Constructor usable for signing existing signature fields. * * @param imageStream image as a stream * @throws IOException */ public PDVisibleSignDesigner(InputStream imageStream) throws IOException { // set visible signature image Input stream readImageStream(imageStream); }
/** * Set the image for the signature. * * @param path Path of the image file. * @return Visible Signature Configuration Object * @throws IOException */ public PDVisibleSignDesigner signatureImage(String path) throws IOException { try (InputStream in = new BufferedInputStream(new FileInputStream(path))) { readImageStream(in); } return this; }
/** * Constructor. * * @param document Already created PDDocument of your PDF document. * @param imageStream Image as a stream. * @param page The 1-based page number for which the page size should be calculated. * @throws IOException If we can't read, flush, or can't close stream. */ public PDVisibleSignDesigner(PDDocument document, InputStream imageStream, int page) throws IOException { readImageStream(imageStream); calculatePageSize(document, page); }
/** * Constructor. * * @param filename Path of the PDF file * @param imageStream image as a stream * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(String filename, InputStream imageStream, int page) throws IOException { // set visible signature image Input stream readImageStream(imageStream); // calculate height and width of document page calculatePageSizeFromFile(filename, page); }
/** * Constructor. * * @param documentStream Original PDF document as stream * @param imageStream Image as a stream * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(InputStream documentStream, InputStream imageStream, int page) throws IOException { // set visible signature image Input stream readImageStream(imageStream); // calculate height and width of document page calculatePageSizeFromStream(documentStream, page); }
/** * Constructor usable for signing existing signature fields. * * @param imageStream image as a stream * @throws IOException */ public PDVisibleSignDesigner(InputStream imageStream) throws IOException { // set visible signature image Input stream readImageStream(imageStream); }
/** * Constructor usable for signing existing signature fields. * * @param imageStream image as a stream * @throws IOException */ public PDVisibleSignDesigner(InputStream imageStream) throws IOException { // set visible signature image Input stream readImageStream(imageStream); }
/** * Set the image for the signature. * * @param path Path of the image file. * @return Visible Signature Configuration Object * @throws IOException */ public PDVisibleSignDesigner signatureImage(String path) throws IOException { try (InputStream in = new BufferedInputStream(new FileInputStream(path))) { readImageStream(in); } return this; }
/** * Constructor. * * @param document Already created PDDocument of your PDF document. * @param imageStream Image as a stream. * @param page The 1-based page number for which the page size should be calculated. * @throws IOException If we can't read, flush, or can't close stream. */ public PDVisibleSignDesigner(PDDocument document, InputStream imageStream, int page) throws IOException { readImageStream(imageStream); calculatePageSize(document, page); }
/** * Constructor. * * @param document Already created PDDocument of your PDF document. * @param imageStream Image as a stream. * @param page The 1-based page number for which the page size should be calculated. * @throws IOException If we can't read, flush, or can't close stream. */ public PDVisibleSignDesigner(PDDocument document, InputStream imageStream, int page) throws IOException { readImageStream(imageStream); calculatePageSize(document, page); }
/** * Constructor. * * @param documentStream Original PDF document as stream * @param imageStream Image as a stream * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(InputStream documentStream, InputStream imageStream, int page) throws IOException { // set visible signature image Input stream readImageStream(imageStream); // calculate height and width of document page calculatePageSizeFromStream(documentStream, page); }
/** * Constructor. * * @param filename Path of the PDF file * @param imageStream image as a stream * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(String filename, InputStream imageStream, int page) throws IOException { // set visible signature image Input stream readImageStream(imageStream); // calculate height and width of document page calculatePageSizeFromFile(filename, page); }
/** * Constructor. * * @param filename Path of the PDF file * @param imageStream image as a stream * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(String filename, InputStream imageStream, int page) throws IOException { // set visible signature image Input stream readImageStream(imageStream); // calculate height and width of document page calculatePageSizeFromFile(filename, page); }
/** * Constructor. * * @param documentStream Original PDF document as stream * @param imageStream Image as a stream * @param page The 1-based page number for which the page size should be calculated. * @throws IOException */ public PDVisibleSignDesigner(InputStream documentStream, InputStream imageStream, int page) throws IOException { // set visible signature image Input stream readImageStream(imageStream); // calculate height and width of document page calculatePageSizeFromStream(documentStream, page); }
/** * Set the image for the signature. * * @param path Path of the image file. * @return Visible Signature Configuration Object * @throws IOException */ public PDVisibleSignDesigner signatureImage(String path) throws IOException { InputStream in = null; try { in = new BufferedInputStream(new FileInputStream(path)); readImageStream(in); } finally { IOUtils.closeQuietly(in); } return this; }