Title: Message
Hello everybody,
 
I'm currently performing some evolutions on an archiving solution for a customer. It handled PDF files, but has now to handle PDF/A files. Sometimes, files have to be merged together.
I'm currently trying to merge several PDF files into one unique file. The input PDF files are thus now in the PDF/A (archive) format and the output file has also to be in the same format. But the output is currently just PDF and not PDF/A.
 
I'm using iTextSharp, but this shouldn't make a difference, should it ?
 
To check PDF/A conformance, I use the "PDF Checker" program from Seal System.
 
At first the conformance check pointed out 3 issues:
1) ColorSpaceCheck: "Device-dependent color space is used but the output intents entry is not set".
2) MetadataCheck: "The XMP metadata do not contain all entries requested for PDF/A:
               "XMP metadata do not contain requested entry <part>"
               "XMP metadata do not contain requested entry <conformance>"
3) CatalogDictionaryCheck: "The document does not contain XMP metadata".
 
For what follows, do not hesitate to react if I'm doing things wrong (it was actually a trial & error process):
 
Okay, so I tried to copy the XMP metadata of the first input file to the output file:
- I ensured the "pdfWriter.CreateXmpMetadata();" was called before opening the document.
- after closing the output document, I used a PdfStamper to stamp the metadata into another output file:

PdfReader outputReader = new PdfReader(OUTPUT_DIR + FILENAME_OUTPUT);
FileStream fileOutput = new FileStream(OUTPUT_DIR + FILENAME_OUTPUT2, FileMode.CreateNew);
PdfStamper pdfStamper = new PdfStamper(outputReader, fileOutput);
pdfStamper.XmpMetadata = metadata;
pdfStamper.Close();
outputReader.Close();
fileOutput.Close();

To sum up the steps:
a) Prepare output_1 document
b) Copy source to output_1 using PdfCopy and PdfImportedPage, then close output_1
c) Read output_1 and use PdfStamper on new output_2 to stamp XMP metadata
 
Then the PDF Checker reported the following remaining errors:
1) ColorSpaceCheck: "Device-dependent color space is used but the output intents entry is not set".
2) CommonCheck: "The document trailer has an invalid ID: Document has no ID".
 
For the first issue, I tried to call "pdfWriter.SetOutputIntents(reader, false);" to copy the output intents on the writer, but this did not work better. Actually I do not know what this output intent is exactly (what other method exists in order to read it ?).
 
For the second remaining issue, I checked in the trailer and indeed the document has no more ID (the output_2)
 
The question thus is: do you have an idea of what goes wrong or what is wrong in the steps described above ?
 
If you have any other information about how to keep PDF/A conformance, it would be a huge help.
 
Thanks for any info,
 
Julien.
 

--
Julien Beck - Consultant
ELCA
- www.elca.ch
Av. de la Harpe 22-24 / Case postale 519 / CH - 1001 Lausanne
mailto:[EMAIL PROTECTED] / Tel: +41 21 613 21 37 / Fax: +41 21 613 21 00

This message may contain confidential and/or privileged information. If you are neither the addressee nor authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please contact the sender and delete this message. Thank you.

 
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to