ByteScout PDF Extractor SDK - ASP.NET - Get Document Information - ByteScout

ByteScout PDF Extractor SDK – ASP.NET – Get Document Information

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – ASP.NET – Get Document Information

ByteScout PDF Extractor SDK – ASP.NET – Get Document Information

Default.aspx.cs

[csharp]
using System;
using Bytescout.PDFExtractor;

namespace ExtractInfo
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// This test file will be copied to the project directory on the pre-build event (see the project properties).
String inputFile = Server.MapPath(@”.\bin\sample1.pdf”);

// Create Bytescout.PDFExtractor.InfoExtractor instance
InfoExtractor extractor = new InfoExtractor();
extractor.RegistrationName = “demo”;
extractor.RegistrationKey = “demo”;

// Load sample PDF document
extractor.LoadDocumentFromFile(inputFile);

// Display document information

Response.Clear();
Response.ContentType = “text/html”;

Response.Write(“Author: ” + extractor.Author + “
“);
Response.Write(“Creator: ” + extractor.Creator + “
“);
Response.Write(“Producer: ” + extractor.Producer + “
“);
Response.Write(“Subject: ” + extractor.Subject + “
“);
Response.Write(“Title: ” + extractor.Title + “
“);
Response.Write(“CreationDate: ” + extractor.CreationDate + “
“);
Response.Write(“Keywords: ” + extractor.Keywords + “
“);
Response.Write(“Bookmarks: ” + extractor.Bookmarks + “
“);
Response.Write(“Encrypted: ” + extractor.Encrypted + “
“);

Response.End();
}
}
}

[/csharp]

Web.config

[text]









[/text]


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next