tc-lib-pdf-graph

Technical overview and integration notes for tc-lib-pdf-graph

Overview

tc-lib-pdf-graph implements low-level drawing operations used to build PDF graphic content streams.

It exposes path, paint, clipping, shading, and transform primitives while keeping APIs close to PDF graphics operators, making it a solid foundation for vector rendering and chart-like drawing.

Repository and API Docs

Project Metadata

ItemValue
Namespace\Com\Tecnick\Pdf\Graph
LicenseGNU LGPL v3

Installation

composer require tecnickcom/tc-lib-pdf-graph

Where It Fits

Use this package when rendering diagrams, overlays, or reusable vector components in PDFs.

Features

Drawing Primitives

  • Paths, lines, curves, and clipping operations
  • Style handling for stroke/fill combinations
  • Gradient and shading support

Transformations

  • Matrix-based geometric transforms
  • Coordinate conversion helpers
  • PDF/A-aware behavior controls

Integration Notes

  • Keep coordinate systems and transforms explicit in reusable helpers.
  • Snapshot complex graphic outputs to detect regressions after upgrades.
  • Prefer reusable vector templates for repeated visual components.

Requirements

  • PHP 8.2 or later
  • Extension: zlib
  • Composer

Example

<?php

require_once __DIR__ . '/vendor/autoload.php';

$draw = new \Com\Tecnick\Pdf\Graph\Draw(
	1.0,
	210,
	297,
	new \Com\Tecnick\Color\Pdf(),
	new \Com\Tecnick\Pdf\Encrypt\Encrypt(),
	false
);

echo $draw->getClippingRect(10, 10, 50, 20);

Development and Packaging

  • QA and local checks: make deps, make help, make qa
  • Packaging: make rpm, make deb

Support and Contribution

 

© 2004-2026 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy