After looking everywhere TiffToPdf source code, I decided to write my own conversion routine. This is a very simple and direct, it is suitable for my needs.The parameters, we will provide library is the same, the same order, we should provide the command line. I decided to return the favor and put this code in here so that other people need the ability, you can use it. Currently it only supports Tief fax format image files.
You need to CXImage preparation and construction. Only use CXFile / the libtiff function CXImage but CXImage is a very good library anyways.To perform the conversion, I need to command to the Ghostscript through some explanation. I must be converted to Unicode strings to null terminated ANSI string as Ghostscript's. The result is stored in a byte array.
Related knowledge of photo editing software: