com.lowagie.text.Rectangle.getRotation()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(65)

本文整理了Java中com.lowagie.text.Rectangle.getRotation方法的一些代码示例,展示了Rectangle.getRotation的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rectangle.getRotation方法的具体详情如下:
包路径:com.lowagie.text.Rectangle
类名称:Rectangle
方法名:getRotation

Rectangle.getRotation介绍

[英]Gets the rotation of the rectangle
[中]获取矩形的旋转

代码示例

代码示例来源:origin: com.github.librepdf/openpdf

/** Convenience method to set the field rotation the same as the
 * page rotation.
 * @param page the page
 */
public void setRotationFromPage(Rectangle page) {
  setRotation(page.getRotation());
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

/** Convenience method to set the field rotation the same as the
 * page rotation.
 * @param page the page
 */    
public void setRotationFromPage(Rectangle page) {
  setRotation(page.getRotation());
}

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

/** Convenience method to set the field rotation the same as the
 * page rotation.
 * @param page the page
 */    
public void setRotationFromPage(Rectangle page) {
  setRotation(page.getRotation());
}

代码示例来源:origin: stackoverflow.com

public static void show(Rectangle rect) {
  System.out.print("llx: ");
  System.out.print(rect.getLeft());
  System.out.print(", lly: ");
  System.out.print(rect.getBottom());
  System.out.print(", urx: ");
  System.out.print(rect.getRight());
  System.out.print(", lly: ");
  System.out.print(rect.getTop());
  System.out.print(", rotation: ");
  System.out.println(rect.getRotation());
}

代码示例来源:origin: com.github.librepdf/openpdf

int rotation = page.getRotation();
switch (rotation) {
  case 90:

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

int rotation = page.getRotation();
switch (rotation) {
  case 90:

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

int rotation = page.getRotation();
switch (rotation) {
  case 90:

代码示例来源:origin: com.github.librepdf/openpdf

int rotation = pageSize.getRotation();
      thisBoxSize.put("trim", thisBoxSize.get("crop"));
    else
      thisBoxSize.put("trim", new PdfRectangle(pageSize, pageSize.getRotation()));

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

void applyRotation(PdfDictionary pageN, ByteBuffer out) {
  if (!this.rotateContents)
    return;
  Rectangle page = this.reader.getPageSizeWithRotation(pageN);
  int rotation = page.getRotation();
  switch (rotation) {
    case 90:
      out.append(PdfContents.ROTATE90);
      out.append(page.getTop());
      out.append(' ').append('0').append(PdfContents.ROTATEFINAL);
      break;
    case 180:
      out.append(PdfContents.ROTATE180);
      out.append(page.getRight());
      out.append(' ');
      out.append(page.getTop());
      out.append(PdfContents.ROTATEFINAL);
      break;
    case 270:
      out.append(PdfContents.ROTATE270);
      out.append('0').append(' ');
      out.append(page.getRight());
      out.append(PdfContents.ROTATEFINAL);
      break;
  }
}

代码示例来源:origin: com.github.librepdf/openpdf

void applyRotation(PdfDictionary pageN, ByteBuffer out) {
  if (!rotateContents)
    return;
  Rectangle page = reader.getPageSizeWithRotation(pageN);
  int rotation = page.getRotation();
  switch (rotation) {
    case 90:
      out.append(PdfContents.ROTATE90);
      out.append(page.getTop());
      out.append(' ').append('0').append(PdfContents.ROTATEFINAL);
      break;
    case 180:
      out.append(PdfContents.ROTATE180);
      out.append(page.getRight());
      out.append(' ');
      out.append(page.getTop());
      out.append(PdfContents.ROTATEFINAL);
      break;
    case 270:
      out.append(PdfContents.ROTATE270);
      out.append('0').append(' ');
      out.append(page.getRight());
      out.append(PdfContents.ROTATEFINAL);
      break;
  }
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

void applyRotation(PdfDictionary pageN, ByteBuffer out) {
  if (!cstp.rotateContents)
    return;
  Rectangle page = reader.getPageSizeWithRotation(pageN);
  int rotation = page.getRotation();
  switch (rotation) {
    case 90:
      out.append(PdfContents.ROTATE90);
      out.append(page.getTop());
      out.append(' ').append('0').append(PdfContents.ROTATEFINAL);
      break;
    case 180:
      out.append(PdfContents.ROTATE180);
      out.append(page.getRight());
      out.append(' ');
      out.append(page.getTop());
      out.append(PdfContents.ROTATEFINAL);
      break;
    case 270:
      out.append(PdfContents.ROTATE270);
      out.append('0').append(' ');
      out.append(page.getRight());
      out.append(PdfContents.ROTATEFINAL);
      break;
  }
}

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

void applyRotation(PdfDictionary pageN, ByteBuffer out) {
  if (!cstp.rotateContents)
    return;
  Rectangle page = reader.getPageSizeWithRotation(pageN);
  int rotation = page.getRotation();
  switch (rotation) {
    case 90:
      out.append(PdfContents.ROTATE90);
      out.append(page.getTop());
      out.append(' ').append('0').append(PdfContents.ROTATEFINAL);
      break;
    case 180:
      out.append(PdfContents.ROTATE180);
      out.append(page.getRight());
      out.append(' ');
      out.append(page.getTop());
      out.append(PdfContents.ROTATEFINAL);
      break;
    case 270:
      out.append(PdfContents.ROTATE270);
      out.append('0').append(' ');
      out.append(page.getRight());
      out.append(PdfContents.ROTATEFINAL);
      break;
  }
}

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

void applyRotation(PdfDictionary pageN, ByteBuffer out) {
  if (!rotateContents)
    return;
  Rectangle page = reader.getPageSizeWithRotation(pageN);
  int rotation = page.getRotation();
  switch (rotation) {
    case 90:
      out.append(PdfContents.ROTATE90);
      out.append(page.getTop());
      out.append(' ').append('0').append(PdfContents.ROTATEFINAL);
      break;
    case 180:
      out.append(PdfContents.ROTATE180);
      out.append(page.getRight());
      out.append(' ');
      out.append(page.getTop());
      out.append(PdfContents.ROTATEFINAL);
      break;
    case 270:
      out.append(PdfContents.ROTATE270);
      out.append('0').append(' ');
      out.append(page.getRight());
      out.append(PdfContents.ROTATEFINAL);
      break;
  }
}

代码示例来源:origin: com.github.librepdf/openpdf

void applyRotation(PdfDictionary pageN, ByteBuffer out) {
 if (!cstp.rotateContents) {
  return;
 }
 Rectangle page = reader.getPageSizeWithRotation(pageN);
 int rotation = page.getRotation();
 switch (rotation) {
  case 90:
   out.append(PdfContents.ROTATE90);
   out.append(page.getTop());
   out.append(' ').append('0').append(PdfContents.ROTATEFINAL);
   break;
  case 180:
   out.append(PdfContents.ROTATE180);
   out.append(page.getRight());
   out.append(' ');
   out.append(page.getTop());
   out.append(PdfContents.ROTATEFINAL);
   break;
  case 270:
   out.append(PdfContents.ROTATE270);
   out.append('0').append(' ');
   out.append(page.getRight());
   out.append(PdfContents.ROTATEFINAL);
   break;
 }
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

public PdfArray rotateAnnotations(PdfWriter writer, Rectangle pageSize) {
  PdfArray array = new PdfArray();
  int rotation = pageSize.getRotation() % 360;
  int currentPage = writer.getCurrentPageNumber();
  for (int k = 0; k < annotations.size(); ++k) {

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

public PdfArray rotateAnnotations(PdfWriter writer, Rectangle pageSize) {
  PdfArray array = new PdfArray();
  int rotation = pageSize.getRotation() % 360;
  int currentPage = writer.getCurrentPageNumber();
  for (int k = 0; k < annotations.size(); ++k) {

代码示例来源:origin: com.github.librepdf/openpdf

public PdfArray rotateAnnotations(PdfWriter writer, Rectangle pageSize) {
  PdfArray array = new PdfArray();
  int rotation = pageSize.getRotation() % 360;
  int currentPage = writer.getCurrentPageNumber();
  for (int k = 0; k < annotations.size(); ++k) {

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

void insertPage(int pageNumber, Rectangle mediabox) {
  Rectangle media = new Rectangle(mediabox);
  int rotation = media.getRotation() % 360;
  PdfDictionary page = new PdfDictionary(PdfName.PAGE);
  PdfDictionary resources = new PdfDictionary();

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

void insertPage(int pageNumber, Rectangle mediabox) {
  Rectangle media = new Rectangle(mediabox);
  int rotation = media.getRotation() % 360;
  PdfDictionary page = new PdfDictionary(PdfName.PAGE);
  PdfDictionary resources = new PdfDictionary();

代码示例来源:origin: com.github.librepdf/openpdf

void insertPage(int pageNumber, Rectangle mediabox) {
  Rectangle media = new Rectangle(mediabox);
  int rotation = media.getRotation() % 360;
  PdfDictionary page = new PdfDictionary(PdfName.PAGE);
  PdfDictionary resources = new PdfDictionary();

相关文章

微信公众号

最新文章

更多