[jira] [Commented] (FOP-2279) External fo links don't work in encrypted PDFs

2016-07-04 Thread Glenn Adams (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361529#comment-15361529
 ] 

Glenn Adams commented on FOP-2279:
--

Could you verify the fix I just committed at [1]? Thanks.

[1] http://svn.apache.org/viewvc?rev=1751326&view=rev.

> External fo links don't work in encrypted PDFs
> --
>
> Key: FOP-2279
> URL: https://issues.apache.org/jira/browse/FOP-2279
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/pdf
>Affects Versions: 1.1, trunk
>Reporter: Matthias Reischenbacher
> Attachments: pdf_encrypted_with_external_link.fo, 
> pdf_encrypted_with_external_link.pdf, pdf_with_external_link.pdf
>
>
> When generating an encrypted PDF (e.g. with "-noprint" option via cli) 
> external fo:basic-link elements don't work anymore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2279) External fo links don't work in encrypted PDFs

2013-07-30 Thread Ronny Bartz (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13723533#comment-13723533
 ] 

Ronny Bartz commented on FOP-2279:
--

Hi,

Just saw 'https://issues.apache.org/bugzilla/show_bug.cgi?id=41959' and played 
around with the described patch.

What worked for me:

org.apache.fop.pdf.PDFUri

A, added

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));
  }
   }

B, changed 

private String getDictString() {
  return "<< /URI (" + uri + ")\n/S /URI >>";
   }

TO

private String getDictString() {
  String uriString = new String(this.encodeText2(uri));
  return "<< /URI " + uriString + "\n /S /URI >>";
   }


Would be good to have a final solution in an official release.

Thanks
Ronny

> External fo links don't work in encrypted PDFs
> --
>
> Key: FOP-2279
> URL: https://issues.apache.org/jira/browse/FOP-2279
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: 1.1, trunk
>Reporter: Matthias Reischenbacher
> Attachments: pdf_encrypted_with_external_link.fo, 
> pdf_encrypted_with_external_link.pdf, pdf_with_external_link.pdf
>
>
> When generating an encrypted PDF (e.g. with "-noprint" option via cli) 
> external fo:basic-link elements don't work anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira