Hi Jeremias, Thanks a lot for all suggestions! I'll try them.
One question for moment - if that will work (of course it should at the end, cause I need that :)), would you be interested to have that part inside your SVN? I've tried that patching mechanism in the past, so if that feature would be of interest to FOP team - probably could pick up my old papers and try whole process once more :). Best, Andrejus > -----Original Message----- > From: Jeremias Maerki [mailto:[EMAIL PROTECTED] > Sent: Friday, June 15, 2007 9:06 AM > To: [email protected] > Subject: Re: Is there possibility to embed file as attachment into > resulting PDF through FOP? > > You could easily implement a FOP extension (for example as child of > fo:declarations) to transport the names of the files you want to embed > through the layout engine to the PDF renderer. Here's the list of things > to build: > > - Implement a new subclass of FONode for the extension object and be > sure to override getExtensionAttachment(). An example is > org.apache.fop.render.ps.extensions.PSSetupCodeElement. The > ExtensionAttachment is what's transported through the layout engine. > - The extension object has to be registered with an ElementMapping class > (depending on which namespace you want to place the extension in). > - Extend the PDF library so it can produce an "EmbeddedFile" structure > and so the "EmbeddedFiles" name tree is added to the "Names" object (as > per the PDF spec). > - Extend the PDF renderer to accept and evaluate the ExtensionAttachment > so it generates the respective PDF objects. This would be done in > PDFRenderer.processOffDocumentItem(). > > Have fun. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
