You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Andreas Delmelle <a_...@pandora.be> on 2003/06/21 12:45:06 UTC

Embedding FOP, PDF Encryption & Custom fonts

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

while embedding FOP using embedded TrueType & implementing PDF
encryption,
stumbled upon the following (Acrobat Reader 5.1) :

- - unable to extract embedded font ...

- - also the producer (& author / title / date - added myself)
properties in the PDFInfo
	produce weird results

code :

driver.setRenderer(Driver.RENDER_PDF);
log.info( "Renderer set..." );
driver.getRenderer().setAuthor( author );
driver.getRenderer().setTitle( title );
		
opt = new java.util.HashMap();
opt.put( "allowEditContent", "FALSE" );
opt.put( "allowPrint", "FALSE" );
log.info( "Options created..." );
driver.getRenderer().setOptions(opt);
		
anyone encounter this problem yet?

greetz

ald

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPvQ3J9Bw/OvTa+XUEQIzMwCeNTL8S61/nij4s254OFf/OeaFAEgAnikH
mj+rkkPb1j95uQQtxHjaJ7T2
=TNu7
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Embedding FOP, PDF Encryption & Custom fonts

Posted by Jeremias Maerki <de...@greenmail.ch>.
That's the redesign. You will want to get the branch with tag
"fop-0_20_2-maintain". See: http://xml.apache.org/fop/dev/

On 22.06.2003 15:07:20 Andreas Delmelle wrote:
> switched to latest dev cvs snapshot.
> 
> trouble now is i don't have the apache.commons package.
> ( imported in AbstracPDFStream.java )
> 
> anyone know where to get it?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Embedding FOP, PDF Encryption & Custom fonts

Posted by Andreas Delmelle <a_...@pandora.be>.
damn'! got me again ;) dl'ed the wrong branch
(still got to get used to the cvs tool... <sigh>)

thx for another helpful hint

greetz,

ald

-----Original Message-----
From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
Sent: maandag 23 juni 2003 20:05
To: fop-user@xml.apache.org
Subject: Re: Embedding FOP, PDF Encryption & Custom fonts


That hasn't changed as far as I know. Are you sure you got the
maintenance branch and not the redesign/trunk/HEAD?

On 23.06.2003 19:26:11 Andreas Delmelle wrote:
> btw : switched to the latest version of the 'maintain' branch, but
> the way the custom config xml is processed seems to differ from the
> latest distribution version.
> 
> any helpful hints on this one?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Embedding FOP, PDF Encryption & Custom fonts

Posted by Jeremias Maerki <de...@greenmail.ch>.
That hasn't changed as far as I know. Are you sure you got the
maintenance branch and not the redesign/trunk/HEAD?

On 23.06.2003 19:26:11 Andreas Delmelle wrote:
> btw : switched to the latest version of the 'maintain' branch, but
> the way the custom config xml is processed seems to differ from the
> latest distribution version.
> 
> any helpful hints on this one?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Embedding FOP, PDF Encryption & Custom fonts

Posted by Andreas Delmelle <a_...@pandora.be>.
i get the picture... thx for the info. ( esp. for pointing out that
a different editor might drop this object; sth i hadn't really
considered )

btw : switched to the latest version of the 'maintain' branch, but
the way the custom config xml is processed seems to differ from the
latest distribution version.

any helpful hints on this one?

thx in advance.

greetz,

ald

-----Original Message-----
From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
Sent: maandag 23 juni 2003 11:19
To: fop-user@xml.apache.org
Subject: Re: Embedding FOP, PDF Encryption & Custom fonts


What kind of signature/verification? A cryptographic signature inside
the PDF to authenticate the generator of the PDF? This is already
standardized
by Adobe.

PDF is designed to be extensible. Therefore it is perfectly valid to add
custom streams/objects to the PDF. But you must be prepared that a PDF
editor may drop the object if it saves the PDF again. And of course, you
need to provide a way to support your proprietary extension. Better
stick to standards.

On 22.06.2003 12:26:04 Andreas Delmelle wrote:
> also, i'm considering the option of creating an
> additional content-stream, that could contain a
> signature for verification.
>
> is it possible to include an object in the pdf that
> would be left alone by other readers ( but could be
> used, perhaps as a form of FOP-specific verification )
> and does this even make sense?



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Embedding FOP, PDF Encryption & Custom fonts

Posted by Jeremias Maerki <de...@greenmail.ch>.
What kind of signature/verification? A cryptographic signature inside
the PDF to authenticate the generator of the PDF? This is already standardized
by Adobe.

PDF is designed to be extensible. Therefore it is perfectly valid to add
custom streams/objects to the PDF. But you must be prepared that a PDF
editor may drop the object if it saves the PDF again. And of course, you
need to provide a way to support your proprietary extension. Better
stick to standards.

On 22.06.2003 12:26:04 Andreas Delmelle wrote:
> also, i'm considering the option of creating an 
> additional content-stream, that could contain a 
> signature for verification. 
>
> is it possible to include an object in the pdf that
> would be left alone by other readers ( but could be 
> used, perhaps as a form of FOP-specific verification )
> and does this even make sense?



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Embedding FOP, PDF Encryption & Custom fonts

Posted by Andreas Delmelle <a_...@pandora.be>.
's allright. no hurry.

another side-effect : on pressing the OK button
in the doc properties summary screen, you get the message
that 'this operation is not allowed' ( maybe caused by the 
fact that this screen is a restricted version of the
one in the full Acrobat Version & issues a command 
on pressing that button which is not allowed under 
the applied restrictions? )

also, i'm considering the option of creating an 
additional content-stream, that could contain a 
signature for verification. 
is it possible to include an object in the pdf that
would be left alone by other readers ( but could be 
used, perhaps as a form of FOP-specific verification )
and does this even make sense?


greetz,

ald

-----Original Message-----
From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
Sent: zondag 22 juni 2003 9:19
To: fop-user@xml.apache.org
Subject: Re: Embedding FOP, PDF Encryption & Custom fonts



On 21.06.2003 12:45:06 Andreas Delmelle wrote:
> while embedding FOP using embedded TrueType & implementing PDF
> encryption,
> stumbled upon the following (Acrobat Reader 5.1) :
> 
> - - unable to extract embedded font ...

That's the missing ToUnicode functionality that was discussed a few days
ago. It looks like this is becoming a major topic.

> - - also the producer (& author / title / date - added myself)
> properties in the PDFInfo
> 	produce weird results

<snip/>

> anyone encounter this problem yet?

Known problem. Encryption in the maintenance branch is not completely
finished. Dictionary strings don't get encrypted like they should. This
is fixed in the redesign, however. But that won't help you right now.
Either someone has to complete the encryption part or we have to switch
the the PDF library from the redesign.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Embedding FOP, PDF Encryption & Custom fonts

Posted by Andreas Delmelle <a_...@pandora.be>.
switched to latest dev cvs snapshot.

trouble now is i don't have the apache.commons package.
( imported in AbstracPDFStream.java )

anyone know where to get it?


thx,

ald
-----Original Message-----
From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
Sent: zondag 22 juni 2003 9:19
To: fop-user@xml.apache.org
Subject: Re: Embedding FOP, PDF Encryption & Custom fonts



On 21.06.2003 12:45:06 Andreas Delmelle wrote:
> while embedding FOP using embedded TrueType & implementing PDF
> encryption,
> stumbled upon the following (Acrobat Reader 5.1) :
> 
> - - unable to extract embedded font ...

That's the missing ToUnicode functionality that was discussed a few days
ago. It looks like this is becoming a major topic.

> - - also the producer (& author / title / date - added myself)
> properties in the PDFInfo
> 	produce weird results

<snip/>

> anyone encounter this problem yet?

Known problem. Encryption in the maintenance branch is not completely
finished. Dictionary strings don't get encrypted like they should. This
is fixed in the redesign, however. But that won't help you right now.
Either someone has to complete the encryption part or we have to switch
the the PDF library from the redesign.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Embedding FOP, PDF Encryption & Custom fonts

Posted by Andreas Delmelle <a_...@pandora.be>.
If u don't use custom fonts, code like in my earlier message should do the
trick.
( Create an options Hashmap & use driver.getRenderer().setOptions(...) ).

Only downside for the moment is that the producer info will get scrambled,
but as this is a
mere detail... The supplied restrictions are fully & correctly applied
though.

greetz,

ald

-----Original Message-----
From: Chris Faulkner [mailto:chrisf@oramap.com]
Sent: zondag 22 juni 2003 11:00
To: fop-user@xml.apache.org
Subject: RE: Embedding FOP, PDF Encryption & Custom fonts


Hello all

I am already using FOP to create PDF documents in a servlet environment. I
would like to encrypt these documents. I can see on the website that there
are instructions to create encrypted documents using the command line tool -
how can I use the utilities in a servlet  ?

Thanks

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Embedding FOP, PDF Encryption & Custom fonts

Posted by Chris Faulkner <ch...@oramap.com>.
Hello all

I am already using FOP to create PDF documents in a servlet environment. I
would like to encrypt these documents. I can see on the website that there
are instructions to create encrypted documents using the command line tool -
how can I use the utilities in a servlet  ?

Thanks

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Embedding FOP, PDF Encryption & Custom fonts

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 21.06.2003 12:45:06 Andreas Delmelle wrote:
> while embedding FOP using embedded TrueType & implementing PDF
> encryption,
> stumbled upon the following (Acrobat Reader 5.1) :
> 
> - - unable to extract embedded font ...

That's the missing ToUnicode functionality that was discussed a few days
ago. It looks like this is becoming a major topic.

> - - also the producer (& author / title / date - added myself)
> properties in the PDFInfo
> 	produce weird results

<snip/>

> anyone encounter this problem yet?

Known problem. Encryption in the maintenance branch is not completely
finished. Dictionary strings don't get encrypted like they should. This
is fixed in the redesign, however. But that won't help you right now.
Either someone has to complete the encryption part or we have to switch
the the PDF library from the redesign.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org