Other Page Content Commands

The following command line arguments to Image to PDF affect the make-up of a page in the produced PDF document:

  -ImageStamp
Parameters: image filename - specifies the name and location of the image to stamp on top of each page within the output PDF document, if spaces are required in the filepath then enclose it within quotes.
vertical alignment - must be one of the following values:
  • Top
  • Middle
  • Bottom

  • horizontal alignment - must be one of the following values:
  • Left
  • Center
  • Right

  • margin alignment - must be between 0.0 and 100.0 points inclusive (this is not used if the alignment is Middle and Center).
    Notes:
  • An image stamp can be one of the following types: JPEG/JPG, TIFF/TIF, PNG, GIF, BMP, WMF, EMF, TGA or PCX.
  • This command 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 page can be specified if required.
  • 1 point is 1/72 inch.

  •   -MetaStampImageMaxMP
    Parameters: max megapixel size - specifies the meta image (EMF or WMF) maximum rendering size for an image stamp and must be a value between 0.1 and 20.0 inclusive.
    Notes:
  • Meta image files can often be authored at very high resolutions (sometimes in excess of 10,000 units for both the width and height) and this would lead to very large converted image sizes. To combat this it is possible to set the maximum total area of the rendered image as a value in megapixels (similar to the way that digital cameras have their resolutions quoted). If a meta image file's width x height is greater than the specified number of mega pixels then it is re-sized to be within this value. It is important to note that this "re-size" is actually a meta image file rendering transformation and not a "re-size" in the strictest sense (see the -MetaStampImageScale command below for this option).

  • Here is a list of common mega pixel sizes and an example of an image size that just fits within this limit:
  • 1.3 = 1300 x 1000
    2.2 = 1800 x 1200
    3.1 = 2000 x 1600
    4.3 = 2400 x 1800
    5.3 = 2700 x 2000
    6.1 = 2900 x 2200
    8.2 = 3400 x 2500
    10.0 = 3700 x 2800
  • The default setting is 1.0

  •   -MetaStampImageScale
    Parameters: percentage - specifies the meta image (EMF or WMF) scaling factor for an image stamp and must be a value between 1.0 and 100.0 inclusive.
    Notes:
  • In some circumstances rendering a meta image file at a lower resolution by using a lower value for the -MetaStampImageMaxMP can result in images whose lines and text look "jagged". In these cases you could try using a higher resolution -MetaStampImageMaxMP and then re-sizing (or scaling) the resultant image with this command. This will have the effect of smoothing (or anti-aliasing) these "jagged" items.

  • The default setting is 33.3 - ie scaled to one third of it's rendered size.

  •   -StampURL
    Parameters: url - can be up to 128 characters long (and should include the protocol, eg http://, ftp:// etc).
    Notes:
  • This command specifies the URL that the ImageStamp will open in the default web browser when it is clicked on.

  • This command is optional and does NOT have to be used with the ImageStamp command.

  •   -Border
    Parameters: width - must be between 0.0 and 500.0 points inclusive.
    Notes:
  • This will add an equal border between each side of an image and the edge of the PDF page.
  • 1 point is 1/72 inch.

  •   -BorderLeft
    Parameters: width - must be between 0.0 and 500.0 points inclusive.
    Notes:
  • This specifies the border between the left side of an image and the edge of the PDF page.
  • 1 point is 1/72 inch.

  •   -BorderTop
    Parameters: width - must be between 0.0 and 500.0 points inclusive.
    Notes:
  • This specifies the border between the top edge of an image and the edge of the PDF page.
  • 1 point is 1/72 inch.

  •   -BorderRight
    Parameters: width - must be between 0.0 and 500.0 points inclusive.
    Notes:
  • This specifies the border between the right side of an image and the edge of the PDF page.
  • 1 point is 1/72 inch.

  •   -BorderBottom
    Parameters: width - must be between 0.0 and 500.0 points inclusive.
    Notes:
  • This specifies the border between the bottom edge of an image and the edge of the PDF page.
  • 1 point is 1/72 inch.

  •   -BorderColor
    Parameters: color - can be specified in one of the following three ways, just choose the method that you are most comfortable with:
  • #RRGGBB - HTML color specification, uses hexadecimal notation to define the amount of red (RR), green (GG) and blue (BB) in a color. These values are between 0 (hexadecimal 00) and 255 (hexadecimal FF) inclusive. Click here for more information and examples with hexadecimal colors.
  • R G B - decimal colour specification, uses normal decimal notation to define the amount of red (RRR), green (GGG) and blue (BBB) in a color. These values are between 0 and 255 inclusive. Click here for more information and examples with decimal colors.
  • R.R G.G B.B - real colour specification, used real number notation to define the amount of red (R.R), green (G.G) and blue (B.B) in a color. These values are between 0.0 and 1.0 inclusive. Click here for more information and examples with real colors.
  • Notes: This specifies the color of the border that is shown between the image and the edge of the PDF page.


      -BackgroundImage
    Parameters: image - must be one of the following image types: JPG or PNG (the following will be in a future release: TIF, PNG, GIF, BMP, WMF, EMF, PCX, TGA)
    Notes:
  • Specifies the name and location of an image that will become the background image on every page with all other images placed on top of it according to the settings of -PageImageAlignment and -OffsetToBackgroundImage.
  • This overrides any setting specified by -PageSize.

  •   -BackgroundImageDPI
    Parameters: dpi - integer between 9 and 2880 inclusive
    Notes:
  • PDF documents use a default resolution setting of 72 DPI. Images created for screen display under Windows will probably have a resolution of 96 DPI. If you have created images for printing then you will probably need to use 300 or 600 DPI. If you do not adjust the default resolution setting then when displayed within a PDF document on screen a 96 DPI image will appear 25% larger than expected. This gets much worse for a 300 DPI image which will appear 416% larger than expected.
  • Please note that if this is not specified then the actual DPI recorded in the background image file is used.
  • We recommend that you do not use this and instead rely on the actual DPI of the background image.

  •   -OffsetToBackgroundImage
    Parameters: x - integer between 0 and 1000 points inclusive
    y - integer between 0 and 1000 points inclusive
    Notes:
  • Allows space to be inserted between the image and the edge of the PDF page.
  • This can be useful if you want to super-impose some generated content in the correct position on the page with respect to the background image which may be a scan of some headed paper.
  • This offset is applied after any settings specified by -PageImageAlignment
  • 1 point is 1/72 inch.

  •   -FitImageToPageSize
    Parameters: None
    Return Value: None
    Notes:
  • This command is used to force the image to be scaled to fit the page size (accounting for any borders set) defined by the -PageSize command.