TCLFPDF, by LAM, is a port of tFPDF("http://www.fpdf.org/en/script/script92.php ") (1.33) from PHP to TCL.
This is a modified class of FPDF("http://www.fpdf.org/ ") (1.85) that adds support for UTF-8.
It is, therefore, a complete update of the previous version of 2014, which maintains backward compatibility, but adds full support for UTF-8.
I have tried to be as faithful as possible to the original, keeping the names and structure of programs.This way it should be possible to port the examples or addons with minimal effort.
Your comments or suggestions are always welcome.
TCLFPDF is hosted in https://github.com/lamuzzachiodi/tclfpdf
2023 - march
YS 2014-11-03: Why did you chose to port this project instead of using pdf4tcl?
LAM 2014-11-03: Actually I started this project to share the library between PHP and Tcl. This was a couple of years ago but it was not until this year that I could complete enough for general use.
DDG 2023-06-23: https://groups.google.com/g/comp.lang.tcl/c/uxA-hdvntOI describes a problem with some type of Gif files and suggests as a workaround converting them to jpeg before including them. Here an example function/use case:
proc convert-to-jpeg {file} { image create photo _tempimage _tempimage read $file _tempimage write mytempfile[file tail [file rootname $file]].jpeg rename _tempimage "" return mytempfile[file tail [file rootname $file]].jpeg } set mytempimage [convert-to-jpeg image.gif] tclfpdf::Image $mytempimage 30 30 file delete $mytempimage
HaO 2024-02-26: Alejandro - great work, I appreciate. Unicode auto-mode and links are features not found in pdf4tcl. Calling exit in the proc "Error" feels quite radical. Maybe, we could replace this be "return -code error $Msg"?