Skip to main content

OutputIntent Class

An output intent that specifies the color characteristics of the intended output device.

Declaration

public class OutputIntent extends JavaObject

Remarks

An output intent contains an ICC profile (a destination output profile) for an output device or production condition. PDF/A requires an output intent if the document uses device-dependent colors (DeviceRGB, DeviceCMYK, or DeviceGray).

Call the PdfDocument.getOutputIntents() method to access output intents of a document.

Refer to the following help topic for additional information: Convert and Validate PDF/A and PDF/UA Documents — PDF Document API for Java.

Example

Get Output Intents of a PDF/A Document

The following code snippet converts a document to PDF/A-2b and prints the output intents of the converted document:

import java.io.*;
import java.nio.file.*;
import com.devexpress.docs.pdf.*;

public class Main {
    public static void main(String[] args) throws Exception {
        try (InputStream inputStream = Files.newInputStream(Path.of("Document.pdf"));
             PdfDocument pdfDocument = new PdfDocument(inputStream)) {
            pdfDocument.convertToPdfA(PdfACompatibility.PDF_A2B);

            for (OutputIntent intent : pdfDocument.getOutputIntents()) {
                System.out.println("Subtype: " + intent.getSubtype());
                System.out.println("Output condition: " + intent.getOutputConditionIdentifier());
                System.out.println("Color components: " + intent.getComponentsCount());
            }
        }
    }
}

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
com.devexpress.system.JavaObject
OutputIntent

Constructors

OutputIntent(String outputConditionIdentifier, byte[] iccProfile, int componentsCount) Constructor

Initializes a new instance of the OutputIntent class with the specified output condition identifier and ICC profile.

Declaration

public OutputIntent(String outputConditionIdentifier, byte[] iccProfile, int componentsCount)

Parameters

Name Type Description
outputConditionIdentifier String

The output condition identifier (for example, sRGB IEC61966-2.1 or FOGRA39).

iccProfile byte[]

The ICC profile data, or null.

componentsCount int

The number of color components in the ICC profile (1 for gray, 3 for RGB, or 4 for CMYK).

Exceptions

Type Description
ArgumentOutOfRangeException

Thrown if the iccProfile value is not null and the componentsCount value is not 1, 3, or 4.

Remarks

The OutputIntent(outputConditionIdentifier, iccProfile, componentsCount) constructor creates a PDF/A output intent (the PDF_A_SUBTYPE subtype).

OutputIntent(String subtype, String outputConditionIdentifier, String outputCondition, String registryName, String info, byte[] iccProfile, int componentsCount) Constructor

Initializes a new instance of the OutputIntent class with the specified subtype, output condition, and ICC profile.

Declaration

public OutputIntent(String subtype, String outputConditionIdentifier, String outputCondition, String registryName, String info, byte[] iccProfile, int componentsCount)

Parameters

Name Type Description
subtype String

The output intent subtype (for example, PDF_A_SUBTYPE).

outputConditionIdentifier String

The output condition identifier (for example, sRGB IEC61966-2.1 or FOGRA39).

outputCondition String

A human-readable description of the output condition.

registryName String

The name of the registry that defines the output condition.

info String

Additional information about the output condition.

iccProfile byte[]

The ICC profile data, or null.

componentsCount int

The number of color components in the ICC profile (1 for gray, 3 for RGB, or 4 for CMYK).

Exceptions

Type Description
ArgumentException

Thrown if the subtype value is null or an empty string.

ArgumentOutOfRangeException

Thrown if the iccProfile value is not null and the componentsCount value is not 1, 3, or 4.

Fields

PDF_A_SUBTYPE Field

The output intent subtype for PDF/A documents.

Declaration

public static final String PDF_A_SUBTYPE

Field Value

Type Description
String

The output intent subtype for PDF/A documents, GTS_PDFA1.

Methods

getComponentsCount() Method

Returns the number of color components in the ICC profile.

Declaration

public int getComponentsCount()

Returns

Type Description
int

The number of color components (1 for gray, 3 for RGB, or 4 for CMYK), or 0 if the output intent does not contain a profile.

getIccProfile() Method

Returns the ICC profile of the output intent.

Declaration

public byte[] getIccProfile()

Returns

Type Description
byte[]

The ICC profile data, or null if the output intent does not contain a profile.

getInfo() Method

Returns additional information about the output condition.

Declaration

public String getInfo()

Returns

Type Description
String

Additional information about the output condition.

getOutputCondition() Method

Returns a human-readable description of the output condition.

Declaration

public String getOutputCondition()

Returns

Type Description
String

The output condition description.

getOutputConditionIdentifier() Method

Returns the output condition identifier.

Declaration

public String getOutputConditionIdentifier()

Returns

Type Description
String

The output condition identifier (for example, sRGB IEC61966-2.1).

getRegistryName() Method

Returns the name of the registry that defines the output condition.

Declaration

public String getRegistryName()

Returns

Type Description
String

The registry name.

getSubtype() Method

Returns the output intent subtype.

Declaration

public String getSubtype()

Returns

Type Description
String

The output intent subtype (for example, GTS_PDFA1 for PDF/A).