Command Line

Xinc can generate PDF files from a command line, a batch file, or a shell script. To invoke Xinc from a command line enter pathName/xinc. In windows this would typically be "c:\Program Files\Xinc\xinc". If you add the Xinc installation directory to your path, you can simply type 'xinc'. The rest of this document assumes that you have added Xinc to your path.. If no arguments are specifed, a help message is displayed.

Example 1:

xinc -fo http://www.lunasil.com/samples/helloworld.fo -pdf /tmp/test.pdf

This causes Xinc to format the helloworld.fo document and output the PDF file to test.pdf. Since the -fo option was used, Xinc assumes that the helloworld.fo document is valid XSL-FO. No XSLT processing is done on the document.

Example 2:

xinc -xml http://www.lunasil.com/samples/Sample.xml -xsl http://www.lunasil.com/samples/Sample.xslt -pdf /tmp/test.pdf

This causes Xinc to do an XSLT transformation on Sample.xml using Sample.xslt as the stylesheet. Xinc processes the resulting XML (which is assumed to be valid XSL-FO) and generates the PDF output file, test.pdf.

Example 3:

xinc -fo /dev/test/table1.fo -pdf /tmp/test1.pdf -fo /dev/test/table2.fo -pdf /tmp/test2.pdf

This example demonstrates how to format multiple files at a time.

Example 4:

xinc -fo /dev/test/table1.fo -print

This example demonstrates how to print a file.

Invoking Xinc directly

On Windows platforms Xinc is usually invoked via a launcher which is created using InstallAnywhere. The launcher is Xinc.exe. On Linux/Unix platforms, you will need to use the shell scripts located in the xinc/bin/unix directory.

Sample batch files and shell scripts are included in the install for both Windows and Unix/Linux platforms. Look in the bin/windows or bin/unix directories. They are located in the directory you chose to install Xinc in. For example, in Windows, the samples would be in "c:\Program Files\Xinc\bin\windows" and "c:\Program Files\Xinc\bin\unix".