Table of Contents

Method GetMetadata

Namespace
LMKit.Document.Pdf
Assembly
LM-Kit.NET.dll

GetMetadata(string)

Returns the metadata of a PDF file.

public static PdfMetadata GetMetadata(string inputPath)

Parameters

inputPath string

Path to the PDF file.

Returns

PdfMetadata

A PdfMetadata instance containing the document metadata.

Examples

using LMKit.Document.Pdf;

var meta = PdfInfo.GetMetadata("report.pdf");
Console.WriteLine($"Title: {meta.Title}");
Console.WriteLine($"Author: {meta.Author}");
Console.WriteLine($"Created: {meta.CreationDate}");

Exceptions

ArgumentNullException

Thrown when inputPath is null.

FileNotFoundException

Thrown when inputPath does not exist.

GetMetadata(Attachment)

Returns the metadata of a PDF attachment.

public static PdfMetadata GetMetadata(Attachment source)

Parameters

source Attachment

The source PDF attachment.

Returns

PdfMetadata

A PdfMetadata instance containing the document metadata.

Exceptions

ArgumentNullException

Thrown when source is null.

ArgumentException

Thrown when the source attachment is not a PDF.

Share