This sample extracts the text from the input document and saves it as a searchable PDF. The user can also specify a text string to search for by assigning a value to the stringToSearch variable.

You can find the samples in the \samples\snippets\ directory.

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:

  • IMG_save_document(String, byte, int) saves to a searchable PDF file.
  • IMG_decompress_bitmap(String, int) reads in a document in any format and converts it to a valid RasterMaster image.
  • IMGLOW_extract_text(String, int, int, int) extracts text from PTOCA, PCL, PDF, MS Word, AFP, RTF and MSExcel files. It returns the buffer of extracted text in ASCII format.
  • IMGLOW_search_text(byte[], String, int, int, int[]) returns an array of structures of classes of the type SNBD_SEARCH_RESULT.