This sample converts one specified document with a timeout. If a document does not convert within three seconds, then this sample halts the conversion and prints a timeout message. Timeout speed can be adjusted to log in a way that works work best for you.

You can find the samples in the \samples\convert\HangDetector.java directory.

To use this sample, do the following:

  1. Search within the example for the number for milliseconds that you want to use for the timeout. For example, search for 3000.
  2. Search for the file location on your system. For example, \Users\imgs\1234567.pdf
  3. Change the output location in the following line.

After that, you can run the sample like any other. For instructions on running this sample, please see the instructions to Run RasterMaster samples in your IDE or to Run samples from the Command Prompt in the Overview.

Listed below are the methods used in this sample:

  • Snowbnd(int, int, int) is an alternate constructor for the Snowbnd object. This allows the creation of a blank image with allocated memory.
  • IMG_decompress_bitmap(String, int) reads in a document in any format and converts it to a valid RasterMaster image.
  • IMG_save_bitmap(byte, int) saves the current Snowbnd image object to the format specified by comp_type. The string value is the output file.