Discussion:
[gs-devel] Writing custom XMP metadata in PDF/A
benleb
2009-05-03 05:08:34 UTC
Permalink
Hi,

I searched everywhere and never googled that much in finding the way I could
tell or customize GS command line to write custom XMP data and schemas to a
PDF/A file.

Starting with a v1.1 PDF previously produced using tiff2pdf, I want to
convert it to PDF/A (v1.4) using GS 8.64. How could I push some custom XMP
data and schemas in that PDF/A file during the same operation?

Thx
--
View this message in context: http://www.nabble.com/Writing-custom-XMP-metadata-in-PDF-A-tp23324708p23324708.html
Sent from the Ghostscript - Dev mailing list archive at Nabble.com.
Ken Sharp
2009-05-05 05:10:24 UTC
Permalink
Post by benleb
Starting with a v1.1 PDF previously produced using tiff2pdf, I want to
convert it to PDF/A (v1.4) using GS 8.64. How could I push some custom XMP
data and schemas in that PDF/A file during the same operation?
What precisely do you want to do ? There is some scope for flexibility with
metadata, but not all that much, especially for PDF/A output where the
metadata has to conform to the ISO standard.

It may be that your only option is to modify the source code, but without
knowing what you want to achieve I can't tell if its possible to do it at
present.


Ken
benleb
2009-05-08 19:09:34 UTC
Permalink
Hi Ken,

We have TIFFg4 images we want to convert (encapsulate) to PDF/A files along
with some user-defined metadata contained in XMP files (1 TIFF file + 1 XMP
file = 1 PDF/A file). Each XMP file contains metadata values along with
relevant metadata schemas (example attached).

I already tried converting with this workflow:

1) Convert TIFF image to PDF file using GS
2) Add XMP metadata to PDF file using Exiftool
3) Convert Exiftool output to PDF/A standard using GS

Unfortunately, the last operation strips added metadata, since Exiftool
simply adds an incrementational update past the end of the PDF file.

I also tried this workflow:

1) Convert TIFF to PDF/A using GS
2) Add XMP metadata to PDF/A file using Exiftool

As you would expect, the last operation makes the PDF/A file loose its
standard compliance.

So, here am I, asking if GS offers any tool or customization files that
would help to do this job.

Thanks for providing help.

Benoit

P.S.: Just let me know if a TIFF example would help. I didn't attached any
because of it's size (?1Mb).
Post by Ken Sharp
Post by benleb
Starting with a v1.1 PDF previously produced using tiff2pdf, I want to
convert it to PDF/A (v1.4) using GS 8.64. How could I push some custom XMP
data and schemas in that PDF/A file during the same operation?
What precisely do you want to do ? There is some scope for flexibility with
metadata, but not all that much, especially for PDF/A output where the
metadata has to conform to the ISO standard.
It may be that your only option is to modify the source code, but without
knowing what you want to achieve I can't tell if its possible to do it at
present.
Ken
_______________________________________________
gs-devel mailing list
http://www.ghostscript.com/mailman/listinfo/gs-devel
http://www.nabble.com/file/p23453700/CH20-3371-9516_CH_SO_2002-01-28_1.xmp
CH20-3371-9516_CH_SO_2002-01-28_1.xmp
--
View this message in context: http://www.nabble.com/Writing-custom-XMP-metadata-in-PDF-A-tp23324708p23453700.html
Sent from the Ghostscript - Dev mailing list archive at Nabble.com.
Ken Sharp
2009-05-09 06:57:13 UTC
Permalink
Post by benleb
1) Convert TIFF image to PDF file using GS
2) Add XMP metadata to PDF file using Exiftool
3) Convert Exiftool output to PDF/A standard using GS
Unfortunately, the last operation strips added metadata, since Exiftool
simply adds an incrementational update past the end of the PDF file.
It wouldn't matter where it puts the data, pdfwrite doesn't preserve
existing metadata when converting PDF input to PDF. You need to bear in
mind that GS does a complete interpretation of input before converting to
the output format. As a result (mostly) anything which isn't a marking
operation gets lost in the conversion.
Post by benleb
1) Convert TIFF to PDF/A using GS
2) Add XMP metadata to PDF/A file using Exiftool
As you would expect, the last operation makes the PDF/A file loose its
standard compliance.
Umm, well that's more to do with Exiftool I guess, it should be able to
update an existing PDF/A file without breaking standards compliance I would
have thought. I guess if all it does it update a PDF file that probably
does break the PDF/A standard.
Post by benleb
So, here am I, asking if GS offers any tool or customization files that
would help to do this job.
I don't think this is currently possible, you could always modify the
pdfwrite code to do this yourself, see pdf_write_document_metadata() in
gdevpdfe.c.
Post by benleb
P.S.: Just let me know if a TIFF example would help. I didn't attached any
because of it's size (??1Mb).
Thanks, but I don't think an example helps, I can always make one ;-)


Ken

Loading...