Miscellaneous Commands

The following command line arguments to Image to PDF are miscellaneous commands that do not directly affect the produced PDF document:

  -Options
Parameters: options filename - specifies the name and location of an options file, if spaces are required in the filepath then enclose it within quotes.
Notes:
  • If you need to pass a lot of command line arguments to Image to PDF then the command line can get rather long and unwieldy, and there may be a limit to the amount of data that can be passed. In which case all of the command line arguments can be placed within one or more external files by using as many –Options command.

  • There can be many commands on a line in an options file, or, more conveniently, just one per line – it is up to you.

  • If a line starts with a semi-colon (;) then it is treated as a comment and is skipped. Empty/blank lines are ignored.

  •   -Log
    Parameters: log filename - specifies the name and location of the log file, if spaces are required in the filepath then enclose it within quotes.
    Notes:
  • All information and error messages are appended to the end of the file specified (with a timestamp).

  • This is useful when Image to PDF is being used in a batch mode when there may not always be a person monitoring the progress or results of a conversion.

  • This provides a complete audit log of any failures plus exactly which images are converted into which PDF documents.

  •   -LogImageInfo
    Parameters: None
    Notes:
  • This outputs to the Log file the image width, height, bit depth and DPI for each image that is converted.
  • Bit depth determines the maximum number of colors that an image can use, as follows:
  • 1 = 2 colors
    2 = 4 colors
    4 = 16 colors
    8 = 256 colors
    16 = 65,536 colors
    24 = 16,777,216 colors
    32 = 16,777,216 colors (the additional bits are either unused or possibly used as an alpha channel depending on the image type)
  • Requires the -Log command.

  •   -LogWildcardMatching
    Parameters: None
    Notes:
  • This records the progress of any wildcarded image filename matching and also notes when a file is ignored the reason the file is ignored.
  • This command is usually used to help diagnose problems with image files not being included in a PDF when it may be because they have a system file attribute set that is causing it to be ignored.
  • Requires the -Log command.
  • This command must be used before the first wildcarded image file is specified otherwise the record of the wildcard matching will not be logged.

  •   -LogBatesNumber
    Parameters: None
    Notes:
  • This records each Bates number that is output.
  • Requires the -Log command.

  •   -LogCommands
    Parameters: None
    Notes:
  • This command is primary to aid trouble shooting by outputting to the log file (if it is being produced) all commands together with their parameters (if appropriate) as they are parsed.
  • Requires the -Log command.

  •   -OpenPDF
    Parameters: None
    Notes:
  • When a PDF document is successfully created you can have it open automatically in the default PDF viewer application by including this argument.

  •   -Recurse
    Parameters: None
    Notes:
  • This can ONLY be used in conjunction with wildcard image filenames, eg "C:\*.jpg". When a wildcard image filename is used and the -Recurse command has been specified (BEFORE the wildcarded image has been specified) then this wildcarded image filename is looked for in all sub-directories below the directory containing that image.

  •   -DeleteOnConvert
    Parameters: None
    Notes:
  • When a PDF document has been successfully produced all of the images that were converted into the PDF document are deleted.

  •   -TreatImageNumericExtensionAs
    Parameters: image extension - must be a valid image file extension: ".jpg", ".tif", ".png", ".gif", ".bmp", ".wmf", ".emf", ".tga" or ".pcx"
    Notes:
  • If images are produced using a process which generates sequenced images with numbered extensions eg image.001, image.002 etc this command allows the processing of these images by specifying a valid image extension which should be used in their place.

  •   -TreatTmpExtensionAs
    Parameters: image extension - must be a valid image file extension: ".jpg", ".tif", ".png", ".gif", ".bmp", ".wmf", ".emf", ".tga" or ".pcx"
    Notes:
  • If images are produced using a process which generates images with a TMP file extension this command allows the processing of these images by specifying a valid image extension which should be used in their place.

  •   -TreatExtensionAs
    Parameters: source extension - must be a file extension starting with "." - can be up to 10 characters long.
    target extension - must be a valid image file extension: ".jpg", ".tif", ".png", ".gif", ".bmp", ".wmf", ".emf", ".tga" or ".pcx"
    Notes:
  • If images are produced using a process which generates images with non-standard image file extensions this command allows the processing of these images by specifying a valid image extension which should be used in their place.
  • Up to 100 extension mappings may be defined.

  •   -PreventPDFOverwrite
    Parameters: None
    Notes:
  • Prevents an existing PDF from being overwritten.

  •   -SaveFailureBackupPDF
    Parameters: filename -specifies the name and location of the backup PDF document, if spaces are required in the filepath then enclose it within quotes.
    Notes:
  • Will save the PDF to a backup filename if the required file cannot be written (perhaps because another application has the target PDF currently open).
  • This actually creates the PDF as the backup filename first, then deletes the target PDF (if it exists) and renames the backup PDF file as the required target PDF.

  •   -IncludeTIFFOCRText
    Parameters: None
    Notes:
  • If a TIFF file has had it's image OCR'd using Microsoft Document Imaging then the OCR'd text is stored with the image inside the TIFF file.
  • Using this command any such OCR'd text can be included in the output PDF as "invisible" text that allows the PDF to be searchable.

  •   -SaveTIFFOCRText
    Parameters: text - is an optional parameter and is either the set value FilePerPage which will save the OCR'd text in a file numbered per page or it is the additional text (maximum of 256 characters) between the default two blank lines that are output between pages of text. If spaces are required in the text then enclose it within quotes. Use \n in the text to force a newline to be output.
    Notes:
  • If a TIFF file has had it's image OCR'd using Microsoft Document Imaging then the OCR'd text is stored with the image inside the TIFF file.
  • Using this command any such OCR'd text can be output to a file(s) for external indexing/reference.
  • This file(s) is in the same location as the output PDF and has the same name but with a different file extension. Instead of a .pdf extension it will have a .txt one.
  • Sometimes it is useful to have a more visual separator between page text - try using "\n********** PAGE BREAK **********\n\n"

  •   -LoadImageFailureSkip
    Parameters: None
    Notes:
  • If an image fails to be converted for any reason, then the default action is to abandon the production of the PDF. This does mean that any other images that have already been converted into the PDF or are still to be converted are effectively lost until they are converted in the future. This command allows images that fail to be skipped over so that all valid images are still converted and a PDF produced.
  • However, the only way that you would know about a failure is by an ERROR entry in the log file (see -Log command) or through the use of the -LoadImageFailureCopyTo or -LoadImageFailurePage commands below.

  •   -LoadImageFailureCopyTo
    Parameters: directory - specifies the name and location of the directory to hold copied images. If spaces are required in the directory path then enclose it within quotes.
    Notes:
  • If an image fails to be converted for any reason, then the default action is to abandon the production of the PDF. This does mean that any other images that have already been converted into the PDF or are still to be converted are effectively lost until they are converted in the future. This command allows images that fail to be copied to the specified directory (for a manual or monitoring process to deal with) and this would normally be used in conjunction with -LoadImageFailureSkip or -LoadImageFailurePage so that the image conversion process will continue so that all valid images are still converted and a PDF produced.
  • If the directory does not exist it is created.
  • Image files that are copied will overwrite any existing files with the same filename.

  •   -LoadImageFailurePage
    Parameters: width - specifies the page width. Must be a value between 100.0 and 2000.0 points inclusive.
    height - specifies the page height. Must be a value between 100.0 and 2000.0 points inclusive.
    background 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.

  • message - text (up to 500 characters, if spaces are required in the text then enclose it within quotes) with any combination of special formatting markup characters:
  • FN-NAME inserts the filename of the image.
  • Notes:
  • If an image fails to be converted for any reason, then the default action is to abandon the production of the PDF. This does mean that any other images that have already been converted into the PDF or are still to be converted are effectively lost until they are converted in the future. This command allows images that fail to still have a page in the PDF but with the required message.
  • The message text is displayed approximately one third of the way down the page and is centered.
  • If outlines have been specified (see -Outline) then the image filename is used as the outline name.
  • This uses the default font of 10 point Times-Roman black normal text. To change this use the -LoadImageFailurePageFont command below.
  • 1 point is 1/72 inch.

  •   -LoadImageFailurePageFont
    Parameters: font point size - must be between 1 and 300 inclusive.
    font name - must be one of the following standard PDF fonts (which are also known as base14 fonts):
  • Courier
  • Courier-Bold
  • Courier-BoldOblique
  • Courier-Oblique
  • Helvetica
  • Helvetica-Bold
  • Helvetica-BoldOblique
  • Helvetica-Oblique
  • Times-Roman
  • Times-Bold
  • Times-Italic
  • Times-BoldItalic
  • Symbol
  • ZapfDingbats
    text color - see text style below for an explanation of it's use. This 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.
    text style - must be one of the following:
  • normal - has the text filled in with the required text color
  • stroke - has the text filled in with the required text color and the outline of each letter is "stroked" in the extra color
    extra color - specified if text style is stroke. See above for color specification.
  • Notes:
  • This command is optional and controls the display of the image failure text message.
  • If not specified a default of 10 point Times-Roman black normal text is used.

  •   -MinImageWidth
    Parameters: width - specifies the minimum image width required for an image to be converted.
    Notes:
  • Images whose width is less than the value specified are skipped during the conversion process.
  • This is useful if you have multi-image files (such as TIFFs) that have thumbnail images as well as full-size images within the file and you want to skip over the thumbnails images.
  • The default value is 1.

  •   -MinImageHeight
    Parameters: height - specifies the minimum image height required for an image to be converted.
    Notes:
  • Images whose height is less than the value specified are skipped during the conversion process.
  • This is useful if you have multi-image files (such as TIFFs) that have thumbnail images as well as full-size images within the file and you want to skip over the thumbnails images.
  • The default value is 1.