tclhpdf is a Tcl interface to Haru Free PDF Libray.

tclhpdf is written in C and using TEA build system. So it may work with many platforms. I tested it on Windows2000 and tcl8.4/8.5.


  1. Generating PDF files with lines, text, images.
  2. Outline, text annotation, link annotation.
  3. Compressing document with deflate-decode.
  4. Embedding PNG, Jpeg images.
  5. Embedding Type1 font and TrueType font.
  6. Creating encrypted PDF files.
  7. Using various character set (ISO8859-1~16, MSCP1250~8, KOI-8R).
  8. Supporting CJK fonts and encodings.


Version History


How to Use

package require Hpdf
set pdf [hpdf::new]
set font [$pdf getFont "Helvetica"]

set page [$pdf addPage]
$page setSize b5 landscape
$page setFontAndSize $font 64
$page beginText
$page textOut 50 [expr [$page getHeight] - 80] "HELLO WORLD"
$page endText

$pdf saveToFile test.pdf

see also demo files...



Last-modified: 2023-04-18 (Tue) 16:24:28
HTML convert time: 0.010 sec.