This commit is contained in:
17
docs/snippets/csharp/metadata/title.cs
Normal file
17
docs/snippets/csharp/metadata/title.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Kreuzberg;
|
||||
|
||||
var config = new ExtractionConfig
|
||||
{
|
||||
PdfOptions = new PdfConfig
|
||||
{
|
||||
ExtractMetadata = true
|
||||
}
|
||||
};
|
||||
|
||||
var result = KreuzbergLib.ExtractFileSync("document.pdf", config);
|
||||
|
||||
if (result.Metadata?.Format.Pdf != null)
|
||||
{
|
||||
var title = result.Metadata.Format.Pdf.Title;
|
||||
Console.WriteLine($"Title: {title}");
|
||||
}
|
||||
Reference in New Issue
Block a user