# Licensing notice: PCL to PDF

## This application

The PCL to PDF website (this directory, `apps/pcl-to-pdf`), **including the copy of `packages/site-kit` and the
workspace configuration it is built with**, is licensed under the **GNU Affero General Public License v3.0 or
later** (see `LICENSE`). Copyright (C) 2026 the PCL to PDF authors.

It is licensed this way because its conversion worker loads and calls the GhostPDL engine inside the same
JavaScript/WebAssembly runtime, so the application and the engine are treated as one combined work.

The complete corresponding source of the deployed website is published by the site itself at
`/source/pcl-to-pdf-site-source.tar.gz` (generated deterministically at build time by
`packages/site-kit/scripts/postbuild.mjs`). It contains this application, `packages/site-kit`, the workspace
configuration and lockfile, and the exact third-party source files bundled into the site's JavaScript
(listed with their licenses in `/third-party-licenses.txt`). To rebuild:
`pnpm install --frozen-lockfile && pnpm --filter @foundry/pcl-to-pdf build`.

## GhostPDL

`public/engine/gpcl6.{js,wasm}` and `public/engine/gs.{js,wasm}` are object code for **GhostPDL 10.08.0**
(GhostPCL and Ghostscript), Copyright (C) 2001-2026 Artifex Software, Inc., licensed under the GNU Affero General
Public License v3.0 or later (`source-archive/licenses/ghostpdl-LICENSE.txt`, `source-archive/licenses/AGPL-3.0.txt`).

**Modified version.** These binaries are built from a modified GhostPDL (modification date 2026-09-16):

- `engine/patches/0001-psromfs-uncompressed-no-cjk-fallback-font.patch` changes `psi/psromfs.mak` so that
  PostScript resources are stored uncompressed and the DroidSansFallback CJK font is omitted.
- `engine/patches/0002-pcl-kcmy-simple-color-default-palette.patch` changes `pcl/pcl/pcindxed.c`: PCL simple color
  mode KCMY (`ESC * r -4 U`) now fills all 16 default palette entries, so yellow, red and green no longer print black,
  and a one-byte write past the palette is removed. This patch applies to GhostPCL (`gpcl6`) only.
- The code is compiled to WebAssembly with Emscripten 6.0.9 using `engine/build.sh` (configure flags, link flags,
  `SOURCE_DATE_EPOCH`) with only the `pdfwrite` output device.

**Corresponding source** is provided at no charge from the same website that serves the binaries:

- `/source/ghostpdl-10.08.0.tar.xz.part-00` … `part-03`: the unmodified official release tarball, split into
  parts because of hosting file-size limits. Reassemble with
  `cat ghostpdl-10.08.0.tar.xz.part-* > ghostpdl-10.08.0.tar.xz` and check SHA-256
  `94943e3c4adb7115d132b3c28b913672f2e62e6a9d802f7e754e716b1634174a` (`/source/SHA256SUMS`).
  It is also available upstream at
  https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10080/ghostpdl-10.08.0.tar.xz
- `/source/build.sh`, `/source/0001-psromfs-uncompressed-no-cjk-fallback-font.patch`,
  `/source/0002-pcl-kcmy-simple-color-default-palette.patch` and `/source/BUILD.md`: the build script, patches and
  build notes used to build the binaries.

The tarball parts are kept in `source-archive/ghostpdl/` so the offer does not depend on a third-party server.

## Third-party components inside GhostPDL

FreeType, libjpeg (Independent JPEG Group), libpng, zlib, Little CMS (lcms2mt), Brotli, Adobe CMap resources,
URW++ fonts (AGPL with font exception) and the Emscripten runtime. License texts: `source-archive/licenses/`,
published at `/source/licenses/`.

- Portions of this software are copyright (C) The FreeType Project (www.freetype.org). All rights reserved.
- This software is based in part on the work of the Independent JPEG Group.

This notice describes how the project complies with the licenses; it is not legal advice.
