I am looking for an API that will enable me to convert .doc
or .pdf
files to PDF/A-1. I want this to make my files match with the ISO 19005 norm.

- 4,176
- 7
- 47
- 81

- 31
- 2
-
possible duplicate of [Convert to PDF/A and check compliance under Linux](http://stackoverflow.com/questions/464539/convert-to-pdf-a-and-check-compliance-under-linux) – Mechanical snail Aug 16 '12 at 01:16
3 Answers
I'm not aware of a (free as in beer, or Free as in Liberty) API that allows you to do that in a reliable, easy-to-use and verified way.
Ghostscript as a commandline tool will work, more or less. See these answers:
- "How to use Ghostscript DLL to convert PDF to PDF/A"
- "How to use Ghostscript to convert PDF to PDF/A or PDF/X ?"
- "Create print-ready PDF/X (with bleedbox, trimbox, mediabox, etc) programatically?"
The resulting PDF will claim to be PDF/A-1***b*** (and Adobe Reader will show a hint about this). However, you'll still not have a 100% verification that the PDF is really conforming to the standard's spec.
If your business relies on a meticulous match, you should at least get some tests with commercial-professional PDF/A validation tools done, before you switch to this method in production.

- 1
- 1

- 86,724
- 23
- 248
- 345
If you are targeting Windows OS and you can consider commercial libraries, then you can give Amyuni PDF Converter a try.
Amyuni PDF Converter is a virtual printer driver that you can control programmatically from your application using either a COM/ActiveX interface, or a .Net assembly; and you can configure it for PDF/A output.
Usual disclaimer applies

- 10,361
- 3
- 38
- 68
For PDF files I recommend you to try Docotic.Pdf library. It's capable of converting PDF documents to PDF/A-1b ones.
Here is a sample for the task:
public static void convertToPdfA(string input, string output)
{
using (PdfDocument pdf = new PdfDocument(input))
{
pdf.SaveOptions.ProducePdfA = true;
pdf.Save(output);
}
}
Disclaimer: I work for the vendor of the library.

- 13,789
- 19
- 80
- 130