Summary of steps
To convert a PDF document to a PDF/A document, perform the following steps:
- Include project files.
- Create a DocConvert client
- Reference a PDF document to convert to a PDF/A document.
- Set tracking information.
- Convert the document.
- Save the PDF/A document.
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:
- adobe-livecycle-client.jar
- adobe-usermanager-client.jar
- adobe-docconverter-client.jar
- adobe-utilities.jar (required if AEM Forms is deployed on JBoss Application Server)
- jbossall-client.jar (required if AEM Forms is deployed on JBoss Application Server)
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
Convert documents to PDF/A documents using the Java API
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
- Create a
ServiceClientFactory
object that contains connection properties. - Create a
DocConverterServiceClient
object by using its constructor and passing theServiceClientFactory
object.
- Create a
-
Reference a PDF document to convert to a PDF/A document
- Create a
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. - Create a
com.adobe.idp.Document
object by using its constructor and passing thejava.io.FileInputStream
object.
- Create a
-
Set tracking information
- Create a
PDFAConversionOptionSpec
object by using its constructor. - Set the information tracking level by invoking the
PDFAConversionOptionSpec
object’ssetLogLevel
method and passing a string value that specifies the tracking level. For example, pass the valueFINE
. For information about the different values, see thesetLogLevel
method in the AEM Forms API Reference.
- Create a
-
Convert the document
Convert the PDF document to a PDF/A document by invoking the
DocConverterServiceClient
object’stoPDFA
method and passing the following values:- The
com.adobe.idp.Document
object that contains the PDF document to convert - The
PDFAConversionOptionSpec
object that specifies tracking information
The
toPDFA
method returns aPDFAConversionResult
object that contains the PDF/A document. - The
-
Save the PDF/A document
- Retrieve the PDF/A document by invoking the
PDFAConversionResult
object’sgetPDFA
method. This method returns acom.adobe.idp.Document
object that represents the PDF/A document. - Create a
java.io.File
object that represents the PDF/A file. Ensure that the file name extension is .pdf. - Populate the file with PDF/A data by invoking the
com.adobe.idp.Document
object’scopyToFile
method and passing thejava.io.File
object.
- Retrieve the PDF/A document by invoking the
Convert documents to PDF/A documents using the web service API
Convert a PDF document to a PDF/A document by using the DocConverter API (web service):
-
Include project files
- Create a Microsoft .NET client assembly that consumes the DocConverter WSDL.
- Reference the Microsoft .NET client assembly.
-
Create a DocConvert client
- Using the Microsoft .NET client assembly, create a
DocConverterServiceService
object by invoking its default constructor. - Set the
DocConverterServiceService
object’sCredentials
data member with aSystem.Net.NetworkCredential
value that specifies the user name and password value.
- Using the Microsoft .NET client assembly, create a
-
Reference a PDF document to convert to a PDF/A document
- Create a
BLOB
object by using its constructor. TheBLOB
object is used to store the PDF document that is converted to a PDF/A document. - Create a
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. - Create a byte array that stores the content of the
System.IO.FileStream
object. You can determine the size of the byte array by getting theSystem.IO.FileStream
object’sLength
property. - Populate the byte array with stream data by invoking the
System.IO.FileStream
object’sRead
method and passing the byte array, the starting position, and the stream length to read. - Populate the
BLOB
object by assigning itsbinaryData
property with the contents of the byte array.
- Create a
-
Set tracking information
- Create a
PDFAConversionOptionSpec
object by using its constructor. - Set the information tracking level by assigning a value that specifies the tracking level to the
PDFAConversionOptionSpec
object’slogLevel
data member. For example, assign the valueFINE
to this data member.
- Create a
-
Convert the document
Convert the PDF document to a PDF/A document by invoking the
DocConverterServiceService
object’stoPDFA
method and passing the following values:- The
BLOB
object that contains the PDF document to convert - The
PDFAConversionOptionSpec
object that specifies tracking information
The
toPDFA
method returns aPDFAConversionResult
object that contains the PDF/A document. - The
-
Save the PDF/A document
- Create a
BLOB
object that stores the PDF/A document by getting the value of thePDFAConversionResult
object’sPDFADocument
data member. - Create a byte array that stores the content of the
BLOB
object that was returned by using thePDFAConversionResult
object. Populate the byte array by getting the value of theBLOB
object’sbinaryData
data member. - Create a
System.IO.FileStream
object by invoking its constructor and passing a string value that represents the file location of the PDF/A document. - Create a
System.IO.BinaryWriter
object by invoking its constructor and passing theSystem.IO.FileStream
object. - Write the contents of the byte array to a PDF file by invoking the
System.IO.BinaryWriter
object’sWrite
method and passing the byte array.
- Create a
Programmatically Determining PDF/A Compliancy
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.
Summary of steps
To determine PDF/A compliancy, perform the following steps:
- Include project files.
- Create a DocConvert client
- Reference a PDF document used to determine PDF/A compliancy.
- Set run-time options.
- Retrieve information about the PDF document.
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:
- adobe-livecycle-client.jar
- adobe-usermanager-client.jar
- adobe-docconverter-client.jar
- adobe-utilities.jar (required if AEM Forms is deployed on JBoss Application Server)
- jbossall-client.jar (required if AEM Forms is deployed on JBoss Application Server)
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 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
Determine PDF/A compliancy using the Java API
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
- Create a
ServiceClientFactory
object that contains connection properties. - Create a
DocConverterServiceClient
object by using its constructor and passing theServiceClientFactory
object.
- Create a
-
Reference a PDF document used to determine PDF/A compliancy
- Create a
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. - Create a
com.adobe.idp.Document
object by using its constructor and passing thejava.io.FileInputStream
object.
- Create a
-
Set run-time options
- Create a
PDFAValidationOptionSpec
object by using its constructor. - Set the compliance level by invoking the
PDFAValidationOptionSpec
object’ssetCompliance
method and passingPDFAValidationOptionSpec.Compliance.PDFA_1B
. - Set the information tracking level by invoking the
PDFAValidationOptionSpec
object’ssetLogLevel
method and passing a string value that specifies the tracking level. For example, pass the valueFINE
. For information about the different values, see thesetLogLevel
method in the AEM Forms API Reference.
- Create a
-
Retrieve information about the PDF document
Determine PDF/A compliancy by invoking the
DocConverterServiceClient
object’sisPDFA
method and passing the following values:- The
com.adobe.idp.Document
object that contains the PDF document. - The
PDFAValidationOptionSpec
object that specifies run-time options.
The
isPDFA
method returns aPDFAValidationResult
object that contains the results of this operation. - The
Determine PDF/A compliancy using the web service API
Determine PDF/A compliancy by using the web service API:
-
Include project files
- Create a Microsoft .NET client assembly that consumes the DocConverter WSDL.
- Reference the Microsoft .NET client assembly.
-
Create a DocConvert client
- Using the Microsoft .NET client assembly, create a
DocConverterServiceService
object by invoking its default constructor. - Set the
DocConverterServiceService
object’sCredentials
data member with aSystem.Net.NetworkCredential
value that specifies the user name and password value.
- Using the Microsoft .NET client assembly, create a
-
Reference a PDF document used to determine PDF/A compliancy
- Create a
BLOB
object by using its constructor. TheBLOB
object is used to store the PDF document that is converted to a PDF/A document. - Create a
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. - Create a byte array that stores the content of the
System.IO.FileStream
object. You can determine the size of the byte array by getting theSystem.IO.FileStream
object’sLength
property. - Populate the byte array with stream data by invoking the
System.IO.FileStream
object’sRead
method and passing the byte array, the starting position, and the stream length to read. - Populate the
BLOB
object by assigning itsbinaryData
property with the contents of the byte array.
- Create a
-
Set run-time options
- Create a
PDFAValidationOptionSpec
object by using its constructor. - Set the compliance level by assigning the
PDFAValidationOptionSpec
object’scompliance
data member with the valuePDFAConversionOptionSpec_Compliance.PDFA_1B
. - Set the information tracking level by assigning the
PDFAValidationOptionSpec
object’sresultLevel
data member with the valuePDFAValidationOptionSpec_ResultLevel.DETAILED
.
- Create a
-
Retrieve information about the PDF document
Determine PDF/A compliancy by invoking the
DocConverterServiceService
object’sisPDFA
method and passing the following values:- The
BLOB
object that contains the PDF document. - The
PDFAValidationOptionSpec
object that contains run-time options.
The
isPDFA
method returns aPDFAValidationResult
object that contains the results of this operation. - The
Experience Manager
Espressos & Experience Manager: AEM Forms
Espressos & Experience Manager
Thursday, Mar 6, 7:00 PM UTC
Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.
RegisterRapid Feature Releases with AEM Cloud: Telegraph Media Group’s RDE Strategy
Hear how Telegraph Media Group, the award-winning publisher of The Daily Telegraph, The Sunday Telegraph, The Telegraph Magazine,...
Wed, Mar 19, 3:30 PM PDT (10:30 PM UTC)
Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI
Marketers everywhere are feeling the pressure to deliver impactful campaigns faster and at greater scale. This Strategy Keynote explores...
Tue, Mar 18, 2:30 PM PDT (9:30 PM UTC)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more