DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements
Class BackgroundImage

java.lang.Object
  extended by com.cete.dynamicpdf.PageElement
      extended by com.cete.dynamicpdf.pageelements.TaggablePageElement
          extended by com.cete.dynamicpdf.pageelements.BackgroundImage

public class BackgroundImage
extends TaggablePageElement

This class can be used to place an image on the page that will be stretched to the dimensions of the page.

Licensing:
This class is a DynamicPDF Generator Professional Edition feature, except for the use of 64 bit PNG images (in this case see below). One of the following licenses is required for non-evaluation usage:

Use of 64 bit PNG images with this class is an Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

View Example


Constructor Summary
BackgroundImage(byte[] byteArray)
          Creates a new instance of BackgroundImage class.
BackgroundImage(ImageData imageData)
          Creates a new instance of BackgroundImage class.
BackgroundImage(java.lang.String filePath)
          Creates a new instance of BackgroundImage class.
 
Method Summary
 void draw(PageWriter writer)
          Draws the background image to the given PageWriter object.
 int getBottomPadding()
          Get the bottom padding of the background image.
 ImageData getImageData()
          Get the background image's ImageData object.
 int getLeftPadding()
          Get the left padding of the background image.
 int getRightPadding()
          Get the right padding of the background image.
 int getTopPadding()
          Get the top padding of the background image.
 boolean getUseMargins()
          Get or set a value indicating if the pages margins should be used when calculating the placement of the background image.
 void setBottomPadding(int value)
          Set the bottom padding of the background image.
 void setLeftPadding(int value)
          Set the left padding of the background image.
 void setRightPadding(int value)
          Set the right padding of the background image.
 void setTopPadding(int value)
          Set the top padding of the background image.
 void setUseMargins(boolean value)
          Set or set a value indicating if the pages margins should be used when calculating the placement of the background image.
 
Methods inherited from class com.cete.dynamicpdf.pageelements.TaggablePageElement
getTag, getTagOrder, setTag, setTagOrder
 
Methods inherited from class com.cete.dynamicpdf.PageElement
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackgroundImage

public BackgroundImage(java.lang.String filePath)
                throws java.io.FileNotFoundException
Creates a new instance of BackgroundImage class.

Throws:
java.io.FileNotFoundException - If the physical file path to the background image is notfound.
Parameters:
filePath - The physical file path to the background image.

BackgroundImage

public BackgroundImage(byte[] byteArray)
Creates a new instance of BackgroundImage class.

Parameters:
byteArray - Byte Array containing the image data.

BackgroundImage

public BackgroundImage(ImageData imageData)
Creates a new instance of BackgroundImage class.

Parameters:
imageData - ImageData object containing the image data.
See Also:
ImageData
Method Detail

draw

public void draw(PageWriter writer)
Draws the background image to the given PageWriter object.

Overrides:
draw in class TaggablePageElement
Parameters:
writer - PageWriter object to receive the background image's output.
See Also:
PageWriter

getImageData

public ImageData getImageData()
Get the background image's ImageData object.

Returns:
the image data of the image.

getLeftPadding

public int getLeftPadding()
Get the left padding of the background image.

Returns:
the left padding of the background image.

setLeftPadding

public void setLeftPadding(int value)
Set the left padding of the background image.

Parameters:
value - the left padding of the background image.

getRightPadding

public int getRightPadding()
Get the right padding of the background image.

Returns:
the right padding of the background image.

setRightPadding

public void setRightPadding(int value)
Set the right padding of the background image.

Parameters:
value - the right padding of the background image.

getTopPadding

public int getTopPadding()
Get the top padding of the background image.

Returns:
the top padding of the background image.

setTopPadding

public void setTopPadding(int value)
Set the top padding of the background image.

Parameters:
value - the top padding of the background image.

getBottomPadding

public int getBottomPadding()
Get the bottom padding of the background image.

Returns:
the bottom padding of the background image.

setBottomPadding

public void setBottomPadding(int value)
Set the bottom padding of the background image.

Parameters:
value - the bottom padding of the background image.

getUseMargins

public boolean getUseMargins()
Get or set a value indicating if the pages margins should be used when calculating the placement of the background image.

Returns:
the user margin status.

setUseMargins

public void setUseMargins(boolean value)
Set or set a value indicating if the pages margins should be used when calculating the placement of the background image.

Parameters:
value - the user margin status.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software