• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class EmbeddedFile

A file embedded in a PDF document (PDF spec §7.11.4). Obtain an instance via Add(string).

Inheritance
object
EmbeddedFile
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf.EmbeddedFiles
Assembly: DRIT.Pdf.dll
Syntax
public sealed class EmbeddedFile

Properties

CompressedSize

Compressed size (updated on save).

Declaration
public int CompressedSize { get; }
Property Value
Type Description
int

Description

Optional file description (written to Filespec /Desc).

Declaration
public string? Description { get; set; }
Property Value
Type Description
string

MimeType

Optional MIME type (e.g. "application/json").

Declaration
public string? MimeType { get; set; }
Property Value
Type Description
string

ModificationDate

Optional modification timestamp written to embedded-file /Params /ModDate.

Declaration
public DateTimeOffset? ModificationDate { get; set; }
Property Value
Type Description
DateTimeOffset?

Name

The file name used in the embedded-file tree.

Declaration
public string Name { get; }
Property Value
Type Description
string

Size

Uncompressed file size. If null, current content length is used.

Declaration
public int? Size { get; set; }
Property Value
Type Description
int?

Methods

OpenRead()

Open the embedded file content for reading.

Declaration
public Stream OpenRead()
Returns
Type Description
Stream

OpenWrite(bool)

Open the embedded file content for writing. Updated bytes are committed when the returned stream is disposed.

Declaration
public Stream OpenWrite(bool compress = true)
Parameters
Type Name Description
bool compress
Returns
Type Description
Stream
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX