Package {certify}


Title: Generate Branded PDF Certificates
Version: 0.1.0
Description: Produces formal landscape PDF certificates with configurable color themes, optional logos, decorative borders, laurels, and corner ornaments. Built on 'grid' with no external 'LaTeX' or 'Quarto' dependency. Suitable for academic awards, professional recognition, and similar uses.
License: MIT + file LICENSE
Encoding: UTF-8
Language: en-US
RoxygenNote: 8.0.0
Depends: R (≥ 3.6.0)
Imports: grDevices, grid, png
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
URL: https://github.com/cwimpy/certify
BugReports: https://github.com/cwimpy/certify/issues
NeedsCompilation: no
Packaged: 2026-05-08 03:45:25 UTC; cwimpy
Author: Cameron Wimpy [aut, cre, cph]
Maintainer: Cameron Wimpy <cwimpy@mac.com>
Repository: CRAN
Date/Publication: 2026-05-12 19:40:12 UTC

certify: Generate Branded PDF Certificates

Description

Produces formal landscape PDF certificates with configurable color themes, optional logos, decorative borders, laurels, and corner ornaments. Built on grid only — no LaTeX or Quarto required.

Details

The two top-level entry points are make_certificate() for rendering a certificate and cert_theme() (plus the preset variants cert_theme_classic(), cert_theme_formal(), cert_theme_warm()) for controlling the color palette.

Author(s)

Maintainer: Cameron Wimpy cwimpy@mac.com [copyright holder]

Authors:

See Also

Useful links:


Build a certificate color theme

Description

Constructs a color palette used by make_certificate() to render borders, ornaments, and text. Supply your own colors, or use one of the preset themes (cert_theme_classic(), cert_theme_formal(), cert_theme_warm()).

Usage

cert_theme(
  primary = "#1a3a5c",
  primary_dark = "#0f2540",
  accent = "#b08d3e",
  accent_light = "#d4b26a",
  ink = "#1a1a1a",
  soft_ink = "#4a4a4a",
  background = "#fbf8f1",
  hairline = "#c9a961"
)

Arguments

primary

Border and accent color (any hex or named R color). Used for the outer border, the title text, and the accent diamond in the divider.

primary_dark

A darker variant of primary, used for the academic-year line and laurel outlines.

accent

Secondary accent color, typically a metallic such as gold, bronze, or silver. Used for inner borders and corner arcs.

accent_light

Lighter version of accent, used as the leaf fill in the laurel ornaments.

ink

Main body text color.

soft_ink

Italic / subdued text color (subtitles, dates).

background

Page fill color.

hairline

Thin inner-border and underline color.

Value

A cert_theme object: a named list of color strings.

Examples

my_theme <- cert_theme(primary = "#003366", accent = "#c0a062")

Preset certificate themes

Description

Convenience wrappers around cert_theme() for common looks.

Usage

cert_theme_classic()

cert_theme_formal()

cert_theme_warm()

Details

Value

A cert_theme object.

Examples

th <- cert_theme_classic()
th$primary

Generate a PDF certificate

Description

Renders a single landscape PDF certificate with decorative borders, corner ornaments, optional laurels around the recipient name, and one or two signature blocks. The output is drawn entirely with the grid graphics system; no LaTeX or Quarto installation is required.

Usage

make_certificate(
  path,
  recipient,
  title = "Certificate of Achievement",
  award_name = NULL,
  organization = NULL,
  program = NULL,
  presented_text = "This certificate is proudly presented to",
  citation = "",
  academic_year = NULL,
  date_str = format(Sys.Date(), "%B %Y"),
  signers = list(list(name = "", title = "")),
  logo = NULL,
  theme = cert_theme_classic(),
  width = 11,
  height = 8.5,
  show_laurels = TRUE,
  device = c("cairo_pdf", "pdf")
)

Arguments

path

File path for the output PDF. Required.

recipient

Name of the person receiving the certificate.

title

Main heading. Defaults to "Certificate of Achievement".

award_name

Optional subtitle, rendered in upper-case (for example, "Outstanding Graduate").

organization

Optional name of the issuing organization. Used in the header when no logo is supplied.

program

Optional italic line shown beneath award_name (for example, "Bachelor of Arts in Political Science").

presented_text

Lead-in text immediately above the recipient name. Defaults to "This certificate is proudly presented to".

citation

Italic citation paragraph displayed beneath the recipient name. Will be soft-wrapped to fit the page.

academic_year

Optional academic-year line (for example, "2025-2026").

date_str

Date displayed in the signature block. Defaults to the current month and year.

signers

A list of one or two signers. Each signer is itself a list with name and title character entries. With one signer the layout shows a date line on the right; with two signers the date appears centered below the signature row.

Optional path to a PNG logo. When provided, the image is centered in the header and organization is ignored.

theme

A cert_theme object controlling colors. See cert_theme() and the preset variants.

width, height

Page dimensions in inches. Defaults give US letter landscape (11 x 8.5).

show_laurels

Logical; if TRUE (the default), draw decorative laurel sprays flanking the recipient name.

device

Either "cairo_pdf" (the default) or "pdf". Cairo renders Unicode glyphs (en-dashes, em-dashes, smart quotes) cleanly and is the recommended choice. The base "pdf" device is more portable — it has no system dependency on Cairo / XQuartz — but silently downgrades non-ASCII characters to hyphens. Use "pdf" if you see "failed to load cairo DLL" warnings or segfaults on systems without Cairo (some macOS installations without XQuartz, stripped Linux containers, etc.).

Value

The output path, returned invisibly.

Layout

The page is US-letter landscape by default (11 x 8.5 inches). Pass width and height to render any other size. The header region shows either an image (if logo is supplied) or a wordmark constructed from organization. Below the header, the certificate shows a divider, the title, an optional award subtitle and program line, the recipient name, the citation, an optional academic year, and the signature block(s).

Examples

out <- tempfile("certify_", fileext = ".pdf")
make_certificate(
  path          = out,
  recipient     = "Jane A. Doe",
  title         = "Certificate of Achievement",
  award_name    = "Outstanding Student",
  organization  = "University of Somewhere",
  citation      = "in recognition of exceptional dedication and scholarship.",
  academic_year = "2025-2026",
  signers       = list(
    list(name = "Alex Chair, Ph.D.", title = "Department Chair")
  ),
  device        = "pdf"   # use "cairo_pdf" (default) for proper Unicode
)
file.exists(out)