Re: [toolbox] PDF files and metadata
Status: Planning
Brought to you by:
jlaurens
From: <jer...@u-...> - 2006-02-27 09:16:37
|
Le 19 f=E9vr. 06, =E0 18:23, Adam R. Maxwell a =E9crit : > > 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=20= >>> other platforms, and setting the PDF attributes via PDFDocument (and=20= >>> then saving the PDFDocument) is /really/ slow, as it needs to=20 >>> re-render the PDF. >>> >>> Question: >>> Does anyone know of a better way to do this? I looked at Adobe's=20 >>> XMP library, but I don't grok C++, and it seems really low-level in=20= >>> any case. >> >> It is. But if you can generate the xml describing the metadata,=20 >> adding it to a pdftex generated file is trivial, and I think it isn't=20= >> too hard either adding the blob to other files as well. > > We have all the metadata available, so writing XML from code is pretty=20= > reasonable (I only object to writing XML by hand). I'm assuming this=20= > is the easy part, anyway. > >> The hardest part is recreating the pointer table at the end of the=20 >> 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. =20= > The Adobe sample code is pretty worthless for my purposes. > Maybe I don't get the problem but this might help http://hacks.oreilly.com/pub/h/2407 |