Other Page Content Application Programming Interfaces

The following Application Programming Interface functions to Image to PDF affect the make-up of a page in the produced PDF document:

  I2PDF_ImageStamp
Parameters: image - must be one of the following image types: JPG, TIF, PNG, GIF, BMP, EMF, WMF, PCX or TGA
verticalPosition - must be one of the following: VERTICAL_ALIGNMENT_TOP (1), VERTICAL_ALIGNMENT_MIDDLE (2) or VERTICAL_ALIGNMENT_BOTTOM (3)
horizontalPosition - must be one of the following: HORIZONTAL_ALIGNMENT_LEFT (1), HORIZONTAL_ALIGNMENT_CENTER (2) or HORIZONTAL_ALIGNMENT_RIGHT (3)
margin - must be a value between 0.0 and 100.0 points inclusive
Return Value: 0 - success
1 - invalid image parameter
2 - invalid verticalPosition parameter
3 - invalid horizontalPosition parameter
3 - invalid margin parameter
Notes:
  • Specifies the name and location of an image that is "stamped" at the specified location on each page of the output PDF document.
  • A margin between the image stamp and the edge of the PDF page can be specified (this does NOT affect the size of the image on the page - it just allows the image stamp to be inset from the edge of the image).
  • If a multi-image TIFF or animated GIF is used, only the first image in the TIFF or the first animation frame of the GIF is shown.
  • 1 point is 1/72 inch.

  •   I2PDF_ImageStamp_Int
    Parameters: image - must be one of the following image types: JPG, TIF, PNG, GIF, BMP, EMF, WMF, PCX or TGA
    verticalPosition - must be one of the following: VERTICAL_ALIGNMENT_TOP (1), VERTICAL_ALIGNMENT_MIDDLE (2) or VERTICAL_ALIGNMENT_BOTTOM (3)
    horizontalPosition - must be one of the following: HORIZONTAL_ALIGNMENT_LEFT (1), HORIZONTAL_ALIGNMENT_CENTER (2) or HORIZONTAL_ALIGNMENT_RIGHT (3)
    margin - must be an integer value between 0 and 100 points inclusive
    Return Value: 0 - success
    1 - invalid image parameter
    2 - invalid verticalPosition parameter
    3 - invalid horizontalPosition parameter
    3 - invalid margin parameter
    Notes:
  • Specifies the name and location of an image that is "stamped" at the specified location on each page of the output PDF document.
  • A margin between the image stamp and the edge of the PDF page can be specified (this does NOT affect the size of the image on the page - it just allows the image stamp to be inset from the edge of the image).
  • If a multi-image TIFF or animated GIF is used, only the first image in the TIFF or the first animation frame of the GIF is shown.
  • 1 point is 1/72 inch.

  •   I2PDF_StampURL
    Parameters: url - can be up to 128 characters long and should include the Internet protocol, eg http://
    Return Value: 0 - success
    1 - invalid url parameter
    Notes:
  • Specifies the URL that the image stamp will open in the default browser when it is clicked on.

  •   I2PDF_SetBorder
    Parameters: left - amount of space (from 0.0 to 500.0 points) between the image left hand side and the edge of the PDF page
    top - amount of space (from 0.0 to 500.0 points) between the image top side and the edge of the PDF page
    right - amount of space (from 0.0 to 500.0 points) between the image right hand side and the edge of the PDF page
    bottom - amount of space (from 0.0 to 500.0 points) between the image bottom side and the edge of the PDF page
    Return Value: 0 - success
    1 - left value is invalid
    2 - top value is invalid
    3 - right value is invalid
    4 - bottom value is invalid
    Notes:
  • Allows a border to be inserted between the image and the edge of the PDF page.
  • The border color can be specified by using one of the three I2PDF_SetBorderColor_Real/Int/Web APIs below.
  • This can be useful if you want to add an image stamp to each page but do not want it to obscure the image.
  • 1 point is 1/72 inch.

  •   I2PDF_SetBorder_Int
    Parameters: left - amount of space (from 0 to 500 points) between the image left hand side and the edge of the PDF page
    top - amount of space (from 0 to 500 points) between the image top side and the edge of the PDF page
    right - amount of space (from 0 to 500 points) between the image right hand side and the edge of the PDF page
    bottom - amount of space (from 0 to 500 points) between the image bottom side and the edge of the PDF page
    Return Value: 0 - success
    1 - left value is invalid
    2 - top value is invalid
    3 - right value is invalid
    4 - bottom value is invalid
    Notes:
  • Allows a border to be inserted between the image and the edge of the PDF page.
  • The border color can be specified by using one of the three I2PDF_SetBorderColor_Real/Int/Web APIs below.
  • This can be useful if you want to add an image stamp to each page but do not want it to obscure the image.
  • 1 point is 1/72 inch.

  •   I2PDF_SetBorderColor_Real
    Parameters: red - red color component (from 0.0 to 1.0)
    green - green color component (from 0.0 to 1.0)
    blue - blue color component (from 0.0 to 1.0)
    Return Value: 0 - success
    1 - red value is invalid
    2 - green value is invalid
    3 - blue value is invalid
    Notes:
  • Color is made up of a combination of three components: red, green and blue.
  • The value of each color component controls how much of that color is displayed, with a value of 0.0 representing none up to a value of 100.0 representing the maximum value.
  • Click here for more information and examples of real colors.

  •   I2PDF_SetBorderColor_Int
    Parameters: red - red color component (from 0 to 255)
    green - green color component (from 0 to 255)
    blue - blue color component (from 0 to 255)
    Return Value: 0 - success
    1 - red value is invalid
    2 - green value is invalid
    3 - blue value is invalid
    Notes:
  • Color is made up of a combination of three components: red, green and blue.
  • The value of each color component controls how much of that color is displayed, with a value of 0 representing none up to a value of 255 representing the maximum value.
  • Click here for more information and examples of integer colors.

  •   I2PDF_SetBorderColor_Web
    Parameters: color - specified as a hexadecimal string (from #000000 to #FFFFFF)
    Return Value: 0 - success
    1 - color value is invalid
    Notes:
  • Color is made up of a combination of three components: red, green and blue.
  • Web colours are specified by using three pairs of hexadecimal digits, if you have ever seen a tutorial on HTML for creating web pages then the chances are that you have come across this method of specifying color.
  • The value of each color component controls how much of that color is displayed, with a value of 00 representing none up to a value of FF representing the maximum value.
  • Click here for more information and examples of web colors.