AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.
About the DocConverter Service
The DocConverter service can convert PDF documents to PDA/A documents. You can accomplish these tasks using this service:
For more information about the DocConverter service, see Services Reference for AEM Forms.
You can use the DocConverter service to convert a PDF document to a PDF/A document. Because PDF/A is an archival format for long-term preservation of the document’s content, all fonts are embedded and the file is uncompressed. As a result, a PDF/A document is typically larger than a standard PDF document. Also, a PDF/A document does not contain audio and video content. Before you convert a PDF document to a PDF/A document, ensure that the PDF document is not a PDF/A document.
The PDF/A-1 specification consists of two levels of conformance, namely A and B. The major difference between the two is regarding the logical structure (accessibility) support, which is not required for conformance level B. Regardless of the conformance level, PDF/A-1 dictates that all fonts are embedded within the generated PDF/A document. At this time, only PDF/A-1b is supported in validation (and conversion).
While PDF/A is the standard for archiving PDF documents, it is not mandatory that PDF/A be used for archiving if a standard PDF document meets your company’s requirements. The purpose of the PDF/A standard is to establish a PDF file meant for long-term archiving and document-preservation needs.
For more information about the DocConverter service, see Services Reference for AEM Forms.
To convert a PDF document to a PDF/A document, perform the following steps:
Include project files
Include the necessary files in your development project. If you are creating a client application by using Java, include the necessary JAR files. If you are using web services, make sure that you include the proxy files.
The following JAR files must be added to your project’s class path:
For information about the location of these JAR files, see Including AEM Forms Java library files.
Create a DocConvert client
Before you can programmatically perform an DocConverter operation, you must create a DocConverter client. If you are using the Java API, create a DocConverterServiceClient
object. If you are using the DocConverter web service API, create a DocConverterServiceService
object.
Reference a PDF document to convert to a PDF/A document
Retrieve a PDF document to convert to a PDF/A document. If you attempt to convert a PDF document, such as an Acrobat form, to a PDF/A document, you will cause an exception.
Set tracking information
You can set a run-time option that determines how much information is tracked during the conversion process. That is, you can set nine different levels that specify how much information the DocConverter service tracks when it converts a PDF document to a PDF/A document.
Convert the document
After you create the DocConverter service client, reference the PDF document to convert and set the run-time option that specifies how much information is tracked, you can convert the PDF document to a PDF/A document.
Save the PDF/A document
You can save the PDF/A document as a PDF file.
See also
Convert documents to PDF/A documents using the Java API
Convert documents to PDF/A documents using the web service API
Including AEM Forms Java library files
Programmatically Determining PDF/A Compliancy
Convert a PDF document to a PDF/A document by using the Java API:
Include project files
Include client JAR files, such as adobe-docconverter-client.jar, in your Java project’s class path.
Create a DocConvert client
ServiceClientFactory
object that contains connection properties.DocConverterServiceClient
object by using its constructor and passing the ServiceClientFactory
object.Reference a PDF document to convert to a PDF/A document
java.io.FileInputStream
object that represents the PDF document to convert by using its constructor and passing a string value that specifies the location of the PDF file.com.adobe.idp.Document
object by using its constructor and passing the java.io.FileInputStream
object.Set tracking information
PDFAConversionOptionSpec
object by using its constructor.PDFAConversionOptionSpec
object’s setLogLevel
method and passing a string value that specifies the tracking level. For example, pass the value FINE
. For information about the different values, see the setLogLevel
method in the AEM Forms API Reference.Convert the document
Convert the PDF document to a PDF/A document by invoking the DocConverterServiceClient
object’s toPDFA
method and passing the following values:
com.adobe.idp.Document
object that contains the PDF document to convertPDFAConversionOptionSpec
object that specifies tracking informationThe toPDFA
method returns a PDFAConversionResult
object that contains the PDF/A document.
Save the PDF/A document
PDFAConversionResult
object’s getPDFA
method. This method returns a com.adobe.idp.Document
object that represents the PDF/A document.java.io.File
object that represents the PDF/A file. Ensure that the file name extension is .pdf.com.adobe.idp.Document
object’s copyToFile
method and passing the java.io.File
object.See also
Quick Start (SOAP mode): Converting a document to a PDF/A document using the Java API
Including AEM Forms Java library files
Convert a PDF document to a PDF/A document by using the DocConverter API (web service):
Include project files
Create a DocConvert client
DocConverterServiceService
object by invoking its default constructor.DocConverterServiceService
object’s Credentials
data member with a System.Net.NetworkCredential
value that specifies the user name and password value.Reference a PDF document to convert to a PDF/A document
BLOB
object by using its constructor. The BLOB
object is used to store the PDF document that is converted to a PDF/A document.System.IO.FileStream
object by invoking its constructor and passing a string value that represents the file location of the PDF document and the mode to open the file in.System.IO.FileStream
object. You can determine the size of the byte array by getting the System.IO.FileStream
object’s Length
property.System.IO.FileStream
object’s Read
method and passing the byte array, the starting position, and the stream length to read.BLOB
object by assigning its binaryData
property with the contents of the byte array.Set tracking information
PDFAConversionOptionSpec
object by using its constructor.PDFAConversionOptionSpec
object’s logLevel
data member. For example, assign the value FINE
to this data member.Convert the document
Convert the PDF document to a PDF/A document by invoking the DocConverterServiceService
object’s toPDFA
method and passing the following values:
BLOB
object that contains the PDF document to convertPDFAConversionOptionSpec
object that specifies tracking informationThe toPDFA
method returns a PDFAConversionResult
object that contains the PDF/A document.
Save the PDF/A document
BLOB
object that stores the PDF/A document by getting the value of the PDFAConversionResult
object’s PDFADocument
data member.BLOB
object that was returned by using the PDFAConversionResult
object. Populate the byte array by getting the value of the BLOB
object’s binaryData
data member.System.IO.FileStream
object by invoking its constructor and passing a string value that represents the file location of the PDF/A document.System.IO.BinaryWriter
object by invoking its constructor and passing the System.IO.FileStream
object.System.IO.BinaryWriter
object’s Write
method and passing the byte array.See also
Invoking AEM Forms using Base64 encoding
Creating a .NET client assembly that uses Base64 encoding
You can use the DocConverter service to determine whether a PDF document is PDF/A-compliant. For information about a PDF/A document and how to convert a PDF document to a PDF/A document, see Converting Documents to PDF/A Documents.
For more information about the DocConverter service, see Services Reference for AEM Forms.
To determine PDF/A compliancy, perform the following steps:
Include project files
Include the necessary files in your development project. If you are creating a client application by using Java, include the necessary JAR files. If you are using web services, make sure that you include the proxy files.
The following JAR files must be added to your project’s class path:
For information about the location of these JAR files, see Including AEM Forms Java library files.
Create a DocConvert client
Before you can programmatically perform an DocConverter operation, you must create a DocConverter client. If you are using the Java API, create a DocConverterServiceClient
object. If you are using the DocConverter web service API, create a DocConverterServiceService
object.
Reference a PDF document used to determine PDF/A compliancy
A PDF document must be referenced and passed to the DocConverter service in order to determine whether the PDF document is PDF/A-compliant.
Set run-time options
You can set a run-time option that determines how much information is tracked during the conversion process. That is, you can set nine different level that specify how much information the DocConverter service tracks when it converts a PDF document to a PDF/A document.
Retrieve information about the PDF document
After you create the DocConverter service client, reference the PDF document, and set the run-time options, you can determine whether the PDF document is a PDF/A-compliant document.
See also
Determine PDF/A compliancy using the Java API
Determine PDF/A compliancy using the web service API
Including AEM Forms Java library files
Determine PDF/A compliancy by using the Java API:
Include project files
Include client JAR files, such as adobe-docconverter-client.jar, in your Java project’s class path.
Create a DocConvert client
ServiceClientFactory
object that contains connection properties.DocConverterServiceClient
object by using its constructor and passing the ServiceClientFactory
object.Reference a PDF document used to determine PDF/A compliancy
java.io.FileInputStream
object that represents the PDF document to convert by using its constructor and passing a string value that specifies the location of the PDF file.com.adobe.idp.Document
object by using its constructor and passing the java.io.FileInputStream
object.Set run-time options
PDFAValidationOptionSpec
object by using its constructor.PDFAValidationOptionSpec
object’s setCompliance
method and passing PDFAValidationOptionSpec.Compliance.PDFA_1B
.PDFAValidationOptionSpec
object’s setLogLevel
method and passing a string value that specifies the tracking level. For example, pass the value FINE
. For information about the different values, see the setLogLevel
method in the AEM Forms API Reference.Retrieve information about the PDF document
Determine PDF/A compliancy by invoking the DocConverterServiceClient
object’s isPDFA
method and passing the following values:
com.adobe.idp.Document
object that contains the PDF document.PDFAValidationOptionSpec
object that specifies run-time options.The isPDFA
method returns a PDFAValidationResult
object that contains the results of this operation.
See also
Quick Start (SOAP mode): Determining PDF/A compliancy using the Java API
Including AEM Forms Java library files
Determine PDF/A compliancy by using the web service API:
Include project files
Create a DocConvert client
DocConverterServiceService
object by invoking its default constructor.DocConverterServiceService
object’s Credentials
data member with a System.Net.NetworkCredential
value that specifies the user name and password value.Reference a PDF document used to determine PDF/A compliancy
BLOB
object by using its constructor. The BLOB
object is used to store the PDF document that is converted to a PDF/A document.System.IO.FileStream
object by invoking its constructor and passing a string value that represents the file location of the PDF document and the mode to open the file in.System.IO.FileStream
object. You can determine the size of the byte array by getting the System.IO.FileStream
object’s Length
property.System.IO.FileStream
object’s Read
method and passing the byte array, the starting position, and the stream length to read.BLOB
object by assigning its binaryData
property with the contents of the byte array.Set run-time options
PDFAValidationOptionSpec
object by using its constructor.PDFAValidationOptionSpec
object’s compliance
data member with the value PDFAConversionOptionSpec_Compliance.PDFA_1B
.PDFAValidationOptionSpec
object’s resultLevel
data member with the value PDFAValidationOptionSpec_ResultLevel.DETAILED
.Retrieve information about the PDF document
Determine PDF/A compliancy by invoking the DocConverterServiceService
object’s isPDFA
method and passing the following values:
BLOB
object that contains the PDF document.PDFAValidationOptionSpec
object that contains run-time options.The isPDFA
method returns a PDFAValidationResult
object that contains the results of this operation.
See also
Invoking AEM Forms using Base64 encoding
Creating a .NET client assembly that uses Base64 encoding