Some test text!

Search
Hamburger Icon

Php / Guides / Samples

Code samples to edit PDFs in PHP

PDF Editor (Programmatic)
The sample code shows how to edit the page display list and how to modify graphics state attributes on existing Elements.

Insert an image into a PDF
This sample illustrates how to embed various raster image formats (e.g. TIFF, JPEG, JPEG2000, JBIG2, GIF, PNG, BMP, etc.) in a PDF document.

Search & replace PDF text or images
This sample shows how to use pdftron.PDF.ContentReplacer to search and replace text strings and images in existing PDF (e.g. business cards and other PDF templates)

Stamp a PDF File
The sample shows how to use 'pdftron.PDF.Stamper' utility class to stamp PDF pages with text, images, or with other PDF pages.

PDF logical structure reader
This sample explores the structure and content of a tagged PDF document and dumps the structure information to the console window.

PDF image extraction
This sample illustrates couple of approaches to PDF image extraction.

Read elements across all PDF pages
Illustrates how to traverse page display list using ElementReader.

Undo and/or redo
This sample demonstrates the basics of undoing and redoing changes to a document.

Build, write, embed elements in PDF pages
Illustrates how to use PDFNet page writing API, how to embed fonts and images and how to copy graphical elements from one page to another.

Get the answers you need: Chat with us