Roland's homepage

My random knot in the Web

tifftopdf

It is not uncommon for legacy 2D drawings to be scanned and then distributed as black/white TIFF files. While these files are relatively compact, viewing them can be a PITA. The previewer on windows XP (which is what we use at work) is slow. PDF files are much easier to open.

So I wrote a python script to extract data from TIFF files and convert them to PDF format using the tiffinfo and tiff2pdf utilities from libtiff.

When converting multiple files this is done in parallel using as many cores as the machine has.

Source:tifftopdf.py
GPG signature:
——-BEGIN PGP SIGNATURE——-
Version: GnuPG v2

iQIcBAABCAAGBQJUlMLvAAoJEED21dyjijPgaL0QAJo20rHv/TmJkA2fQCkBZO96
VI/+vLo9fJmbmn61yNyS2ToOfKjpNamGlTuXXHDntgtn2sEhAF/+LEnIoP1nsYbn
MFT5b0+ABJnm6OmC9E8RCsCfmu38LZjn6xiBw10zi83+ndEbE75hoL4lSbam2XPV
TORxFjPhl+mXklMEobO/bcCSIpHtVXT1JuW5FnKxE/wX5EwIBUfRn9wPGKAVUZ+y
Y92L80WCwl4YPut8mUhz2qiF3hGqlkMGnOQ940ivM1o8YwbY23gCTRuuPnEKORnf
qhGQ9BDQJdEs1wVcFE8yLkbWP4R8wEWJotDI4/4PZFq+q106oi+p9rGiSBVLN0Ah
bIqkYnSXFLI/0kGoYTai83ZrefcXYxu4zEzpPq6IUblL9fTzmL7iXva3tLF0K+ks
iI3ExERv4MnUAUncialjcldI/Cp/NsyrrhsAO8a+yagbBteSb0OvssKALZKrV1gq
MLrhBdBf1kSjVCwOBje5UoizzuQj5zbHLW3zq+p+ILn4EpuvJ2iCTYkgE1iNTAW2
4weGYAuUjpGd5ScKysvxsbsxJ7VUOwwg9KJUmNSR5cx2MvDvv/RneybSy3hsVe1L
JzG+Dhl0ErbF/iXzWNPV8zTRw73r7xVN5pzgL1TEyMsIWTi1XBe+cnZn3+T+IpYB
+v8F4LY4QtLwkhQFstYt
=h+Et
——-END PGP SIGNATURE——-
SHA256 hash:cb9588988fbb1817e4957554a1e08575db0d7cacf84a011058a2fbd2aee1a989
Requirements:python (version 3), tiffinfo and tiff2pdf from libtiff

Note

creative commons public domain logo

To the extent possible under law, Roland Smith has waived all copyright and related or neighboring rights to tifftopdf.py. This work is published from the Netherlands.


←  Formatting git changelogs for LaTeX TeXcalc  →