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 stepsTo 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 filesInclude 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 LiveCycle is deployed
on JBoss Application Server)
jbossall-client.jar (required if LiveCycle is deployed
on JBoss Application Server)
For information about
the location of these JAR files, see Including LiveCycle Java library files.
Create a DocConvert clientBefore 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 compliancyA 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 optionsYou 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 documentAfter 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.
Determine PDF/A compliancy using the Java APIDetermine 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
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 the java.io.FileInputStream object.
Set run-time options
Create a PDFAValidationOptionSpec object
by using its constructor.
Set the compliance level by invoking the PDFAValidationOptionSpec object’s setCompliance method and
passing PDFAValidationOptionSpec.Compliance.PDFA_1B.
Set the information tracking level by invoking the 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 LiveCycle 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:
The isPDFA method
returns a PDFAValidationResult object that contains
the results of this operation.
Determine PDF/A compliancy using the web service APIDetermine PDF/A compliancy by using the web service API:
Include project files
Create a DocConvert client
Using the Microsoft
.NET client assembly, create a DocConverterServiceService object
by invoking its default constructor.
Set the 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
Create a BLOB object by using its constructor.
The BLOB 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 the System.IO.FileStream object’s Length property.
Populate the byte array with stream data by invoking the System.IO.FileStream object’s Read method
and passing the byte array, the starting position, and the stream
length to read.
Populate the BLOB object by assigning its binaryData property
with the contents of the byte array.
Set run-time options
Create a PDFAValidationOptionSpec object
by using its constructor.
Set the compliance level by assigning the PDFAValidationOptionSpec object’s compliance data
member with the value PDFAConversionOptionSpec_Compliance.PDFA_1B.
Set the information tracking level by assigning the 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:
The isPDFA method
returns a PDFAValidationResult object that contains
the results of this operation.
|
|
|