Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfDocumentImageEditor

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
ac7e6e1bad8a with working tree changes
Modifiers
sealed

Finds and edits image placements on existing PDF pages.

Inheritance

  • object
  • PdfDocumentImageEditor

Remarks

Native page coordinates use default user-space units: one unit is /UserUnit physical points (1/72 inch each), defaulting to 1. Local text/font and matrix values retain their native coordinate spaces. Explicit visual projections use their documented coordinates.

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Methods

public PdfImageEditResult Add(PdfPageRegion target, byte[] imageBytes, PdfImageEditOptions? options = null, PdfLoadOptions? readOptions = null) #

Adds an image fitted to a page region.

Parameters

target OfficeIMO.Pdf.PdfPageRegion required
imageBytes byte[] required
options OfficeIMO.Pdf.PdfImageEditOptions? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
Extract 4 overloads
public IReadOnlyList<PdfExtractedImage> Extract(PdfLoadOptions? readOptions = null) #

Extracts every unique embedded image XObject in page order.

Parameters

readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfExtractedImage>
public IReadOnlyList<PdfExtractedImage> Extract(PdfPageSelection selection, PdfLoadOptions? readOptions = null) #

Extracts embedded images referenced by a caller-ordered page selection.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfExtractedImage>
public IReadOnlyList<PdfExtractedImage> Extract(string pageRanges, PdfLoadOptions? readOptions = null) #

Extracts embedded images referenced by parsed one-based page ranges.

Parameters

pageRanges string required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfExtractedImage>
public IReadOnlyList<PdfExtractedImage> Extract(OfficePageSelector selector, PdfLoadOptions? readOptions = null) #

Extracts embedded images referenced by a document-relative page selector.

Parameters

selector OfficeIMO.OfficePageSelector required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfExtractedImage>
public IReadOnlyList<PdfImagePlacement> Find(PdfPageRegion region, PdfLoadOptions? readOptions = null) #

Returns image placements whose page-space bounds intersect a region.

Parameters

region OfficeIMO.Pdf.PdfPageRegion required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfImagePlacement>
public PdfImageEditResult Move(PdfImagePlacement placement, double deltaX, double deltaY, PdfImageEditOptions? options = null, PdfLoadOptions? readOptions = null) #

Moves one exact image placement by a PDF user-space offset. The source payload, portable size, and rotation are preserved; the selected PdfImageEditOptions.Layer controls its new page-content layer.

Parameters

placement OfficeIMO.Pdf.PdfImagePlacement required
deltaX double required
deltaY double required
options OfficeIMO.Pdf.PdfImageEditOptions? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
Placements 4 overloads
public IReadOnlyList<PdfImagePlacement> Placements(PdfLoadOptions? readOptions = null) #

Returns every image placement invocation in page paint order.

Parameters

readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfImagePlacement>
public IReadOnlyList<PdfImagePlacement> Placements(PdfPageSelection selection, PdfLoadOptions? readOptions = null) #

Returns image placements referenced by a caller-ordered page selection.

Parameters

selection OfficeIMO.Pdf.PdfPageSelection required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfImagePlacement>
public IReadOnlyList<PdfImagePlacement> Placements(string pageRanges, PdfLoadOptions? readOptions = null) #

Returns image placements referenced by parsed one-based page ranges.

Parameters

pageRanges string required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfImagePlacement>
public IReadOnlyList<PdfImagePlacement> Placements(OfficePageSelector selector, PdfLoadOptions? readOptions = null) #

Returns image placements referenced by a document-relative page selector.

Parameters

selector OfficeIMO.OfficePageSelector required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfImagePlacement>
public PdfImageEditResult Remove(PdfImagePlacement placement, PdfLoadOptions? readOptions = null) #

Removes one exact image placement without removing text, paths, annotations, or other overlapping images.

Parameters

placement OfficeIMO.Pdf.PdfImagePlacement required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public PdfImageEditResult Replace(PdfImagePlacement placement, byte[] imageBytes, PdfImageEditOptions? options = null, PdfLoadOptions? readOptions = null) #

Replaces one exact image placement while preserving portable position, size, and rotation. The selected PdfImageEditOptions.Layer controls its new relation to existing page content.

Parameters

placement OfficeIMO.Pdf.PdfImagePlacement required
imageBytes byte[] required
options OfficeIMO.Pdf.PdfImageEditOptions? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public PdfImageEditResult Transform(PdfImagePlacement placement, double deltaX, double deltaY, double scale, PdfImageEditOptions? options = null, PdfLoadOptions? readOptions = null) #

Scales an image proportionally around its center and translates that center in PDF user space.

Parameters

placement OfficeIMO.Pdf.PdfImagePlacement required
deltaX double required
deltaY double required
scale double required
options OfficeIMO.Pdf.PdfImageEditOptions? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public void Visit(Action<PdfExtractedImage> visit, CancellationToken cancellationToken = default) #

Visits each embedded image without retaining all extracted payloads.

Parameters

visit System.Action<OfficeIMO.Pdf.PdfExtractedImage> required
cancellationToken System.Threading.CancellationToken = default optional