aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-08-26 16:06:22 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-08-26 16:06:22 +0200
commit4fbb400c4b608e442be022929910ea26dd7e74a4 (patch)
treec7800d45a5b6f913629d293cb23a7974e3100a7d /pdf-as-lib/src/main/java/at/gv
parent04df577b18d51093df377c9dc602381ff9426e91 (diff)
downloadpdf-as-4-4fbb400c4b608e442be022929910ea26dd7e74a4.tar.gz
pdf-as-4-4fbb400c4b608e442be022929910ea26dd7e74a4.tar.bz2
pdf-as-4-4fbb400c4b608e442be022929910ea26dd7e74a4.zip
Affine Transformation matrix type change
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java7
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureDesigner.java7
2 files changed, 9 insertions, 5 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java
index 3d89d49f..e6ebfe04 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java
@@ -706,12 +706,15 @@ public class PDFAsVisualSignatureBuilder extends PDVisibleSigBuilder {
String holderFormComment = "q " + m00 + " " + m10 + " " + m01 + " "
+ m11 + " " + m02 + " " + m12 + " cm /" + innerFormName
+ " Do Q \n";
+
+ logger.debug("Holder Form Stream: " + holderFormComment);
+
// String innerFormComment = "q 1 0 0 1 0 0 cm /" + imageObjectName +
// " Do Q\n";
String innerFormComment = getStructure().getInnterFormStream()
.getInputStreamAsString();
- // logger.debug("Inner Form Stream: " + innerFormComment);
+ //logger.debug("Inner Form Stream: " + innerFormComment);
// appendRawCommands(getStructure().getInnterFormStream().createOutputStream(),
// getStructure().getInnterFormStream().getInputStreamAsString());
@@ -811,7 +814,7 @@ public class PDFAsVisualSignatureBuilder extends PDVisibleSigBuilder {
logger.debug("rectangle of signature has been created");
}
- public void createAffineTransform(byte[] params) {
+ public void createAffineTransform(float[] params) {
AffineTransform transform = new AffineTransform(params[0], params[1],
params[2], params[3], params[4], params[5]);
// transform.rotate(90);
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureDesigner.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureDesigner.java
index 45789491..17b02d9d 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureDesigner.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureDesigner.java
@@ -50,7 +50,8 @@ public class PDFAsVisualSignatureDesigner {
private InputStream imgageStream;
private String signatureFieldName = "sig"; // default
private float[] formaterRectangleParams = { 0, 0, 100, 50 }; // default
- private byte[] AffineTransformParams = { 1, 0, 0, 1, 0, 0 }; // default
+ //private float[] AffineTransformParams = { 0, 1, -1, 0, 0, 0 }; // default
+ private float[] AffineTransformParams = { 1, 0, 0, 1, 0, 0 }; // default
private float imageSizeInPercents;
private PDDocument document = null;
private int page = 0;
@@ -326,7 +327,7 @@ public class PDFAsVisualSignatureDesigner {
*
* @return Affine Transform parameters of for PDF Matrix
*/
- public byte[] getAffineTransformParams() {
+ public float[] getAffineTransformParams() {
return AffineTransformParams;
}
@@ -336,7 +337,7 @@ public class PDFAsVisualSignatureDesigner {
* @return Visible Signature Configuration Object
*/
public PDFAsVisualSignatureDesigner affineTransformParams(
- byte[] affineTransformParams) {
+ float[] affineTransformParams) {
AffineTransformParams = affineTransformParams;
return this;
}