API Reference
Cmdlet
Get-OfficePdfAttachment
Gets or extracts embedded file attachments from a PDF.
Remarks
Gets or extracts embedded file attachments from a PDF.
Examples
List and extract embedded PDF attachments.
PS>
$proof = @(
Get-OfficePdfAttachment -Path .\Examples\Documents\PdfWithAttachment.pdf
Get-OfficePdfAttachment -Path .\Examples\Documents\PdfWithAttachment.pdf -OutputDirectory .\Examples\Documents\Attachments
)
$proof
First returns attachment metadata, then writes embedded files to disk.
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.
Syntax
Get-OfficePdfAttachment [-Name <String>] [-OutputDirectory <String>] [-Password <String>] -Path <String> [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Name String
- Optional attachment name or file name filter.
- OutputDirectory String
- Optional directory where attachments should be written.
- Password String
- Password used to read a Standard password-encrypted PDF.
- Path String
- PDF file path.
Outputs
OfficeIMO.Pdf.PdfExtractedAttachment System.IO.FileInfo