Skip to content

Master Stamp

The Master Stamp heading under Setting is the master_stamp_reference module, one screen: a register of stamp images that the PDF viewer can place on a document as an annotation. Added in 2024 for the stamping flow in the in-browser viewer.

How this page was verified

Written from master on 2026-09-06 and compared with the big five the same day. No earlier page existed. One file of 349 lines, fully on $pdo.

The data

ts_master_stamps: master_stamp_name, master_stamp_code, master_stamp_image (the uploaded file), width, height, created_by. The width and height are read from the image with getimagesize() at upload and used to scale the stamp in the viewer.

The screen

master_stamp_reference.php with ref_master_stamp_browse.htm. Commands: master_stamp (the grid), add_stamp (upload from the stamp_img-0 field, insert), edit_stamp (rename or recode, optional new image), and the deletedata action, gated by the module's delete privilege. The code must be unique; the insert checks it first.

Where the stamps are used

Not in the module itself. The PDF viewer under includes/javascripts/tracking/pdfviewer/ (SetaPDF based, loaded by documents_master.php) calls api/getMasterStamps.php to list them and api/addMasterStamp.php to burn one into the PDF through pdfAnnotationEngine.inc.php. A stamp that looks wrong in the viewer is therefore a viewer or image-size problem, not a register problem.

Gotchas

  • The image is stored as a file, not a blob. Moving an instance to another server needs the upload folder copied, or every stamp shows as broken.
  • Deleting a stamp does not touch PDFs already stamped. The annotation is burned into the file.

Instance differences

Checked on 2026-09-06. Every fork in the big five has the module and the viewer API. Jadestone and Timas have a changed master_stamp_reference.php; Medco and JOTRE are identical to master.

  • Upload: where the viewer opens.