private void calculatePageSizeFromStream(InputStream documentStream, int page) throws IOException { try (PDDocument document = PDDocument.load(documentStream)) { // calculate height and width of document page 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 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); }
private void calculatePageSizeFromFile(String filename, int page) throws IOException { try (PDDocument document = PDDocument.load(new File(filename))) { // calculate height and width of document page calculatePageSize(document, 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); }
private void calculatePageSizeFromStream(InputStream documentStream, int page) throws IOException { try (PDDocument document = PDDocument.load(documentStream)) { // calculate height and width of document page calculatePageSize(document, 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); }
private void calculatePageSizeFromFile(String filename, int page) throws IOException { try (PDDocument document = PDDocument.load(new File(filename))) { // calculate height and width of document page 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 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); }
private void calculatePageSizeFromFile(String filename, int page) throws IOException { // create PD document PDDocument document = PDDocument.load(new File(filename)); // calculate height and width of document page calculatePageSize(document, page); document.close(); }
private void calculatePageSizeFromStream(InputStream documentStream, int page) throws IOException { // create PD document PDDocument document = PDDocument.load(documentStream); // calculate height and width of document page calculatePageSize(document, page); document.close(); }