It appears this is not so simple. Depending on which approach I try I
end up missing functionality in either the PDFBox or FOP PDF library
APIs to cover that requirement: If I work with the decoded stream but
get a PDF with JPEG images I get a warning from PDFBox: "Warning:
DCTFilter.decode is not implemented yet, skipping this stream." And the
resulting PDF is corrupt. I would need the ability to ignore the DCT
filter which is currently not possible. On the other side, if I want to
try to just encrypt the undecoded stream AbstractPDFStream currently
lacks finer control over the applied filters. So I either have to modify
PDFBox or the FOP PDF library for which I don't currently have enough time.
It also creates a dependency on a new version of either package. So for
now, that means: no support for encrypting PDFs when PDF images are used.
If you want to try yourself, feel free.

On 07.12.2008 21:56:12 Jeremias Maerki wrote:
> As a performance measure, I have copied the undecoded stream content
> over to the target document which, if encryption is enabled, obviously
> won't work. I'm working on a fix and will get back to you.
> 
> On 05.12.2008 16:02:40 Peter Coppens wrote:
> > 
> > Fop fans,
> > 
> > I have the impression that when using e.g. the -noprint fop command line
> > option while pdf rendering an fo that referers to a pdf as external-graphic,
> > the pdf is either not included or not included correctly. 
> > 
> > E.g. this fo document reproduces the problem
> > 
> > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> >   <fo:layout-master-set>
> >       <fo:simple-page-master master-name="pm" page-height="25cm"
> > page-width="20cm">
> >         <fo:region-body/>
> >       </fo:simple-page-master>
> >   </fo:layout-master-set>
> >   <fo:page-sequence master-reference="pm">
> >       <fo:flow flow-name="xsl-region-body">
> >         <fo:block-container absolute-position="fixed" >
> >           <fo:block >
> >             <fo:external-graphic
> > src="url(http://xmlgraphics.apache.org/fop/0.95/pdfencryption.pdf#1)"
> > content-height="scale-to-fit" content-width="scale-to-fit"/>
> >           </fo:block>
> >         </fo:block-container>
> >     </fo:flow>
> >   </fo:page-sequence>
> > </fo:root>
> > 
> > 
> > Thanks
> > 
> > Peter
> > -- 
> > View this message in context: 
> > http://www.nabble.com/PDF-Image-extension-and-encryption-don%27t-go-together--tp20855649p20855649.html
> > Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 
> 
> Jeremias Maerki
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to