ByteScout PDF Suite - C# - Set pdf document information with pdf sdk - ByteScout

ByteScout PDF Suite – C# – Set pdf document information with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – C# – Set pdf document information with pdf sdk

How to set pdf document information with pdf sdk in C# with ByteScout PDF Suite

This code in C# shows how to set pdf document information with pdf sdk with this how to tutorial

On this page you will learn from code samples for programming in C#.Writing of the code to set pdf document information with pdf sdk in C# can be executed by programmers of any level using ByteScout PDF Suite. ByteScout PDF Suite: the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can set pdf document information with pdf sdk in C#.

These C# code samples for C# guide developers to speed up coding of the application when using ByteScout PDF Suite. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. Use of ByteScout PDF Suite in C# is also described in the documentation included along with the product.

ByteScout provides the free trial version of ByteScout PDF Suite along with the documentation and source code samples.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.Diagnostics; using Bytescout.PDF; namespace DocumentInformation { /// <summary> /// This example demonstrates how to set various document properties. /// </summary> class Program { static void Main() { // Create new document Document pdfDocument = new Document(); pdfDocument.RegistrationName = "demo"; pdfDocument.RegistrationKey = "demo"; // Change document information. // Open Document Properties in PDF viewer to see the changes. pdfDocument.DocumentInfo.Author = "John Doe"; pdfDocument.DocumentInfo.Creator = "My Application"; pdfDocument.DocumentInfo.Keywords = "accounting,invoice"; pdfDocument.DocumentInfo.Title = "Invoice #12345"; pdfDocument.DocumentInfo.Subject = "Invoice"; pdfDocument.DocumentInfo.CreationDate = new DateTime(2015, 12, 21); pdfDocument.DocumentInfo.ModificationDate = DateTime.Now; // Add empty page to make the document valid pdfDocument.Pages.Add(new Page(PaperFormat.A4)); // Save document to file pdfDocument.Save("result.pdf"); // Cleanup pdfDocument.Dispose(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("result.pdf"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next