(NOTE: GerbLib 3.5 requires GerbMagic 3.6 to work)
GerbLib is a DLL (GerbLib.dll) that exports a group of library functions which can be used to convert Gerber files to PDF, Postscript, TIFF, BMP or RID file formats. With GerbLib, it is easy to develop a customized conversion tool for your own purpose.
The simplest way to convert a Gerber file is to call GbxConvert with the last parameter set to TRUE. In this case GbxConvert does not return until the conversion is finished. For example:
GbxConvert ("foo.gbr", "foo.pdf", TRUE);
This converts foo.gbr to foo.pdf.
Sometimes the Gerber file can be very large, it may take several minutes for the conversion to finish, especially when converting to a raster image format like BMP with high resolution. To avoid hanging your program while waiting for the operation to finish, call GerbConvert with the last parameter set to FALSE. This makes GbxConvert work asynchronously. It starts the operation in the background and returns immediately. You can then call GbxCheckState to check if the operation has finished. You can also call GbxAbort to abort the operation in progress.
GerbLib is a DLL that relies on GerbMagic to do the conversion in the background. To use GerbLib, you need to install GerbMagic 3.6 or later. If GerbMagic has expired on your computer and you want to do more evaluation of the programs, please install both GerbMagic and GerbLib on a new computer.
GerbLib exports a set of functions to manipulate the parameters such as resolution, page width/height. You can also change these parameters from GerbMagic's menu (Run GerbMagic and select "File"=>"System Option").
The list of functions exported by GerbLib is as follows:
For a sample C program that uses GerbLib, see Gbcvt