#!/usr/bin/perl use strict; use warnings; use CAM::PDF; my $pdf = CAM::PDF->new('test.pdf'); my $pagecontent = $pdf->getPageContent(1); # $pagecontent now holds the text within the first page. # say I want to replace the word Release with Distribution. $pagecontent =~ s/Release/Distribution/; $pdf->setPageContent(1, $pagecontent); $pdf->cleanoutput('test_replace.pdf');