Is it possible to add attachments to PDF documents created with Prince? e.g. Adobe Acrobat can import and include attachments within PDF documents.
Prince doesn't have a facility for adding file attachments to generated PDF documents at this time, although it might be possible to add this feature.
Is this a roadmap item or something we would need to request specifically?
It's not on the roadmap at the moment as no one has ever asked for it. Was there a particular use case that you had in mind?
+1 for adding PDF attachment support
Our use case: we are generating PDF invoices for our clients. These invoices need to be processed by other software, so we want to include an XML representation of the invoice for machine readability. Adding this XML document to the invoice as an attachment would be a nice solution.
Our use case relates to an application for which we are exploring the use of PrinceXML to automate the secure delivery of documents. We would like to use Prince to create an encrypted PDF which would contain any number of other documents. The ability to specify attachements on the command line would be superb!
prince -a attachment.xls -a attachment.doc
I think we can do this, perhaps we can put a quick prototype together over the weekend.
If thats possible, it would be great! I'm more than happy to do some testing for you.
Prince 8.0 supports PDF attachments with the --attach=FILE command-line option.
can I attach all files in a folder like
Wycliffe Bible Translators
No, on Windows this will try to attach a single file called "audio/*.wav" and on Linux it will try to attach a file called "audio/foo.wav audio/bar.wav ..." due to shell expansion. At the moment you need one --attach argument per file.
So my real request is go embed audio files just like graphic files are embedded.
I don't want to have to keep track of a bunch of small files.
A dictionary has the potential of one audio file per entry giving the proper pronunciation of the entry.
Wycliffe Bible Translators
Okay this is a different issue, basically requires putting a link to the audio file in the document, eg. with an icon or something, and Prince converting that link into an embedded click-to-play audio clip. We can't do this yet, though.
Just wondering if Prince is able to add attachments do pdfs now? So people can download a file straight from the pdf.
Not with links from within the page, no. Attached files can be accessed from the attachments panel, though.
So is adding attachments only done strictly via the command line?
PDF.attachFile("data.xls", "Latest sales figures.");
Is there something similar in the Java API?
No actually, but you can call setOptions() to pass additional arbitrary command-line arguments.