CVS to Subversion Transfer

Most of my projects all use Subversion now, as everyone knows it’s the recommended little brother of CVS. However, for everything that doesn’t have a home in SVN with a client, I was storing in CVS I had running on my local dev machine.

Not wanting to loose any of my files or their histories, I wanted to find a way to transfer everything into subversion. At the recent ZendCon I heard about cvs2svn and I tried it out. It was very easy to install (required Python, which was easy for me to installed through Yum), and it was easy to run - at least for me as I was just pulling everything over.

Now I’ve got everything in subversion and I was able to maintain the file histories for everything.

Tagging & Protecting PDF Files using PHP

I recently had to run some tests on tagging/watermarking an existing PDF file, and then protecting it using php. First, you’ll need to download the proper libraries.

Extract all of those packages, get rid of non-essential files and place most everything in the same folder… “font” and “decoders” will likely be the only folders remaining.

Then, place your existing pdf in the same folder.

Then, create a new php file with the following code. You can modify the message or its position, or you can ready the manuals for the above packages for more options. To set a user/owner password, just add them as the second and third arguments for the SetProtection method (outside the array, which is the first argument).

[PHP]
define(’FPDF_FONTPATH’,'font/’);
require(’FPDI_Protection.php’);

class PDF extends FPDI_Protection
{
function Footer()
{
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont(’Arial’,'I’,8);
//Page number
$msg = “If you’re not ” . $_SERVER['REMOTE_ADDR'] . “, then you’ve stolen our stuff.”;
$this->Cell(0,10,$msg,0,0,’C');
}
}

$pdf= new PDF();

$pagecount = $pdf->setSourceFile(”document.pdf”);

for ($i=1; $i < = $pagecount; $i++) {
$tplidx = $pdf->ImportPage(1);
$pdf->addPage();
$pdf->useTemplate($tplidx,0,0,0);
}

$pdf->SetProtection(array(’print’));
$pdf->Output(”newpdf.pdf”,”I”);
[/PHP]

Bugzilla Changelog Updated

The Bugzilla Changelog application has been updated to work with bugzilla 3.0. Please try it out and let me know if you have any issues.

Download Bugzilla Changelog 1.2.

One Year

I officially began my first full day of web development work under Botsko.net on October 2, 2006. It’s been one year since then and things are going well. I’m still in business with a growing list of larger projects and a great list of clients I’ve really worked well with over the last year.

Since we have a new baby on the way we’re going to be turning my home office into a baby room, at least until we move into a house with four bedrooms. Until then, I’ll be working from a studio downtown along with good clients / great friends Red Studio and Point Creative.

Here’s to a great second year with some exciting projects currently under development.