本文整理了Java中com.lowagie.text.Rectangle.normalize
方法的一些代码示例,展示了Rectangle.normalize
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rectangle.normalize
方法的具体详情如下:
包路径:com.lowagie.text.Rectangle
类名称:Rectangle
方法名:normalize
[英]Normalizes the rectangle. Switches lower left with upper right if necessary.
[中]标准化矩形。如有必要,切换左下和右上。
代码示例来源:origin: com.github.librepdf/openpdf
/** Sets the field dimension and position.
* @param box the field dimension and position
*/
public void setBox(Rectangle box) {
if (box == null) {
this.box = null;
}
else {
this.box = new Rectangle(box);
this.box.normalize();
}
}
代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae
/** Sets the field dimension and position.
* @param box the field dimension and position
*/
public void setBox(Rectangle box) {
if (box == null) {
this.box = null;
}
else {
this.box = new Rectangle(box);
this.box.normalize();
}
}
代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext
/** Sets the field dimension and position.
* @param box the field dimension and position
*/
public void setBox(Rectangle box) {
if (box == null) {
this.box = null;
}
else {
this.box = new Rectangle(box);
this.box.normalize();
}
}
代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext
/**
* Sets the signature to be visible. It creates a new visible signature field.
* @param pageRect the position and dimension of the field in the page
* @param page the page to place the field. The fist page is 1
* @param fieldName the field name or <CODE>null</CODE> to generate automatically a new field name
*/
public void setVisibleSignature(final Rectangle pageRect, final int page, final String fieldName) {
if (fieldName != null) {
if (fieldName.indexOf('.') >= 0) {
throw new IllegalArgumentException("Field names cannot contain a dot."); //$NON-NLS-1$
}
final AcroFields af = this.writer.getAcroFields();
final AcroFields.Item item = af.getFieldItem(fieldName);
if (item != null) {
throw new IllegalArgumentException("The field " + fieldName + " already exists."); //$NON-NLS-1$ //$NON-NLS-2$
}
this.fieldName = fieldName;
}
if (page < 1 || page > this.writer.reader.getNumberOfPages()) {
throw new IllegalArgumentException("Invalid page number: " + page); //$NON-NLS-1$
}
this.pageRect = new Rectangle(pageRect);
this.pageRect.normalize();
this.rect = new Rectangle(this.pageRect.getWidth(), this.pageRect.getHeight());
this.page = page;
this.newField = true;
}
代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae
/**
* Sets the signature to be visible. It creates a new visible signature field.
* @param pageRect the position and dimension of the field in the page
* @param page the page to place the field. The fist page is 1
* @param fieldName the field name or <CODE>null</CODE> to generate automatically a new field name
*/
public void setVisibleSignature(Rectangle pageRect, int page, String fieldName) {
if (fieldName != null) {
if (fieldName.indexOf('.') >= 0)
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("field.names.cannot.contain.a.dot"));
AcroFields af = writer.getAcroFields();
AcroFields.Item item = af.getFieldItem(fieldName);
if (item != null)
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("the.field.1.already.exists", fieldName));
this.fieldName = fieldName;
}
if (page < 1 || page > writer.reader.getNumberOfPages())
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("invalid.page.number.1", page));
this.pageRect = new Rectangle(pageRect);
this.pageRect.normalize();
rect = new Rectangle(this.pageRect.getWidth(), this.pageRect.getHeight());
this.page = page;
newField = true;
}
代码示例来源:origin: com.github.librepdf/openpdf
if (text.length() == 0)
return text;
mediaBox.normalize();
if (cropBox != null) {
cropBox.normalize();
} else {
cropBox = reader.getBoxSize(page, "trim");
if (cropBox != null) {
cropBox.normalize();
} else {
cropBox = mediaBox;
代码示例来源:origin: com.github.librepdf/openpdf
this.pageRect.normalize();
rect = new Rectangle(this.pageRect.getWidth(), this.pageRect.getHeight());
this.page = page;
代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext
final float ury = r.getAsNumber(3).floatValue();
this.pageRect = new Rectangle(llx, lly, urx, ury);
this.pageRect.normalize();
this.page = item.getPage(0).intValue();
final int rotation = this.writer.reader.getPageRotation(this.page);
this.pageRect.normalize();
代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae
float ury = r.getAsNumber(3).floatValue();
pageRect = new Rectangle(llx, lly, urx, ury);
pageRect.normalize();
page = item.getPage(0).intValue();
int rotation = writer.reader.getPageRotation(page);
pageRect.normalize();
rect = new Rectangle(this.pageRect.getWidth(), this.pageRect.getHeight());
代码示例来源:origin: com.github.librepdf/openpdf
float ury = r.getAsNumber(3).floatValue();
pageRect = new Rectangle(llx, lly, urx, ury);
pageRect.normalize();
page = item.getPage(0);
int rotation = writer.reader.getPageRotation(page);
pageRect.normalize();
rect = new Rectangle(this.pageRect.getWidth(), this.pageRect.getHeight());
代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae
break;
r.normalize();
代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext
break;
r.normalize();
代码示例来源:origin: com.github.librepdf/openpdf
break;
r.normalize();
内容来源于网络,如有侵权,请联系作者删除!