Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.adobe.pdf
Interface PDFImage

public interface PDFImage

PDFImage defines a public interface for exporting or importing image XMP metadata.

Each image in a PDF document is represented by a PDFImage object. You can obtain a list of PDFImage objects through a java.util.List object, which is created by calling the getImages method of a PDFDocument object.

For information about how to export or import image XMP metadata, including example code, see the Developer Guide.

The PDFImage interface defines the methods described in this section.

See Also:
  `PDFDocument`

Method Summary
`java.io.InputStream` | `exportXMP()` Exports the XMP metadata associated with an image.
`void` | `importXMP(java.io.InputStream metadata)` Imports the XMP metadata to associate with an image.

Method Detail

### exportXMP

    public java.io.InputStream exportXMP()
                                  throws java.io.IOException,
                                         PDFException

  Exports the XMP metadata associated with an image.

  Returns:
    A java.io.InputStream object that references the image XMP metadata. The metadata is returned as a stream of bytes. This operation does not modify the exported metadata in any way.
  Throws:
    `java.io.IOException` - If the java.io.InputStream object could not be created.
    `PDFException` - If a PDF exception is raised. For more information, see the API Reference.

### importXMP

    public void importXMP(java.io.InputStream metadata)
                   throws java.io.IOException,
                          PDFException

  Imports the XMP metadata to associate with an image. A Java input stream must be able to reference the XMP source (for example, an XML file or an XML data stream).

  Note: XML/PDF Access API for Java does not validate the XMP input; it determines whether the input is well-formed XML. However, the application is responsible for ensuring that the XMP stream to import is meaningful and correct.

  Parameters:
    `metadata` - A java.io.InputStream object that represents the image XMP metadata to import.
  Throws:
    `java.io.IOException` - If the XMP input is not well-formed.
    `PDFException` - If a PDF exception is raised. For more information, see the API Reference.

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD