[jira] [Commented] (FOP-3258) Links alt text is scrambled by encryption

"Julien Lacour (Jira)" <[email protected]>
Newsgroups gmane.text.xml.fop.devel
Message-ID <[email protected]>
    [ https://issues.apache.org/jira/browse/FOP-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17956624#comment-17956624 ] 

Julien Lacour commented on FOP-3258:
------------------------------------

Although not ideal, calling {{PDFObject.encodeText}} and encoding the result works:
{code:java}
if (altText != null && !altText.isEmpty()) {
    String contents = PDFText.escapeText(altText);
    if (getDocumentSafely().isEncryptionActive()) {
      contents = new String(encodeText(altText), StandardCharsets.ISO_8859_1);
    }
    dict += "/Contents " + contents + "\n";
}
{code}


> Links alt text is scrambled by encryption
> -----------------------------------------
>
>                 Key: FOP-3258
>                 URL: https://issues.apache.org/jira/browse/FOP-3258
>             Project: FOP
>          Issue Type: Bug
>            Reporter: Julien Lacour
>            Priority: Major
>         Attachments: fop.xconf, test.fo, tooltip.png
>
>
> If I enable encryption in my xconf, the alt text tooltip is scrambled in the PDF:
> !tooltip.png!
> I've attached the files for reproduction, I've used FOP 2.11.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.