xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <lars.bjer...@swedbank.se>
Subject SV: Encryption and links
Date Thu, 25 Jul 2013 07:09:38 GMT
@luis, I´m sorry i didn't have the possibility to respond earlier but here goes:
#1 I thought that an external provide (e.g. Bouncy Castle) was a prereq (reference to the
same documentation link as Mattias specified which seems to be copied from 1.0 docs).
#2 The FO file, the part concerning the link, looks like this:
  <fo:basic-link external-destination="http://sv.wikipedia.org/wiki/Stieg_Trenter" text-decoration="underline"
color="blue">Svenska Wikipedia</fo:basic-link>
which will give the desired result without encryption but will fail with encryption. It is
basically the same as Matthias´ Jira FO.

@Matthias, I looked at the Jira issue and I would say it is a perfect match of my findings
also. (I cast a vote on it).

So, I would think that this has nothing to do with the encryption implementation (i.e. Bouncy
Castle) but rather how the FOP engine generates the resulting PDF file.

Best regards

Från: Matthias Reischenbacher [mailto:matthias8283@gmx.at]
Skickat: den 24 juli 2013 21:43
Till: fop-users@xmlgraphics.apache.org
Ämne: Re: Encryption and links

Hi Luis,

I've had the same issue and created a jiira issue with a minimal test case, see:


The problem also exists in current trunk.

Regarding Bouncy Castle: this is documented here: http://xmlgraphics.apache.org/fop/1.1/pdfencryption.html#install_crypto
Is this not necessary anymore with newer JDKs?

Best regards,

On 23.07.2013 07:57, Luis Bernardo wrote:
Why do you need to use Bouncy Castle? And can you provide an example of your source FO file?
It is possible that the problem you see is also present in trunk. Note that support for encryption
in trunk has been expanded since the the 1.0 release so you may want to try trunk too.

On Tue, Jul 23, 2013 at 6:47 AM, <lars.bjerges@swedbank.se<mailto:lars.bjerges@swedbank.se>>

I have been implementing the Bouncy Castle encryption support as described in the FOP docs
and almost everything works out fine.
What does not work however is the implementation of external links (fo:basic-link - external-destination).
In my case the link target will be an Internet URL (e.g. http://x.y.com).

When I try to click on a link in the resulting PDF I will be directed to my default browser
but with a "Target not found" message. When inspecting the URL I find that it starts with
file:///C:/eclipse.../out/<file:///C:\eclipse...\out\> which is the path to the created
PDF. After that there is just a string of hexadecimal characters (encrypted URL I suspect).

However, when turning off encryption and not changing any other parameter, the links will
work all right.

I am currently using FOP 1.0 but looked at history of changes for 1.1 I did not see anything
relating to this.

I found some information regarding this on Internet from 2008 FOP 0.95 and so my questions

Is the bug still there (it seems so)?
Does anybody have a workaround (without hacking the FOP code)?


Lars Bjerges
zOS & Common Function (Sweden)

Swedbank AB (publ)
105 34 Stockholm
Telefon: +46 (0)8 58 59 43 45<tel:%2B46%20%280%298%C2%A058%2059%2043%2045>
Mobil: +46 (0)70 95 27 774<tel:%2B46%20%280%2970%C2%A095%2027%20774>

Vi ber dig lägga märke till att detta e-postmeddelande kan innehålla konfidentiell information.
Om du felaktigt blivit mottagare av detta meddelande ber vi dig informera avsändaren om felet
genom att använda svara-funktionen. Vi ber dig också att radera e-postmeddelandet utan att
skicka det vidare eller kopiera det. Trots att vi intygar att e-postmeddelandet och eventuella
bilagor inte innehåller virus och andra fel som kan påverka datorn eller IT-systemet där
det mottages och läses, öppnas det på mottagarens eget ansvar. Vi tar inte på oss något
ansvar för förlust eller skada, som har uppstått i samband med att e-postmeddelandet mottagits
och använts.

Please note that this message may contain confidential information. If you have received this
message by mistake, please inform the sender of the mistake by sending a reply, then delete
the message from your system without making, distributing or retaining any copies of it. Although
we believe that the message and any attachment are free from viruses and other errors that
might affect the computer or IT system where it is received and read, the recipient opens
the message at his or her own risk. We assume no responsibility for any loss or damage arising
from the receipt or use of this message.

View raw message