Required Application Programming Interfaces

The following Application Programming Interface functions to Image to PDF are always required:

  I2PDF_License
Parameters: code - required to remove the "Evaluation Mode" message that is stamped over the top of every page in the output PDF document
Return Value: None
Notes:
  • When you purchase an Image to PDF Dynamic Link Library license you will receive your unique license code via email - simply copy & paste this as the code parameter to this function. To purchase a license code please visit the Image to PDF DLL Utility Warrior web page which has the latest information and prices on the licenses that are available

  •   I2PDF_AddImage
    Parameters: image - must be one of the following image types: JPG, TIF, PNG, GIF, BMP, WMF, EMF, PCX or TGA
    Return Value: 0 - success
    1 - invalid parameter
    2 - maximum number of images already added
    3 - invalid image type
    4 - image does not exist
    Notes:
  • Specifies the name and location of an image to embed within the output PDF document.
  • Up to 1000 images can be included.
  • Images are embedded in the output PDF document in the order that they are referenced.
  • Multi-image TIFF images are supported so that each image within the TIFF is placed on their own PDF page.
  • Animated GIF images are supported so that each frame within the animated GIF is placed on their own PDF page.
  • WMF and EMF image meta files are rendered into an image - any text that was in them is also rendered into the image (unless you use the I2PDF_MetaToNativePDF API) which means that this text will not be searchable text in the output PDF.
  • Image filenames can contain the wildcard characters * and ? that allow multiple images to be referenced in one go. These characters can only be in the filename and not in any part of the filepath before the filename.

  •   I2PDF_AddImageBookmark
    Parameters: image - must be one of the following image types: JPG, TIF, PNG, GIF, BMP, WMF, EMF, PCX or TGA
    bookmark name - specifies the bookmark name to be shown in the outline. A maximum of 256 characters can be used.
    Return Value: 0 - success
    1 - invalid image parameter
    2 - maximum number of images already added
    3 - invalid image type
    4 - invalid bookmark name parameter
    5 - image does not exist
    Notes:
  • Specifies the name and location of an image to embed within the output PDF document.
  • Up to 1000 images with bookmarks can be included.
  • Using this API will ensure that an outline is created for the PDF and if the I2PDF_SetOutline API is also specified then the bookmark name specified will override the automatic outline bookmark name that would have been used.
  • You can still use the I2PDF_AddImage API and mix it in any order with I2PDF_AddImageBookmark API - images added using this other API will have default bookmark names if the I2PDF_SetOutline API has been specified - or no bookmark names otherwise.
  • Images are embedded in the output PDF document in the order that they are referenced.
  • Multi-image TIFF images are supported so that each image within the TIFF is placed on their own PDF page.
  • Animated GIF images are supported so that each frame within the animated GIF is placed on their own PDF page.
  • WMF and EMF image meta files are rendered into an image - any text that was in them is also rendered into the image (unless you use the I2PDF_MetaToNativePDF API) which means that this text will not be searchable text in the output PDF.
  • Currently it is not possible to specify filenames that contain wildcard characters - if you do the bookmark name will be ignored.

  •   I2PDF_MakePDF
    Parameters: output - specifies the name and location of the output PDF document
    options - must be one or more of the following:
    OPTION_NONE (0)
    OPTION_OPEN_PDF (1) - open produced PDF in default PDF viewer
    OPTION_RESET (2) - resets all settings apart from the License Code
    errorText - pre-allocated string/byte array buffer that any internal PDF generation error is returned into
    errorMaxLen - maximum error text buffer length
    Return Value: 0 - success
    1 - invalid parameter
    2 - output pdf could not be opened
    3 - internal PDF generation error - error description returned in errorText
    4 - PDF file already exists and could not be overwritten - it is possibly being held open by a PDF viewer application
    5 - no images have been added
    Notes:
  • Generate the output PDF according to the settings already selected through the Application Programming Interface functions.
  • Note: When this has been called, all previous settings made (apart from the License Code) are reset ready for the settings to be made for the next PDF that is to be generated.