ImageReference
Kind: class
Module/package: com.pdfdancer.client.rest
SDK: com.pdfdancer.client:pdfdancer-client-java 2.0.0
Reference to an image in a PDF document with transformation capabilities.
Declaration
public class com.pdfdancer.client.rest.ImageReference extends com.pdfdancer.client.rest.BaseReference
Members
constructor
public com.pdfdancer.client.rest.ImageReference(com.pdfdancer.client.rest.PDFDancer, com.pdfdancer.common.model.ObjectRef)
crop
public com.pdfdancer.common.response.CommandResult crop(int, int, int, int)
Crops this image by trimming pixels from each edge.
fillRegion
public com.pdfdancer.common.response.CommandResult fillRegion(int, int, int, int, com.pdfdancer.common.model.Color)
Fills a rectangular pixel region of the image with a solid color.
flip
public com.pdfdancer.common.response.CommandResult flip(com.pdfdancer.common.request.ImageTransformRequest$FlipDirection)
Flips this image in the specified direction.
flipHorizontal
public com.pdfdancer.common.response.CommandResult flipHorizontal()
Flips this image horizontally (mirror left-right).
flipVertical
public com.pdfdancer.common.response.CommandResult flipVertical()
Flips this image vertically (mirror top-bottom).
getAspectRatio
public java.lang.Double getAspectRatio()
Returns the aspect ratio (width/height) of the image.
getHeight
public java.lang.Double getHeight()
Returns the height of the image from its bounding rect.
getWidth
public java.lang.Double getWidth()
Returns the width of the image from its bounding rect.
opacity
public com.pdfdancer.common.response.CommandResult opacity(double)
Sets the opacity of this image.
replace
public com.pdfdancer.common.response.CommandResult replace(com.pdfdancer.common.model.Image)
Replaces this image with a new image from a file.
replace
public com.pdfdancer.common.response.CommandResult replace(java.io.File) throws java.io.IOException
Replaces this image with a new image from a file.
rotate
public com.pdfdancer.common.response.CommandResult rotate(double)
Rotates this image by the specified angle.
scale
public com.pdfdancer.common.response.CommandResult scale(double)
Scales this image by a factor.
scaleTo
public com.pdfdancer.common.response.CommandResult scaleTo(com.pdfdancer.common.model.Size, boolean)
Scales this image to a target size.
scaleTo
public com.pdfdancer.common.response.CommandResult scaleTo(com.pdfdancer.common.model.Size)
Scales this image to a target size, preserving aspect ratio.
scaleTo
public com.pdfdancer.common.response.CommandResult scaleTo(double, double, boolean)
Scales this image to a target width and height.
scaleTo
public com.pdfdancer.common.response.CommandResult scaleTo(double, double)
Scales this image to a target size.