Author Topic: Add a stamper on download pdf  (Read 5149 times)


  • Beginner
  • *
  • Posts: 4
Add a stamper on download pdf
« on: May 19, 2009, 12:48:17 pm »
Hi, i don't know if it's the right section for that but i found it was the most appropriate for my question

I want to add the mail of clients purchasing pdf with VirtueMart on the pdf. I look for a lot of things about that and juste find a php script. I'd like to modify it for fitting with VirtueMart download feature.

Is someone is able to tell me if this script can work for the feature i want to add and if it's possible to modify it ? Thanks in advance

// Make sure that the Joomla stuff will not give you a warning saying Restricted access
define( '_VALID_MOS', 1 );

// Include Joomla core stuff
include_once( 'globals.php' );
require_once( 'configuration.php' );
require_once( 'includes/joomla.php' );

if (!$my->id) {
   // In case the user is not loged in redirect him to the index page
   $redirectURL = sprintf("%s/index.php", $mosConfig_live_site);
} else {
     // Incase the user is loged in get name and email address
   $email = $my->email;
    $name = $my->name;
    // The PDF is only included when it needs to be
   // Create new object from CLASS
    $SetaPDF =& new PDF_Wrapper();
   // Create test string
    $stamp = sprintf("My username is %s, and my email address is %s.", $name, $email);
   // Send string to PDF object
    $res = $SetaPDF->StampAndEncrypt('test.pdf', 'D' /* D=Download, F=Filesysten, I=Inline */);


  • Beginner
  • *
  • Posts: 4
Re: Add a stamper on download pdf
« Reply #1 on: May 25, 2009, 16:08:05 pm »
Hi there,

I manage to do my pdf stamp in a local way with fpdf and fpdi. Here's the code for those who are interested with. I'm not a "real" php developper so, perhaps my code is not really "clean".


//Ouverture du pdf existant
$pdf=new fpdi();
$emel = "xxx@xxx.xx";

//Compte le nombre de page du document existant
//Boucle pour afficher chaque page du document
$tplidx = $pdf->ImportPage($nbp);
$pdf->Cell(0,10,'Acheté par '.$emel,0,0,'C');


I'm trying now to find a specific php file in VirtueMart. The one who say that the payement is ok and send a download code. I want to try to include my php code at this moment. Can someone know the name of the php file i'm looking for ? Thanks for your help


  • Beginner
  • *
  • Posts: 1
Re: Add a stamper on download pdf
« Reply #2 on: July 08, 2009, 03:20:49 am »

Did you ever work this out?

I am trying to do the exact same thing!


  • Jr. Member
  • **
  • Posts: 52
Re: Add a stamper on download pdf
« Reply #3 on: February 24, 2011, 02:03:01 am »
I am also interested to a watermark system for downloadable pdf to sell, did anybody worked this out?