Writing of the code to flatten PDF form in C# can be done by developers of any level using ByteScout PDF SDK. ByteScout PDF SDK helps with flatten PDF form in C#. ByteScout PDF SDK is the library for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings.
C# code snippet like this for ByteScout PDF SDK works best when you need to quickly implement flatten PDF form in your C# application. To do flatten PDF form in your C# project or application you may simply copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample C# codes to add flatten PDF form functions using ByteScout PDF SDK in C#.
Free trial version of ByteScout PDF SDK is available on our website. Get it to try other samples for C#.
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 FlattenFormExample { /// <summary> /// This example demonstrates how to flatten a filled PDF form (make it uneditable). /// </summary> class Program { static void Main() { // Load filled PDF form Document pdfDocument = new Document(@"filled_form.pdf"); pdfDocument.RegistrationName = "demo"; pdfDocument.RegistrationKey = "demo"; // Flatten the form pdfDocument.FlattenDocument(); // Save modified document 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 SDK Home Page
Explore ByteScout PDF SDK Documentation
Explore Samples
Sign Up for ByteScout PDF SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF SDK Home Page
Explore ByteScout PDF SDK Documentation
Explore Samples
Sign Up for ByteScout PDF SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: