https://issues.apache.org/bugzilla/show_bug.cgi?id=41959
--- Comment #3 from Andreas L. Delmelle <[EMAIL PROTECTED]> 2008-11-30
03:44:59 PST ---
Recently reported again on fop-users@ by Peter Coppens, who made progress
towards a fix:
---
I have something that seems to be working, but I am not sure it is always
correct and I doubt it's the most optimal approach.
Here are the changes I did
1. PDFLink#toPDFString
Added
this.action.setParent(this);
(would be better to do this when creating the PDFUri object )
2. PDFUri#getAction
public String getAction() {
return "<< /URI (" + uri + ")\n/S /URI >>";
}
-->
public String getAction() {
String uriString=new String(this.encodeText2(uri));
return "<< /URI " + uriString + "\n /S /URI >>";
}
3. Added PDFObject#encodeText2
protected byte[] encodeText2(String text) {
if (getDocumentSafely().isEncryptionActive()) {
final byte[] buf = PDFText.encode(text);
byte[] enc = getDocument().getEncryption().encrypt(buf, this);
return PDFText.toHex(enc,true).getBytes();
} else {
return encode(PDFText.escapeText(text, false));
}
}
Perhaps this can be used as something to start from for a patch for bug
41959 ?
Thanks,
Peter
---
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.