# Get-OfficePdfDiagnostic

Returns native PDF structure, preflight, incremental, optimization or generated-text diagnostics.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.String` `System.String[]`

**Source**

[GetOfficePdfDiagnosticCommand.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/GetOfficePdfDiagnosticCommand.cs#L13) 

Returns native PDF structure, preflight, incremental, optimization or generated-text diagnostics.

## Syntax

```
Get-OfficePdfDiagnostic
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Password <SecureString>]
[-Path] <String[]>
[-Type <Structure|Preflight|Incremental|Optimization>]
[<CommonParameters>]
```

[#](#method-get-officepdfdiagnostic-switchparameter-pdfloadoptions-securestring-string-officepdfdiagnostictype)

Parameter set: `Path`

```
Get-OfficePdfDiagnostic
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Password <SecureString>]
[-Type <Structure|Preflight|Incremental|Optimization>]
[<CommonParameters>]
```

[#](#method-get-officepdfdiagnostic-switchparameter-string-pdfloadoptions-securestring-officepdfdiagnostictype)

Parameter set: `LiteralPath`

```
Get-OfficePdfDiagnostic
[-AdvancedLayout]
[-Encoding]
[-FontPath <String>]
[-Source <String>]
-Text <String>
[<CommonParameters>]
```

[#](#method-get-officepdfdiagnostic-switchparameter-switchparameter-string-string-string)

Parameter set: `Text`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Choose a PSWriteOffice Workflow](/docs/pswriteoffice/choosing-a-workflow/) Guide
  
  Decide between authoring, editing, inspection, conversion, and normalized Reader extraction. Includes examples and cmdlet links.
- [Migrate from PSWritePDF to PSWriteOffice](/docs/pswriteoffice/migrate-from-pswritepdf/) Guide
  
  Replace legacy PSWritePDF and iText-based scripts with maintained OfficeIMO PDF commands for authoring, extraction, forms, and merge.
- [Inspect PDF Signatures and Compliance](/docs/pswriteoffice/pdf-signatures-compliance/) Guide
  
  Collect signature structure, compliance, diagnostics, and rewrite-preservation evidence before accepting or transforming a PDF.
- [Read, Extract, and Preflight PDF Files](/docs/pswriteoffice/pdf-read-preflight/) Guide
  
  Inspect PDF metadata, pages, text, images, fonts, forms, annotations, signatures, compliance, and rewrite readiness before changing a file.

## Examples

### Example 1

```powershell
Get-OfficePdfDiagnostic -Path @('C:\Path')
```

### Example 2

```powershell
Get-OfficePdfDiagnostic -LiteralPath @('C:\Path')
```

### Example 3

```powershell
Get-OfficePdfDiagnostic -Text 'Value'
```

## Parameters

**-IgnorePermissionRestrictions SwitchParameter optionalsets: Path, LiteralPath**

After authentication, explicitly ignore owner-imposed restrictions.

**-LoadOptions PdfLoadOptions optionalsets: Path, LiteralPath**

Native source loading policy.

**-Password SecureString optionalsets: Path, LiteralPath**

Source password.

**-Path String[] requiredposition: 0sets: Path**

Input PDF files with wildcard expansion.

**-Type OfficePdfDiagnosticType optionalsets: Path, LiteralPath**

Native report to return for each PDF.

Possible values: `Structure`, `Preflight`, `Incremental`, `Optimization`

**-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath**

Literal input files.

**-AdvancedLayout SwitchParameter optionalsets: Text**

Return script, direction, mark positioning and line-breaking findings.

**-Encoding SwitchParameter optionalsets: Text**

Return encoding and glyph coverage findings.

**-FontPath String optionalsets: Text**

Literal font file for glyph coverage and shaping diagnostics.

**-Source String optionalsets: Text**

Source label included in text findings.

**-Text String requiredpipeline: True (ByValue)sets: Text**

Generated text to diagnose before rendering.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:BE099B303B273FF159442525FDB6458D4984EA8DD2316989624A5B215EEB18C6 -->
