diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-05-08 21:13:21 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-05-08 21:13:21 +0000 |
commit | e98e4a82127082d77e073e8d72f17231d5e5b9c1 (patch) | |
tree | b5694a0c4763eb4c970c8bd9678129bace826bc1 /src | |
parent | 141722a7cd16bf481453de7dce21a2506dc8ca0b (diff) | |
download | xmlgraphics-fop-e98e4a82127082d77e073e8d72f17231d5e5b9c1.tar.gz xmlgraphics-fop-e98e4a82127082d77e073e8d72f17231d5e5b9c1.zip |
Adding missing mandatory flags for PDF/A-1.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@405167 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/pdf/PDFLink.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFLink.java b/src/java/org/apache/fop/pdf/PDFLink.java index 30929d29e..e0cd2a661 100644 --- a/src/java/org/apache/fop/pdf/PDFLink.java +++ b/src/java/org/apache/fop/pdf/PDFLink.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2004,2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,12 +71,21 @@ public class PDFLink extends PDFObject { * @see org.apache.fop.pdf.PDFObject#toPDFString() */ public String toPDFString() { + String fFlag = ""; + if (getDocumentSafely().getPDFAMode().isPDFA1LevelB()) { + int f = 0; + f |= 1 << (3 - 1); //Print, bit 3 + f |= 1 << (4 - 1); //NoZoom, bit 4 + f |= 1 << (5 - 1); //NoRotate, bit 5 + fFlag = "/F " + f; + } String s = getObjectID() + "<< /Type /Annot\n" + "/Subtype /Link\n" + "/Rect [ " + (ulx) + " " + (uly) + " " + (brx) + " " + (bry) + " ]\n" + "/C [ " + this.color + " ]\n" + "/Border [ 0 0 0 ]\n" + "/A " - + this.action.getAction() + "\n" + "/H /I\n>>\nendobj\n"; + + this.action.getAction() + "\n" + "/H /I\n" + + fFlag + "\n>>\nendobj\n"; return s; } |