Pro edition
Print Job
At a glance
Section titled “At a glance”NextPDF Pro builds XJDF (XML JDF 2.0) job tickets for production print workflows: job metadata, media specification, color intent, finishing operations, priority, and copy count.
Availability & licensing
Section titled “Availability & licensing”This capability ships in NextPDF Pro (nextpdf/pro) and activates with a Pro-tier license envelope. A deployment without that entitlement does not load the capability’s classes. Print Job carries no separate per-feature license flag. Compare editions and get a license.
Install
Section titled “Install”composer require nextpdf/pro:^3Conceptual overview
Section titled “Conceptual overview”A print-production system consumes a job ticket that describes how to produce a job. NextPDF Pro emits an XJDF 2.1 document with a fluent builder:
XjdfJobTicket— the builder. Set the job ID and name, priority, media, color, finishing, and copy count, then serialize to an XJDF 2.1 XML document.MediaSpec— immutable media properties: type, width and height in millimeters, weight in g/m², coating, and color. Defaults to A4 white paper.ColorSpec,FinishingSpec,JobPriority— color intent, finishing operations, and a priority enum.
The generated XML follows the simplified XJDF 2.1 structure. The module produces the ticket; it does not submit it to a press controller or device.
Why it works this way
Section titled “Why it works this way”Print Job builds a ticket and stops there. It never submits the job or renders a print stream. That boundary is deliberate. The XJDF document is a portable description of intent — media, color, finishing, priority, copies — that a downstream press controller consumes and executes. Keeping the module a pure serializer lets one ticket drive a high-volume production run without coupling your code to a device protocol. The specification objects are immutable, so identical inputs always yield the same ticket, which keeps batch output reproducible.
Design background: High-volume document generation.
API surface
Section titled “API surface”| Class | Responsibility |
|---|---|
XjdfJobTicket | Fluent XJDF 2.1 job-ticket builder. |
MediaSpec | Media physical properties. |
ColorSpec | Color intent. |
FinishingSpec | Finishing operations. |
JobPriority | Priority enum. |
Code sample — Quick start
Section titled “Code sample — Quick start”use NextPDF\Pro\PrintJob\XjdfJobTicket;
$xml = (new XjdfJobTicket()) ->setJobId('JOB-1001') ->setJobName('Quarterly report') ->toXml();Code sample — Production
Section titled “Code sample — Production”use NextPDF\Pro\PrintJob\{XjdfJobTicket, MediaSpec, JobPriority};
$xml = (new XjdfJobTicket()) ->setJobId($jobId) ->setPriority(JobPriority::High) ->setMedia(new MediaSpec(mediaType: 'Paper', widthMm: 297.0, heightMm: 420.0)) ->setCopies(500) ->toXml();$logger->info('printjob.ticket_built', ['job_id' => $jobId]);Edge cases & gotchas
Section titled “Edge cases & gotchas”- Serialize with
toXml(); when the job ID is empty, it generates a unique identifier rather than failing. setCopies()rejects a copy count below 1.- Media dimensions are millimeters; convert from points before passing them.
- The output is a ticket document, not a rendered print stream.
Performance
Section titled “Performance”Ticket construction is constant-time relative to document size; it depends only on the configured resources.
Security notes
Section titled “Security notes”The builder emits XML from values you supply. Sanitize externally sourced job names and identifiers before building.
Conformance
Section titled “Conformance”| Behavior | Reference | Status |
|---|---|---|
| XJDF 2.1 job-ticket structure | XJDF 2.1 (CIP4) | Aligned (simplified subset) |
Behavior contract
Section titled “Behavior contract”XjdfJobTicketis a fluent builder for job ID and name, priority, media, color, finishing, and copy count, serializing to a simplified XJDF 2.1 XML document viatoXml().setCopies()rejects a copy count below 1; an empty job ID is auto-generated.MediaSpeccarries immutable media properties (type, width/height in millimeters, weight in g/m², coating, color) and defaults to A4 white paper.ColorSpec,FinishingSpec, andJobPrioritydescribe color intent, finishing operations, and priority.- The module produces a ticket document only. It does not render a print stream or submit the ticket to a press controller or device.
Enterprise boundary note
Section titled “Enterprise boundary note”Enterprise does not change Print Job behavior. Enterprise adds higher-tier features documented separately; they are not required to build an XJDF job ticket.
Core fallback / alternative
Section titled “Core fallback / alternative”There is no Core equivalent for XJDF 2.1 job-ticket generation. This is a Pro addition.
Publication boundary
Section titled “Publication boundary”This page documents externally observable behavior and the supported public API surface only. Internal namespace paths, helper classes, mechanism tables, runbook filenames, and ticket prefixes are out of scope.
See also
Section titled “See also”- Print Job — Deep Reference — full API surface for the print-job module.
- Output Pipeline — output staging.
- Document — document assembly.