PDF4Java Reference Documentation
com.o2sol.pdf4java.graphics Package / PDFCanvas Class / drawImage Method
Collapse All Expand All
In This Topic

drawImage Method
In This Topic
Draws the specified at the specified location and with the specified size.
If width is zero or negative then width is automatically computed in order to keep the original aspect ratio. If height is zero or negative then height is automatically computed in order to keep the original aspect ratio. If both width and height are negative then the image is scaled automatically to fit the given area and the original aspect ratio is kept.
Overload List

Overload | Description
--- | ---
drawImage(PDFImage,double,double,double,double) | Draws the specified at the specified location and with the specified size. If width is zero or negative then width is automatically computed in order to keep the original aspect ratio. If height is zero or negative then height is automatically computed in order to keep the original aspect ratio. If both width and height are negative then the image is scaled automatically to fit the given area and the original aspect ratio is kept.
drawImage(PDFImage,double,double,double,double,double) | Draws the specified at the specified location and with the specified size. If width is zero or negative then width is automatically computed in order to keep the original aspect ratio. If height is zero or negative then height is automatically computed in order to keep the original aspect ratio. If both width and height are negative then the image is scaled automatically to fit the given area and the original aspect ratio is kept.
drawImage(PDFImage,double,double,double,double,double,PDFFlipDirection) | Draws the specified at the specified location and with the specified size. If width is zero or negative then width is automatically computed in order to keep the original aspect ratio. If height is zero or negative then height is automatically computed in order to keep the original aspect ratio. If both width and height are negative then the image is scaled automatically to fit the given area and the original aspect ratio is kept.

See Also

#### Reference

PDFCanvas Class
PDFCanvas Members

© 2025 O2 Solutions All Rights Reserved.

Send comments on this topic.