Skip to main content

DocumentOptimization

Version: 9.0

cete.dynamicpdf.documentoptimization

DocumentOptimization​

Represents document optimization.

public class DocumentOptimization
Public Class DocumentOptimization

Inheritance: Object → DocumentOptimization

Licensing​

This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Examples​

The following example shows how to remove duplicate image data entries in the document using document optimization.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger

Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As MergeDocument = New MergeDocument("C:\MyduplicateImagedata.pdf")
' Set document optimization
Dim optimization As DocumentOptimization = New DocumentOptimization()
MyDocument.Optimization = optimization

' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;

class MyClass
{
static void Main()
{
// Create a PDF Document
MergeDocument document = new MergeDocument(@"C:\DuplicateImagedata.pdf");

// Set document optimization
document.Optimization = new DocumentOptimization();

// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}

Constructors​

DocumentOptimization()​

Initializes a new instance of the DocumentOptimization class.

public DocumentOptimization()
Public Sub New ()

DocumentOptimization(Boolean)​

Initializes a new instance of the DocumentOptimization class.

public DocumentOptimization(bool images)
Public Sub New (images As Boolean)

Parameters​

Properties​

Images​

Gets or sets a Boolean value indicating whether the images need to be optimized in the document.

public bool Images { get; set; }
Public Property Images As Boolean

Property Value​

Boolean

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF