Package net.sf.jsignpdf.types

Examples of net.sf.jsignpdf.types.FloatPoint


      if (buffImg != null) {
        final RelRect tmpRect = selectionImage.getRelRect();
        previewListenerDisabled = true;
        try {
          tmpRect.scale(getInt(pdfPageSize.getX()), getInt(pdfPageSize.getY()));
          tmpRect.setStartPoint(new FloatPoint(Float.parseFloat(tfPosLLX.getText()) / pdfPageSize.getX(), 1f
              - Float.parseFloat(tfPosLLY.getText()) / pdfPageSize.getY()));
          tmpRect.setEndPoint(new FloatPoint(Float.parseFloat(tfPosURX.getText()) / pdfPageSize.getX(), 1f
              - Float.parseFloat(tfPosURY.getText()) / pdfPageSize.getY()));
        } catch (Exception e) {
          // TODO
        }
        selectionImage.setImage(buffImg);
View Full Code Here


   * @param aPage
   *            number of page for which size should be returned
   * @return FloatPoint or null
   */
  public FloatPoint getPageSize(int aPage) {
    FloatPoint tmpResult = null;
    PdfReader reader = null;
    try {
      try {
        // try to read without password
        reader = new PdfReader(options.getInFile());
      } catch (Exception e) {
        try {
          reader = new PdfReader(options.getInFile(), new byte[0]);
        } catch (Exception e2) {
          reader = new PdfReader(options.getInFile(), options.getPdfOwnerPwdStr().getBytes());
        }
      }
      final Rectangle tmpRect = reader.getPageSize(aPage);
      if (tmpRect != null) {
        tmpResult = new FloatPoint(tmpRect.getRight(), tmpRect.getTop());
      }
    } catch (Exception e) {
      // nothing to do
    } finally {
      if (reader != null) {
View Full Code Here

TOP

Related Classes of net.sf.jsignpdf.types.FloatPoint

Copyright © 2018 www.massapicom. 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.