README file for ClibPDF [1998-11-15 version 1.00]
This version of ClibPDF has been released under Version 1.0 of
FastIO ClibPDF License.

## What is ClibPDF

ClibPDF is a library of ANSI C functions, distributed in source
form, for creating PDF (Acrobat) files directly via C language
programs without relying on any Adobe Acrobat tools and related
products.  It is suitable for fast dynamic PDF Web page generation
in response to user input and real-time data, and also for implementing
publication-quality graph plotting for both on-screen viewing and
printing in any custom application.  Since there is minimal
platform-specific code, it is ideal as cross-platform graphing
solutions with minimal developement efforts.  Generated PDF files
are viewed and printed by auto-launching Adobe Acrobat Reader or
any other PDF viewer available free for many platforms.  Note that
ClibPDF is for PDF file creation only.  It has no support for reading
or editing existing PDF files.

## Notable Features of ClibPDF
- Most basic PDF drawing primitives are supported, plus arc and circle.
- Plot domains (linear, semi-log, log-log) with mesh to give graph
    paper appearance.
- Axes (linear, log, date) with flexible tick marks, numbering, and
    labelling.
- Markers, pointers, error bars for data points.
- Multi-page documents may be generated in any page order, and
    pages may be written in an interleaved manner.
- Support for Flate/Zlib compression for fast web download
    (No need for LZW license from Unisys.)
- In-memory PDF generation (no temp files).
- Transition, timed slide show support.

## Possible Applications
- Fast, light-weight CGI for dynamic PDF web pages generation.
- Report generation in medical, scientific, and industrial
   test equipment (and plots may be used directly in publications).
- Giving legacy console-type applications an attractive
   graphic output via auto-launched Arobat Reader (or any PDF viewer).
- Cross-platform graphing solutions.
- A unified imaging model for X-Window applications for beautiful
   screen AND printed output (no more ugly screen dumps).  This
   eases the pain of the death of DPS (Display PostScript).

## Copyright Notice

Copyright (C) 1998 FastIO Systems, All Rights Reserved.
For conditions of use, license, and distribution, see LICENSE.txt or LICENSE.pdf.

ClibPDF is NOT public domain software.

## License, Copying, and Distribution

ClibPDF is free OR commercial depending on how and by whom it is used.

ClibPDF is free for non-profit personal use, and use by educational,
non-profit, and government organizations.

Commercial license is required for use by for-profit entities (also
refered to as commercial users), including commercial web-site
deployment (including intranet), inclusion in in-house business,
production, manufacturing and research applications, for-profit use
by individuals, inclusion in commercial applications, libraries,
and tools that are sold or bundled with other commercial products.
There is a special deferment provision for shareware developers.
An automatic free 30-day examination period is granted for commercial
users for the purpose of evaluting ClibPDF.


The summary of license terms described above is an overview and is
not legally binding.  Exact and legally accurate details of licensing
terms are described in the file LICENSE.txt or LICENSE.pdf included in
the distribution or at http://www.fastio.com/LICENSE.pdf.

We welcome feedback regarding the feature list, licensing, bugs, and
improvements and any other suggestions.  Please send comments to
clibpdf@fastio.com.

## Compile and Install

[1] Install Adobe Acrobat Reader or a PDF viewer application.
    (Free from http://www.adobe.com/prodindex/acrobat/readstep.html)

[2] Compile and Install library

Please see file README.<platform>, if present, for further platform-specific
details for Mac/PC platforms.

For Unix variants:
  BSDI/Linux/FreeBSD/NEXTSTEP/OPENSTEP/MacOS X Server/SunOS

    cd source
    mv Makefile Makefile.orig
    cp Makefile.<platform> Makefile
    make lib
    make install		(/usr/local/lib and include must be writable)
    make test			(creates testpdf executable)
    ./testpdf
    cd ..
    cd examples
    (compile and run examples)

If Makefile.<platform> does not exist for your platform of choice,
use Makefile.* of the closest variant, and also edit config.h.
Differences should really be minor.  We can't generally help with
specific compiler/linker problems for any given platform.

## Platforms tested so far

-- Unix variants --
BSDI BSD/OS 3.1 (gcc 2.7.2.1)
FreeBSD 2.2.7-STABLE (gcc 2.7.2.1)
Linux 2.0.34 (Red Hat 5.1) (gcc 2.7.2.3)
MacOS X Server (Rhapsody DR2)
NEXTSTEP 3.2, 3.3, OPENSTEP 4.2
SunOS 5.4 / (SUNWspro/SC4.0)

-- PCs --
MacOS 8.1 (Metrowerks IDE 1.7.4) -- See also: README.MacOS8
Windows NT 4.0 (VC++ 5.0) -- See also: README.win32


## Relationships to other software

ClibPDF incorporates a portion of ZLIB Flate compression library.
(C) 1995-1998 Jean-loup Gailly and Mark Adler [See README-zlib]

Jpegsize.c and its header files been taken from the Independent
JPEG Group's software distribution. It is a modified version of rdjpgcom.c.
An image file, testimg.jpg, has also been taken from the JPEG distribution.
Copyright (C) 1994-1997, Thomas G. Lane. [See README-jpeg]

Code from "Technote 1002: On Launching an App with a Document"
from Apple Developer Technical Support (DTS) is used in
cpdfPreview.c.  The original code may be found at:
    http://developer.apple.com/technotes/tn/tn1002.html
Copyright (C) 1995 by Apple Computer, Inc.  All Rights Reserved.

These are the only pieces of code that originate from others.

The rest of the code has been written entirely from scratch, and
is Copyright (C) 1998, FastIO Systems.
Conceptually, ClibPDF has been inspired by Cgraph for PostScript
(http://totoro.berkeley.edu/software/A_Cgraph.html), but it is
much more powerful.  Again, no code from Cgraph (PS) has been used. 

Here are some comparisons with similar libraries.  I don't claim
completeness or impartiality obviously, but I try to be fair.

PDFlib:  There are acutally two PDFlib's, one from Thomas Merz,
and the other from Adobe.

NO part of ClibPDF is derived from or related to either of the
two PDF libraries.  ClibPDF has been written completely independently.
I have seen some documentation for each, but no source code.

[1] Thomas Merz
http://www.ifconnection.de/~tm/software/pdflib/index.html

Thomas Merz's PDFlib is also a source C language library for
dynamic PDF generation.  There is some overlap in functionalities
between PDFlib and ClibPDF.  PDFlib covers PDF generation at a basic
operator level. It has no compression yet, though the documentation
notes that it is planned.

ClibPDF is designed to do much more than PDFlib, and it is primarily
targeted for graph plotting applications with high-level APIs for
plot domains, data markers, and log and linear axes, although it
can be used for any purpose.  ClibPDF can generate multi-page
documents in an arbitrary page order.  Flate/Zlib compression is
supported.

[2] Adobe
http://beta1.adobe.com/ada/acrosdk/libraries.html

Adobe PDF Library, I believe, is distributed in binary form only
with no sources (other than header and examples), thus supported
platforms are limited (in particular, there is no support for Linux
or FreeBSD).  It may be used to write applications that will
create/read/edit PDF files.  I have no idea how easy it is to use.

[3] PDFPerl
http://www.ep.cs.nott.ac.uk/pdf-pl/

If you would rather use PERL scripts, this is for you.
Due to the interpreted nature of PERL, I think this is not going
to be fast (I am curious to see any comparisons).

[4] PDF Library for Java
http://www.retep.org.uk/pdf/
by Peter T Mount.
-----------------------------------------------------------------

Isamu "Sam" Ohzawa

--
ClibPDF and FastIO are trademarks of FastIO Systems.
Adobe, Acrobat, Exchange, and PostScript are tademarks of Adobe
Systems Inc.  All other products or name brands are trademarks
of their respective holders.

