Version Coverage
Tracks which PDF features require which specification versions. The library uses #[RequiresPdfVersion] attributes on classes and properties to enforce version requirements at write time.
Mechanism: When a feature is registered with PdfFileWriter, the document version auto-bumps to the minimum required. In strict mode (setStrictVersionMode(true)), a VersionRequirementException is thrown instead.
Key files:
PdfVersion— backed string enum (V1_0..V2_0)RequiresPdfVersion— PHP attribute for version gatingDeprecatedPdfFeature— PHP attribute for deprecation trackingVersionRequirementResolver— reflection-based resolver with caching
PDF 1.0 (Base)
Section titled “PDF 1.0 (Base)”All features not explicitly annotated default to PDF 1.0. This includes:
- Core primitives (
PdfObject,PdfArray,PdfDictionary,PdfStream, etc.) Catalog,PageTree,PageType1Font(standard 14 fonts)ContentStreamoperatorsDeviceRGB,DeviceCMYK,DeviceGray
PDF 1.1 (9 annotations)
Section titled “PDF 1.1 (9 annotations)”| Class / Property | Source | Description |
|---|---|---|
CalGray | ColorSpace/CalGray.php | CIE-based gray color space |
CalRGB | ColorSpace/CalRGB.php | CIE-based RGB color space |
Lab | ColorSpace/Lab.php | CIE-based Lab* color space |
LaunchAction | Action/LaunchAction.php | Launch an application |
Outline | Document/Outline.php | Bookmark root |
OutlineItem | Document/OutlineItem.php | Bookmark entry |
TransitionDict | Document/TransitionDict.php | Page transitions |
MMType1Font | Font/MMType1Font.php | Multiple Master fonts |
ThreadAction | Action/ThreadAction.php | Navigate article thread |
PDF 1.2 (13 annotations)
Section titled “PDF 1.2 (13 annotations)”| Class / Property | Source | Description |
|---|---|---|
Pattern | ColorSpace/Pattern.php | Pattern color space |
TilingPattern | Pattern/TilingPattern.php | Tiling patterns |
WidgetAnnotation | Annotation/WidgetAnnotation.php | Form field widgets |
Type0Font | Font/Type0Font.php | Composite fonts |
CIDFont | Font/CIDFont.php | CID-keyed fonts (abstract) |
AcroForm | Interactive/Form/AcroForm.php | Interactive forms |
HideAction | Action/HideAction.php | Show/hide annotations |
SubmitFormAction | Action/SubmitFormAction.php | Form submission |
ResetFormAction | Action/ResetFormAction.php | Form reset |
ImportDataAction | Action/ImportDataAction.php | FDF data import |
AppearanceDict | Annotation/AppearanceDict.php | Annotation appearances |
AppearanceCharacteristics | Annotation/AppearanceCharacteristics.php | Widget appearance config |
AdditionalActions | Action/AdditionalActions.php | Trigger events |
PDF 1.3 (25 annotations)
Section titled “PDF 1.3 (25 annotations)”| Class / Property | Source | Description |
|---|---|---|
ICCBased | ColorSpace/ICCBased.php | ICC profile color space |
Separation | ColorSpace/Separation.php | Spot color |
ShadingPattern | Pattern/ShadingPattern.php | Shading patterns |
Shading (all subtypes) | Shading/ | Types 1–7 via inheritance |
Func (all subtypes) | Function/ | Types 0–4 via inheritance |
StructTreeRoot | Document/StructTreeRoot.php | Tagged PDF structure |
StructElem | Document/StructElem.php | Structure element |
JavaScriptAction | Action/JavaScriptAction.php | Execute JavaScript |
PageLabel | Document/PageLabel.php | Page numbering |
SignatureField | Interactive/Form/SignatureField.php | Digital signature field |
SignatureValue | Interactive/Signature/SignatureValue.php | Signature dictionary |
SignatureReference | Interactive/Signature/SignatureReference.php | Signature reference |
FreeTextAnnotation | Annotation/FreeTextAnnotation.php | Free text |
LineAnnotation | Annotation/LineAnnotation.php | Line |
SquareAnnotation | Annotation/SquareAnnotation.php | Square |
CircleAnnotation | Annotation/CircleAnnotation.php | Circle |
HighlightAnnotation | Annotation/HighlightAnnotation.php | Highlight |
UnderlineAnnotation | Annotation/UnderlineAnnotation.php | Underline |
SquigglyAnnotation | Annotation/SquigglyAnnotation.php | Squiggly |
StrikeOutAnnotation | Annotation/StrikeOutAnnotation.php | Strike-out |
StampAnnotation | Annotation/StampAnnotation.php | Rubber stamp |
InkAnnotation | Annotation/InkAnnotation.php | Ink strokes |
PopupAnnotation | Annotation/PopupAnnotation.php | Popup |
FileAttachmentAnnotation | Annotation/FileAttachmentAnnotation.php | File attachment |
HalftoneType1/5/6/10 | Graphics/ | Halftone dictionaries |
PDF 1.4 (13 annotations)
Section titled “PDF 1.4 (13 annotations)”| Class / Property | Source | Description |
|---|---|---|
SoftMask | Graphics/SoftMask.php | Soft mask dictionary |
GroupAttributes | Document/GroupAttributes.php | Transparency group |
MetadataStream | Document/MetadataStream.php | XMP metadata stream |
MarkupAnnotation (all subtypes) | Annotation/MarkupAnnotation.php | Markup annotation base |
OutputIntent | Document/OutputIntent.php | Color management intent |
MovieAnnotation | Annotation/MovieAnnotation.php | Movie (deprecated 2.0) |
ExtGState::$bm | Graphics/ExtGState.php | Blend mode property |
ExtGState::$sMask | Graphics/ExtGState.php | Soft mask property |
ExtGState::$ca | Graphics/ExtGState.php | Fill alpha property |
ExtGState::$caLower | Graphics/ExtGState.php | Stroke alpha property |
ExtGState::$ais | Graphics/ExtGState.php | Alpha is shape |
ExtGState::$tk | Graphics/ExtGState.php | Text knockout |
Page::$outputIntents | Document/Page.php | Page-level output intents |
PDF 1.5 (30 annotations)
Section titled “PDF 1.5 (30 annotations)”| Class / Property | Source | Description |
|---|---|---|
OCG | Document/OCG.php | Optional content group |
OCMD | Document/OCMD.php | Optional content membership |
OCPropertiesDict | Document/OCPropertiesDict.php | OC properties |
CrossReferenceStream | Document/CrossReferenceStream.php | Xref streams |
ObjectStream | Document/ObjectStream.php | Compressed objects |
CryptFilter | Security/CryptFilter.php | Encryption filters |
MediaRendition | Multimedia/MediaRendition.php | Media rendition |
SelectorRendition | Multimedia/SelectorRendition.php | Selector rendition |
MediaClipData | Multimedia/MediaClipData.php | Media clip data |
MediaClipSection | Multimedia/MediaClipSection.php | Media clip section |
MediaCriteria | Multimedia/MediaCriteria.php | Media selection criteria |
MediaPlayParams | Multimedia/MediaPlayParams.php | Playback parameters |
MediaScreenParams | Multimedia/MediaScreenParams.php | Screen parameters |
Navigator | Multimedia/Navigator.php | Navigator dictionary |
ScreenAnnotation | Annotation/ScreenAnnotation.php | Screen annotation |
CaretAnnotation | Annotation/CaretAnnotation.php | Caret annotation |
PolygonAnnotation | Annotation/PolygonAnnotation.php | Polygon |
PolyLineAnnotation | Annotation/PolyLineAnnotation.php | Polyline |
RedactAnnotation | Annotation/RedactAnnotation.php | Redaction |
SoundAnnotation | Annotation/SoundAnnotation.php | Sound (deprecated 2.0) |
BorderEffect | Annotation/BorderEffect.php | Border effect |
RenditionAction | Action/RenditionAction.php | Rendition action |
SetOCGStateAction | Action/SetOCGStateAction.php | Set OCG state |
TransAction | Action/TransAction.php | Transition action |
SigFieldLock | Interactive/Form/SigFieldLock.php | Signature field lock |
Rendition | Multimedia/Rendition.php | Rendition (abstract) |
OCUsage | Document/OCUsage.php | OC usage application |
OCConfig | Document/OCConfig.php | OC configuration |
NamesDictionary | Document/NamesDictionary.php | Names dictionary |
Destination | Document/Destination.php | Explicit destinations |
PDF 1.6 (17 annotations)
Section titled “PDF 1.6 (17 annotations)”| Class / Property | Source | Description |
|---|---|---|
DeviceN | ColorSpace/DeviceN.php | Multi-component color space |
ThreeDStream | ThreeD/ThreeDStream.php | 3D stream (U3D/PRC) |
ThreeDView | ThreeD/ThreeDView.php | 3D view |
ThreeDBackground | ThreeD/ThreeDBackground.php | 3D background |
ThreeDRenderMode | ThreeD/ThreeDRenderMode.php | 3D render mode |
ThreeDLightingScheme | ThreeD/ThreeDLightingScheme.php | 3D lighting |
ThreeDCrossSection | ThreeD/ThreeDCrossSection.php | 3D cross-section |
ThreeDAnnotation | Annotation/ThreeDAnnotation.php | 3D annotation |
DocTimeStamp | Interactive/Signature/DocTimeStamp.php | Document timestamp |
WatermarkAnnotation | Annotation/WatermarkAnnotation.php | Watermark |
CFFFontFile | Font/FontFile/CFFFontFile.php | CFF font embedding |
GoToEAction | Action/GoToEAction.php | Go to embedded |
GoTo3DViewAction | Action/GoTo3DViewAction.php | Navigate 3D view |
HalftoneType16 | Graphics/ExtGState.php | 16-bit halftone |
MarkInfo::$userProperties | Document/MarkInfo.php | User properties flag |
MarkInfo::$suspects | Document/MarkInfo.php | Suspects flag |
CIDFontType0Font | Font/CIDFontType0Font.php | CID Type 0 (CFF) |
PDF 1.7 (6 annotations)
Section titled “PDF 1.7 (6 annotations)”| Class / Property | Source | Description |
|---|---|---|
Collection | Document/Collection.php | Portable collection |
CollectionSchema | Document/CollectionSchema.php | Collection field defs |
CollectionItem | Document/CollectionItem.php | Collection entry |
Requirement | Document/Requirement.php | Document requirements |
RequirementHandler | Document/RequirementHandler.php | Requirement handler |
Catalog::$extensions | Document/Catalog.php | Developer extensions |
PDF 2.0 (17 annotations)
Section titled “PDF 2.0 (17 annotations)”| Class / Property | Source | Description |
|---|---|---|
DPartRoot | Document/DPartRoot.php | Document part root |
DPart | Document/DPart.php | Document part |
GoToDPAction | Action/GoToDPAction.php | Navigate document part |
RichMediaExecuteAction | Action/RichMediaExecuteAction.php | Rich media execute |
DSS | Document/DSS.php | Document Security Store |
ProjectionAnnotation | Annotation/ProjectionAnnotation.php | Projection annotation |
RichMediaAnnotation | Annotation/RichMediaAnnotation.php | Rich media |
Catalog::$dss | Document/Catalog.php | DSS reference |
Catalog::$af | Document/Catalog.php | Associated files |
Catalog::$dPartRoot | Document/Catalog.php | Document part root ref |
Page::$af | Document/Page.php | Page associated files |
Page::$dPart | Document/Page.php | Page document part |
FormXObject::$af | Graphics/XObject/FormXObject.php | Form XObject AF |
ViewerPreferences::$enforce | Document/ViewerPreferences.php | Enforced preferences |
FileSpec::$afRelationship | FileSpec/FileSpec.php | AF relationship |
SeedValueDictionary::$lockDocument | Interactive/Form/SeedValueDictionary.php | Lock document flag |
SeedValueDictionary::$appearanceFilter | Interactive/Form/SeedValueDictionary.php | Appearance filter |
Deprecated Features
Section titled “Deprecated Features”7 features are marked with #[DeprecatedPdfFeature]. When removedIn is set and strict deprecation is enabled, using the feature at or above that version throws DeprecatedFeatureException.
| Class | Source | Deprecated Since | Removed In | Replacement |
|---|---|---|---|---|
Movie | Multimedia/Movie.php | 2.0 | 2.0 | RichMediaAnnotation |
MovieAction | Action/MovieAction.php | 2.0 | 2.0 | RichMediaExecuteAction |
MovieAnnotation | Annotation/MovieAnnotation.php | 2.0 | 2.0 | ScreenAnnotation |
Sound | Multimedia/Sound.php | 2.0 | 2.0 | MediaRendition |
SoundAction | Action/SoundAction.php | 2.0 | 2.0 | RenditionAction |
SoundAnnotation | Annotation/SoundAnnotation.php | 2.0 | 2.0 | RichMediaAnnotation |
PostScriptXObject | Graphics/XObject/PostScriptXObject.php | 1.7.1 | — | — |
Runtime Version Checks
Section titled “Runtime Version Checks”Some objects determine their version requirement at runtime rather than via static attributes:
StructElemimplementsPdfVersionAware— checksStandardStructureTypefor PDF 2.0 types (DocumentFragment,Aside,Title,THead,TBody,TFoot,FENote,Artifact)- Source:
Document/StructElem.php
- Source:
PdfEncryptor::getMinimumPdfVersion()— RC4 → 1.4, AES-128 → 1.6, AES-256 → 2.0- Source:
Security/PdfEncryptor.php
- Source:
PdfFileWriter::generate()— auto-bumps for xref streams (→ 1.5) and syncsCatalog::$versionfor versions > 1.4- Source:
File/PdfFileWriter.php
- Source: