ReaderDocumentInspector
in package
implements
DocumentInspector
Inspects a parsed PDF (via PdfReader) for conformance validation.
Uses the reader's hydration API to obtain typed objects where possible, and falls back to raw dictionary inspection for fields not yet hydrated.
Table of Contents
Interfaces
- DocumentInspector
- Abstract inspection interface for conformance validation.
Methods
- __construct() : mixed
- getCatalog() : Catalog
- getFonts() : iterable<string|int, PdfObject>
- getImageXObjects() : iterable<string|int, ImageXObject>
- getInfo() : Info|null
- getPages() : iterable<string|int, Page>
- getReferenceXObjects() : iterable<string|int, FormXObject>
- getRegisteredObjects() : iterable<string|int, PdfObject>
- All registered PdfObject instances.
- getThreeDStreams() : iterable<string|int, ThreeDStream>
- getXmpBytes() : string|null
- Raw XMP XML bytes, or null if no metadata stream.
- hasEmbeddedFiles() : bool
- Whether the document contains embedded files.
- hasEncryption() : bool
- Whether the document has encryption configured.
- hasInteractiveForms() : bool
- Whether the document contains interactive forms (AcroForm).
- hasJavaScript() : bool
- Whether the document contains JavaScript actions.
- hasMultimediaContent() : bool
- Whether the document contains multimedia content (movies, sounds, renditions).
- hasOutputIntents() : bool
- Whether the catalog has OutputIntents.
- hasOutputIntentWithIccProfile() : bool
- Whether any OutputIntent has an embedded ICC profile (/DestOutputProfile).
- hasRasterOnlyContent() : bool
- Whether all page content is raster-only (no text operators, no vector paths).
- hasThreeDAnnotations() : bool
- Whether the document contains 3D annotations.
- hasTransparency() : bool
- Whether any page uses a transparency group.
- hasXmpMetadata() : bool
- Whether the catalog has an XMP metadata stream.
Methods
__construct()
public
__construct(PdfReader $reader) : mixed
Parameters
- $reader : PdfReader
getCatalog()
public
getCatalog() : Catalog
Return values
CataloggetFonts()
public
getFonts() : iterable<string|int, PdfObject>
Return values
iterable<string|int, PdfObject> —All fonts registered (Font or Type0Font instances).
getImageXObjects()
public
getImageXObjects() : iterable<string|int, ImageXObject>
Return values
iterable<string|int, ImageXObject> —All image XObjects in the document.
getInfo()
public
getInfo() : Info|null
Return values
Info|nullgetPages()
public
getPages() : iterable<string|int, Page>
Return values
iterable<string|int, Page>getReferenceXObjects()
public
getReferenceXObjects() : iterable<string|int, FormXObject>
Return values
iterable<string|int, FormXObject> —All FormXObjects with a /Ref (reference XObject) entry.
getRegisteredObjects()
All registered PdfObject instances.
public
getRegisteredObjects() : iterable<string|int, PdfObject>
Return values
iterable<string|int, PdfObject>getThreeDStreams()
public
getThreeDStreams() : iterable<string|int, ThreeDStream>
Return values
iterable<string|int, ThreeDStream> —All 3D streams in the document.
getXmpBytes()
Raw XMP XML bytes, or null if no metadata stream.
public
getXmpBytes() : string|null
Return values
string|nullhasEmbeddedFiles()
Whether the document contains embedded files.
public
hasEmbeddedFiles() : bool
Return values
boolhasEncryption()
Whether the document has encryption configured.
public
hasEncryption() : bool
Return values
boolhasInteractiveForms()
Whether the document contains interactive forms (AcroForm).
public
hasInteractiveForms() : bool
Return values
boolhasJavaScript()
Whether the document contains JavaScript actions.
public
hasJavaScript() : bool
Return values
boolhasMultimediaContent()
Whether the document contains multimedia content (movies, sounds, renditions).
public
hasMultimediaContent() : bool
Return values
boolhasOutputIntents()
Whether the catalog has OutputIntents.
public
hasOutputIntents() : bool
Return values
boolhasOutputIntentWithIccProfile()
Whether any OutputIntent has an embedded ICC profile (/DestOutputProfile).
public
hasOutputIntentWithIccProfile() : bool
Return values
boolhasRasterOnlyContent()
Whether all page content is raster-only (no text operators, no vector paths).
public
hasRasterOnlyContent() : bool
Return values
boolhasThreeDAnnotations()
Whether the document contains 3D annotations.
public
hasThreeDAnnotations() : bool
Return values
boolhasTransparency()
Whether any page uses a transparency group.
public
hasTransparency() : bool
Return values
boolhasXmpMetadata()
Whether the catalog has an XMP metadata stream.
public
hasXmpMetadata() : bool