DiskBufferingOptions

Represents a disk buffering options.

public class DiskBufferingOptions
Public Class DiskBufferingOptions

Inheritance: ObjectDiskBufferingOptions

Licensing Info

This class is a DynamicPDF Core Suite Essentials feature. One of the following is required for non-evaluation usage:

Examples

The following code demonstrates how to enable disk buffering.
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
    
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document()
    
' Create Disk buffering options
Dim MyOptions As DiskBufferingOptions = New DiskBufferingOptions()
    
' Change the default location of the temporary file.
MyOptions.Location = "C:\temp"
MyDocument.DiskBuffering = MyOptions
    
Dim text As String = "To create a table that will appear on the PDF, first instantiate a Table class. Always specify the Height and Width as well as the X and Y coordinates where the table will be placed on the page (the X and Y coordinates is where the top left corner of the Table will be positioned on the page). The height and width specified will be the amount of vertical or horizontal space allotted for the table on a particular page. There is no need to try and guess the height and width of the final table during the instantiation of the Table object (since the table can be based on dynamic data and height or width may not always be known).  While these height and width values are required by the Table's constructor, they can be reset once the Table is filled in.  One strategy may be to set the height and width values to the biggest possible values that the page can accommodate and then go back and re-set them if the table's content is smaller.  In addition to the X, Y, Height and Width, any formatting that has to be the default for the entire table should be specified here"
    
'Create a TextArea page element
Dim MyTextArea As TextArea = New TextArea(text, 50, 50, 400, 600)
    
For i As Integer = 0 To 99999
    Dim MyPage As Page = New Page()
    MyPage.Elements.Add(MyTextArea)
    MyDocument.Pages.Add(MyPage)
Next
    
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
    public static void CreatePDF(string tempFilePath, string outputPath)
    {
       // Create a PDF Document
       Document document = new Document();

       // Create Disk buffering options
       DiskBufferingOptions options = new DiskBufferingOptions();

       // Change the default location of the temporary file.
       options.Location = tempFilePath;
       
       document.DiskBuffering = options;
       string text = "To create a table that will appear on the PDF, first instantiate a Table class. Always specify the Height and Width as well as the X and Y coordinates where the table will be placed on the page (the X and Y coordinates is where the top left corner of the Table will be positioned on the page). The height and width specified will be the amount of vertical or horizontal space allotted for the table on a particular page. There is no need to try and guess the height and width of the final table during the instantiation of the Table object (since the table can be based on dynamic data and height or width may not always be known).  While these height and width values are required by the Table's constructor, they can be reset once the Table is filled in.  One strategy may be to set the height and width values to the biggest possible values that the page can accommodate and then go back and re-set them if the table's content is smaller.  In addition to the X, Y, Height and Width, any formatting that has to be the default for the entire table should be specified here";
       TextArea area = new TextArea(text, 50, 50, 400, 600);
       for (int i = 0; i < 10000; i++)
       {
           Page page = new Page();
           page.Elements.Add(area);
           document.Pages.Add(page);
       }

       // Save the PDF
       document.Draw(outputPath);
    }
}

Constructors

DiskBufferingOptions()Initializes a new instance of the disk buffering options class.

Properties

CurrentGets the default disk buffering options.
EnabledGets or sets disk buffering options.
LocationThe location where to store the temporary file.

Methods

Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF

In this topic