Class
PdfDocumentAttachments
OfficeIMO.Pdf
Existing-document embedded and associated file editing operations.
Inheritance
- object
- PdfDocumentAttachments
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
- Property PdfDocument.Attachments
Methods
public PdfAttachmentEditResult Add(PdfEmbeddedFile attachment) #Adds one attachment.
Parameters
- attachment OfficeIMO.Pdf.PdfEmbeddedFile
Returns
PdfAttachmentEditResultpublic PdfAttachmentEditResult Edit(Action<PdfAttachmentEditSession> edit) #Applies a transactional attachment collection edit.
Parameters
- edit System.Action<OfficeIMO.Pdf.PdfAttachmentEditSession>
Returns
PdfAttachmentEditResultExtract 2 overloads
public IReadOnlyList<PdfExtractedAttachment> Extract(PdfLoadOptions? readOptions = null) #Extracts every embedded or associated file payload.
Parameters
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
IReadOnlyList<PdfExtractedAttachment>public PdfExtractedAttachment Extract(PdfAttachmentInfo attachment, long maximumDecodedBytes, CancellationToken cancellationToken = default) #Extracts one selected attachment without decoding unrelated payloads.
Parameters
- attachment OfficeIMO.Pdf.PdfAttachmentInfo
- maximumDecodedBytes long
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfExtractedAttachmentRemove 2 overloads
public PdfAttachmentEditResult Remove(string fileName) #Removes one attachment.
Parameters
- fileName string
Returns
PdfAttachmentEditResultpublic PdfAttachmentEditResult Remove(PdfAttachmentInfo attachment) #Removes one selected attachment by its source object identity.
Parameters
- attachment OfficeIMO.Pdf.PdfAttachmentInfo
Returns
PdfAttachmentEditResultpublic PdfAttachmentEditResult Rename(string fileName, string newFileName) #Renames one attachment.
Parameters
- fileName string
- newFileName string
Returns
PdfAttachmentEditResultpublic PdfAttachmentEditResult Replace(string fileName, PdfEmbeddedFile replacement) #Replaces one attachment by file name.
Parameters
- fileName string
- replacement OfficeIMO.Pdf.PdfEmbeddedFile
Returns
PdfAttachmentEditResult