PDF4Java Reference Documentation
com.o2sol.pdf4java.content.images Package / PDFVisualImage Class / save Method
Destination stream where the image will be saved.
Format used for saving the image.
Collapse All Expand All
In This Topic

save Method
In This Topic
Saves the image to the stream.
Syntax

    public void save(
       Stream stream,
       PDFVisualImageSaveFormat imageSaveFormat
    )

#### Parameters

stream
  Destination stream where the image will be saved.
imageSaveFormat
  Format used for saving the image.

Exceptions

Exception | Description
--- | ---
java.lang.IllegalStateException | When the method is called on an image that has been extracted without its data, PDFContentExtractor.extractImages method has been called using 'false' as its parameter.

See Also

#### Reference

PDFVisualImage Class
PDFVisualImage Members

© 2025 O2 Solutions All Rights Reserved.

Send comments on this topic.