We all love tech
Posts tagged tutorial
Dynamic PDF Generation with PHP
Oct 11th
In a recent project I needed to build quite a few dynamic pdfs, with information filled from a database. This led me to two great pieces of PHP code, FPDF and FPDI. FPDF allows for building new pdf documents from scratch, while FPDI allows for manipulation of already existing pdf documents. FPDI is an extension of FPDF, so utilizing both is a minor triviality.
FPDF:
FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs. FPDF requires no extension (except zlib to activate compression) and works with PHP4 and PHP5.FPDI:
FPDI extracts and imports single pages of existing documents into FPDF. The resulting PDF created by FPDF/FPDI is a completely new document. Please don’t misunderstand: with FPDI you cannot edit a PDF.
Utilizing FPDF/I I was able to build a 32 page dynamic pdf set over a couple of days. Needless to say, both FPDF and FPDI are very handy tools, and have an amazing amount of potential.
Defragmenting Single Files
Sep 19th
There are numerous Windows disk defraggers out there, including the built in disk defragmenter. Everyone knows what they do and how they work, but one thing they can not do is defragment a single file, making it contiguous on disk. From time to time a user may need to ensure this consistency, usually for the sake of performance. This is exactly what Contig was created for.
Using Contig:
To make an existing file contiguous use Contig as follows:
Usage: contig [-v] [-a] [-q] [-s] [filename]
-v
Use the -v switch to have Contig print out information about the file defrag operations that are performed.
-a
If you want to simply see how fragmented a file or files have become, use the -a switch to have Contig analyze fragmentation.
-q
The -q switch, which over-rides the -v switch, makes Contig run in "quiet" mode, where the only thing it prints during a defrag run is summary information.
-s
Use the -s switch to perform a recursive processing of subdirectories when you specify a filename with wildcards.
For instance, to defragment all DLLs under c:\winnt you could enter "contig -s c:\winnt\*.dll".
To make a new file that is defragmented upon creation, use Contig like this:
Usage: contig [-v] [-n filename length]
From personal experience, a great application for Contig is defragmenting the cover art database on an iPod. This will increase performance dramatically. As always you can go to the Contig homepage, or download it straight from WLT.
Download:
Making the Most of Winamp
Aug 24th
Believe it or not Winamp used to be the internet’s media player of choice. It was extremely versatile while remaining amazingly lightweight. Many years ago the software was picked up by AOL and the player hasn’t been the same since. It is still a fabulous player, but like so many other pieces of software, the majority of it’s features will never be used. So why not get rid of those features? Fortunately Winamp uses a plug-in system, making it easy to trim all the unneeded cruft. So without further ado, let’s get started.
To begin with you are going to (obviously) need Winamp. Additionally, the Essentials pack is a great addition, bringing apple lossless playback amongst other tools.
Fresh Install:
For new Winamp users, we will start with a custom install type. Here are my recommended options. Naturally you should modify these settings to your own preferences, particularly in the portable media player support. If you don’t use Winamp for syncing a media player, disable it completely. Also you will want to remove all ‘Additional Features’.
Pre-existing Install:
For simplicity, it is best to just run the installer again with the options selected. This is much easier than removing each plugin individually.
Winamp Essentials:
For us the primary reason for Essentials is the Apple lossless playback. However for those interested, Essentials definitely has some nice add-ons. In particular many users may find the Time Restore option a nice plugin. There is no image guide for Essentials, as it is completely up to the user what features to select.
Image Walkthrough:
Recent Comments