Version 20 of PDF

Updated 2003-12-01 19:43:15

PDF is an initialism (versus an acronym, which is slightly different...) for "Portable Document Format", a file format created by Adobe [L1 ]. CL maintains a page [L2 ] on the subject.

While there's no Tcl-specific broadly-applicable PDF library as of summer 2003, PDFlib [L3 ] supports Tcl among several other language bindings. Notice at the heart of PDFlib's licensing [L4 ] this summary: "You may test and fully include our software in your projects, but you need a valid license key to remove the 'www.pdflib.com' demo stamp on all generated pages."

Perl and Python have much stronger PDF stories to tell (see [L5 ], for example), and, of course, Tcl has ways to exploit anything available through those languages, including Tclperl and Tclpython.


Clif Flynt worked on generating PDFs from Tcl.

Lars H has written a pure Tcl package writepdf (see [L6 ] and its parent directory) that can generate well-formed PDF files. The API is roughly at the same level of abstraction as writing raw postscript with puts, so you need to be familiar with the PDF specification to use it.

It would be great to have something sitting on top of writepdf which can generate correct pdf from a text widget and a canvas...It seems like this ought to be possible in pure Tcl.


2003-11-25 VI The PDF specifications are at http://partners.adobe.com/asn/tech/pdf/specifications.jsp

While there are relatively few direct Tcl-PDF connections as of late 2001, "pdf417_encode [L7 ] converts ASCII strings into pdf417 barcode". NOTE: PDF417 barcodes have nothing whatsoever to do with Adobe's Portable Document Format.


 What: TEItools
 Where: http://xtalk.price.ru/SGML/TEItools/
 Description: Collection of Tcl and other tool scripts used for
        transforming SGML documents to various other formats.  Currently
        supports HTML, LaTeX2e, RTF, PS, and PDF.  Uses CoST.
 Updated: 04/1998
 Contact: mailto:[email protected]

 What:  WELD
 Where: http://www.javafoundry.com/javapdf
 Description: Web Enabled Logic Documents (WELD) make use of Jacl/Tcl to
        provide the ability to hold WWW applications together.  WELD is
        a part of JavaPDF (the open source servlet utilities project).
 Updated: 08/2001
 Contact: mailto:[email protected] (Lee T  Hall)

 What: pdflib
 Where: http://www.pdflib.com/
 Description: PDFLib is an ANSI C library for creating new PDF files.
        Bindings for a number of languages, including Tcl, are available.
        This package is not designed to access and update existing PDF
        files.
 Updated: 11/1999
 Contact: mailto:[email protected]



Sven Sass's employer generates PDF by way of Java classes converting Docbook to FO to PDF (!).


The most immediate contact between PDF and Tk probably is by way of PS, the "output" format for canvases. Clif Flynt has "a subset of a Tcl canvas->PDF script ... [which] does lines, text, and nested canvases" in the starkit at http://noucorp.com/postcard .

Another well-worn pathway involves transforming HTML to PDF.


GS (031129) There is a simple C source code to convert text file in PDF at http://wwwvms.mppmu.mpg.de/vmssig/src/c/TXT2PDF.C


Category Acronym | Category Documentation