- Introduction
- Getting Started
- Server Plug-in
- Supported Image Types
- Working with PDF Files
- Example Databases
- Coding Considerations
- Integrating the plug-in
- Runtime Solutions
- Functions
- Credits and Contact
Working with PDF Files
CNS Image alone cannot read PDF files but has the ability to work with a command line program called Ghostscript, which enables this functionality. If you need to Import or Convert From PDF files, you will need to install Ghostscript. If you do not need to Import or Convert From PDF files, installing Ghostscript is not necessary.
Download Ghostscript
Ghostscript is freely available to download, however licensing restrictions prevent us from distributing it with the plug-in.
Windows
http://downloads.ghostscript.com/public/gs902w32.exe
Mac
http://downloads.ghostscript.com/public/ghostscript-8.71-macosx.tar.gz
There may be newer versions of Ghostscript available. To find the latest version available or to download a 64bit Windows version, visit http://ghostscript.com.
Install Ghostscript
Installation of Ghostscript varies depending on your operating system and whether you want to install it on just one computer or distribute it to multiple computers.
Single Computer Installation
Windows
Double-click the .exe file you downloaded in the previous step and follow the installation wizard.
Mac
- If not already expanded, double-click the file you downloaded to expand it. You should then have a folder that resembles Figure 2.
- Find the "gs-8.71-macosx" file in the folder. Note, if you download a different version of Ghostscript, the filename may vary.
- Rename the file to "gs"
- Copy the "gs" file to your Applications folder. Your Applications folder should resemble Figure 3.
Multiple Computer Installation
Check back soon for more information.
Link Ghostscript to CNS Image
In order for CNS Image to use Ghostscirpt, it must know where Ghostscript is installed. By default CNS Image looks for it in the following locations:
Windows
C:\Program Files\gs\gsX.XX\bin\gswin32c.exe
The X.XX represents the version number, and CNS Image will always look for the latest version.
Mac
/Applications/gs
or
/usr/local/bin/gs
If you installed Ghostscript in a different location, you will need to use the CNSImage_SetGSPath function to tell CNS Image where to find Ghostscript. For example:
CNSImage_SetGSPath( "file:/Users/Bob/Documents/GS" )
CNSImage_SetGSPath( "file:/C:/My Documents/gs/gs9.02/bin/gswin32c.exe" )
Note, on Windows, make sure to use the path to the "gswin32c.exe" file and not "gswin32.exe". The "c" in the filename represents "command line", which is the file CNS Image requires.
Providing CNS Image with the path to Ghostscript is session based, so when FileMaker is restarted, the plug-in will not retain the location of Ghostscript. It is a good idea to add logic to the startup script of your database to check for the existence of Ghostscript and tell the plug-in where it is located. Again, the plug-in looks in the default locations above for Ghostscript, so you only need to use CNSImage_SetGSPath if you install it in a non-default location.


