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)
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); } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: