Re: [toolbox] PDF files and metadata
Status: Planning
Brought to you by:
jlaurens
From: Adam R. M. <ama...@ma...> - 2006-02-19 17:23:03
|
On Feb 19, 2006, at 03:10, Maarten Sneep wrote: > On 19 Feb 2006, at 1:06, Adam R. Maxwell wrote: > >> So far, so good. Unfortunately, Mac OS X xattrs aren't supported >> on other platforms, and setting the PDF attributes via PDFDocument >> (and then saving the PDFDocument) is /really/ slow, as it needs to >> re-render the PDF. >> >> Question: >> Does anyone know of a better way to do this? I looked at Adobe's >> XMP library, but I don't grok C++, and it seems really low-level >> in any case. > > It is. But if you can generate the xml describing the metadata, > adding it to a pdftex generated file is trivial, and I think it > isn't too hard either adding the blob to other files as well. We have all the metadata available, so writing XML from code is pretty reasonable (I only object to writing XML by hand). I'm assuming this is the easy part, anyway. > The hardest part is recreating the pointer table at the end of the > pdf file, but I think you can script this using pdftk as an engine. If anyone has pointers to sample code doing this, I'd be interested. The Adobe sample code is pretty worthless for my purposes. >> Suggestion: >> It might be nice if the TeX front ends that use PDFDocument could >> write some of that metadata into the file, either by parsing it or >> providing an interface to edit the metadata. > > May I suggest xmpincl? You'll need to generate a separate xmp file > yourself, but after that, including it is easy. > http://www.ctan.org/tex-archive/macros/latex/contrib/xmpincl/ Yeah, you front end people need to pay attention to this :). I was just suggesting more work for someone else here (but it's pretty easy to add limited metadata using PDFDocument; author, title, date(s), keywords, once you work around Apple's bugs). > In any case, a pdfTeX based solution is both portable, and probably > faster anyway. However, I can see that especially for BibDesk, > adding the metadata to an existing file is essential. May I also > suggest you get in contact with Bruce d'Arcus, as he seems to be > working on introducing a standard for this: http:// > netapps.muohio.edu/blogs/darcusb/darcusb/ Thanks, that's a good thought; Bruce has been looking at this for a long time. -- Adam |