API Reference

Cmdlet

Get-OfficePdfImage

Namespace PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Pdf.PdfExtractedImage System.IO.FileInfo

Gets or extracts image resources from a PDF.

Remarks

Gets or extracts image resources from a PDF.

Examples

Authored help example

Extract images from selected pages.

PS>


$proof = @(
                Get-OfficePdfImage -Path .\Examples\Documents\Report.pdf -PageRange '1-2'
                Get-OfficePdfImage -Path .\Examples\Documents\Report.pdf -OutputDirectory .\Examples\Documents\PdfImages -BaseName 'report-image'
            )
            $proof
        

Returns image metadata or writes extracted images 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-OfficePdfImage [-BaseName <String>] [-OutputDirectory <String>] [-PageRange <String>] -Path <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

BaseName String optionalposition: namedpipeline: False
Base file name used when extracting images to disk.
OutputDirectory String optionalposition: namedpipeline: False
Optional directory where images should be written.
PageRange String optionalposition: namedpipeline: False
Optional page ranges such as 1-3,5.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
PDF file path.

Outputs

OfficeIMO.Pdf.PdfExtractedImage System.IO.FileInfo