Add Disk Buffering to PDF
Adding disk buffering to a PDF using DynamicPDF Core Suite is straightforward, as the following example illustrates.
How to Add Disk Buffering to PDF in C#
The following steps and sample code illustrate how to add disk buffering to a PDF document using DynamicPDF Core Suite.
Steps for Adding Disk Buffering to a PDF Document
- Create a
Document
object. - Create a
DiskBufferingOptions
object and assign a temporary file path for buffering. - Assign the
DiskBufferingOptions
object to theDocument
object'sDiskBuffering
property. - Save the PDF document.
Sample Code - C#
Document document = new Document();
document.Pages.Add(new Page());
DiskBufferingOptions options = new DiskBufferingOptions();
options.Location = @"PhysicalTempFilePath";
document.DiskBuffering = options;
document.Draw( "output.pdf" );
GitHub Project
Clone or view the example project at GitHub. This example code is contained in the Examples/DiskBufferingExample.cs file.
Getting Started
NuGet Package
DynamicPDF Generator is available on NuGet and is part of the ceTe.DynamicPDF.CoreSuite.NET
package. The easiest way to install the package is by using the Visual Studio Package Manager, but you can also download the package directly from NuGet.
DynamicPDF Core Suite Information
DynamicPDF Core Suite contains over 75 page elements you can use to add rich content to a PDF. DynamicPDF Core Suite include selements for creating:
- Images,
- Text Objects (TextArea and Label),
- HTML,
- Barcodes (47 types),
- Form Fields,
- and Charts.
More information can be found at the DynamicPDF Core Suite website.
- [DynamicPDF Core Suite for .NET](https://www.dynamicpdf.com/docs/dotnet/dynamic-pdf-core-suite-welcome"Create PDFs in .NET Core")
Available on Other Platforms
DynamicPDF Core Suite is available for the Java and COM/ActiveX platforms. Refer to the respective product pages for more details.
- Java - DynamicPDF Generator for Java
- COM/ActiveX - DynamicPDF Generator for COM/ActiveX