FairPlay License Version 1.0

This software is available as source code, but the licensing differs in some parts strongly from other OpenSource Licenses like the GPL. Please read this license even more carefully, if you have experience with other licenses.

1. This package is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of MERCHANTIBILITY and FITNESS FOR A PARTICULAR PURPOSE.

2. The Software may be used in and distributed for personal and commercial use (like in companies). Linking the software with free programs is allowed and may be distributed with them, even if the programs are used in a commercial environment.

3. Using the software in commercial applications, whether used directly or linked into the application, requires seperate licensing.

4. The software is available as source code. That means that the code required for building the software is publicly available. Changes to the source by others must be documented in the source and the authors must be notified of this. This is not required for changes for internal use.

5. The software and the source may be distributed in unmodified form. You may charge a small amount of money for the CD, bandwidth and similar costs. Selling the source or the compiled software is prohibited without written permission of the copyright holder. Modified versions of this software may only be distributed under the terms of this license. This means, that selling the modified source code and resultant compiled software is prohibited without written permission of the copyright holder, too.The compiled software has to be distributed together with the source or a prominent notice where to find it.

6. The name of the copyright holder may not be used to support or advertise software that was derived from the original without written permission as successor.


pdfforge Namespace

CollapseAll image | DropDown image
C#

Visual Basic

Visual C++

pdfforge.dll help file
pdfforge Namespace
Namespace includes common classes like DllInfo and Tools with belonging interfaces.

Types

All Types | Classes
Name | Description
DllInfo | Properties about this dll like author, version, license etc..
Tools | This class contains tools methods.
Copyright by pdfforge GbR

Send comments on this topic to info@pdfforge.org

Copyright pdfforge GmbH


DllInfo Class

Visual C++

| Members | See Also
pdfforge.dll help file
DllInfo Class
Properties about this dll like author, version, license etc..

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class DllInfo : IDllInfo
Public Class DllInfo _
    Implements IDllInfo
public ref class DllInfo : IDllInfo

Members

All Members | Constructors | Properties | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
DllInfo()()()() | Initializes a new instance of the DllInfo class
Author | Returns the name of the author.
Company | Returns the name of the company.
Copyright | Returns the copyright info.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
License | Returns the license info.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
Name | Returns the name of the dll.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Version | Returns the version info.

Inheritance Hierarchy

System..::..Object
pdfforge..::..DllInfo

See Also

pdfforge Namespace


DllInfo Constructor

| See Also
pdfforge.dll help file
DllInfo Constructor
Initializes a new instance of the DllInfo class

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public DllInfo()
Public Sub New
public:
DllInfo()

See Also

DllInfo Class
pdfforge Namespace


DllInfo Methods

pdfforge.dll help file
DllInfo Methods

The DllInfo type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

See Also

DllInfo Class
pdfforge Namespace


DllInfo Properties

pdfforge.dll help file
DllInfo Properties

The DllInfo type exposes the following properties.

Properties

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
Author | Returns the name of the author.
Company | Returns the name of the company.
Copyright | Returns the copyright info.
License | Returns the license info.
Name | Returns the name of the dll.
Version | Returns the version info.

See Also

DllInfo Class
pdfforge Namespace


Author Property

pdfforge.dll help file
DllInfo..::Author Property
Returns the name of the author.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string Author { get; }
Public ReadOnly Property Author As String
    Get
public:
virtual property String^ Author {
    String^ get () sealed;
}

See Also

DllInfo Class
pdfforge Namespace


Company Property

pdfforge.dll help file
DllInfo..::Company Property
Returns the name of the company.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string Company { get; }
Public ReadOnly Property Company As String
    Get
public:
virtual property String^ Company {
    String^ get () sealed;
}

See Also

DllInfo Class
pdfforge Namespace


Copyright Property

pdfforge.dll help file
DllInfo..::Copyright Property
Returns the copyright info.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string Copyright { get; }
Public ReadOnly Property Copyright As String
    Get
public:
virtual property String^ Copyright {
    String^ get () sealed;
}

See Also

DllInfo Class
pdfforge Namespace


License Property

pdfforge.dll help file
DllInfo..::License Property
Returns the license info.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string License { get; }
Public ReadOnly Property License As String
    Get
public:
virtual property String^ License {
    String^ get () sealed;
}

See Also

DllInfo Class
pdfforge Namespace


Name Property

pdfforge.dll help file
DllInfo..::Name Property
Returns the name of the dll.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string Name { get; }
Public ReadOnly Property Name As String
    Get
public:
virtual property String^ Name {
    String^ get () sealed;
}

See Also

DllInfo Class
pdfforge Namespace


Version Property

pdfforge.dll help file
DllInfo..::Version Property
Returns the version info.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string Version { get; }
Public ReadOnly Property Version As String
    Get
public:
virtual property String^ Version {
    String^ get () sealed;
}

See Also

DllInfo Class
pdfforge Namespace


Tools Class

| Members | See Also
pdfforge.dll help file
Tools Class
This class contains tools methods.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class Tools : ITools
Public Class Tools _
    Implements ITools
public ref class Tools : ITools

Members

All Members | Constructors | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
Tools()()()() | Initializes a new instance of the Tools class
CreatePostScriptTestDocument(String, Int32) | Create a test PostScript file.
CreateTestImage(String, Int32, Int32, Int32) | Create a test image file. Possible formats BMP (*.bmp), EMF (*.emf), GIF(*.gif), JPEG(*.jpg, *.jpeg, *.jfif), PNG (*.png), TIFF (*.tif, *.tiff), WMF (*.wmf).
CreateTestImage(String, Int32, Int32, Int32, Int32) | Create a test image file. Possible format TIFF (*.tif, *.tiff).
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
GetTempFileName()()()() | Get temp filename and try to create it.
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
SaveToTiff(List<(Of <<'(Bitmap>)>>), String) | Save a List of Bitmaps to a tiff sequentially as frames (pages)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

Inheritance Hierarchy

System..::..Object
pdfforge..::..Tools

See Also

pdfforge Namespace


Tools Constructor

pdfforge.dll help file
Tools Constructor
Initializes a new instance of the Tools class

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public Tools()
Public Sub New
public:
Tools()

See Also

Tools Class
pdfforge Namespace


Tools Methods

pdfforge.dll help file
Tools Methods

The Tools type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
CreatePostScriptTestDocument(String, Int32) | Create a test PostScript file.
CreateTestImage(String, Int32, Int32, Int32) | Create a test image file. Possible formats BMP (*.bmp), EMF (*.emf), GIF(*.gif), JPEG(*.jpg, *.jpeg, *.jfif), PNG (*.png), TIFF (*.tif, *.tiff), WMF (*.wmf).
CreateTestImage(String, Int32, Int32, Int32, Int32) | Create a test image file. Possible format TIFF (*.tif, *.tiff).
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
GetTempFileName()()()() | Get temp filename and try to create it.
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
SaveToTiff(List<(Of <<'(Bitmap>)>>), String) | Save a List of Bitmaps to a tiff sequentially as frames (pages)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

See Also

Tools Class
pdfforge Namespace


CreatePostScriptTestDocument Method

| Example | See Also
pdfforge.dll help file
Tools..::CreatePostScriptTestDocument Method
Create a test PostScript file.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int CreatePostScriptTestDocument(
    string destinationFilename,
    int countOfPages
)
Public Function CreatePostScriptTestDocument ( _
    destinationFilename As String, _
    countOfPages As Integer _
) As Integer
public:
virtual int CreatePostScriptTestDocument(
    String^ destinationFilename,
    int countOfPages
) sealed

Parameters

destinationFilename
String
File name of the destination image file.
countOfPages
Int32
Count of pages.

Return Value

-1: If there is any error or countOfPages lesser than 0. Otherwise this method returns the count of pages.

Examples

C# Copy image Copy
Tools tools = new Tools();
tools.CreatePostScriptTestDocument("test.ps", 10);
tools = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim tools
Set tools = WScript.CreateObject("pdfforge.tools")
tools.CreatePostScriptTestDocument "test.ps", 10
Set tools = Nothing
VB6 (VB Classic) Copy image Copy
' Using early binding.
' Add a reference to pdfforge.dll.
Option Explicit
Private Sub CreatePostScriptTestDocument()
 Dim tools As pdfforge.tools
 Set tools = New pdfforge.tools
 tools.CreatePostScriptTestDocument "test.ps", 10
 Set tools = Nothing
End Sub
VB6 (VB Classic) Copy image Copy
' Using late binding.
Option Explicit
Public Sub CreatePostScriptTestDocument()
 Dim tools As Object
 Set tools = CreateObject("pdfforge.tools")
 tools.CreatePostScriptTestDocument "test.ps", 10
 Set tools = Nothing
End Sub

See Also

Tools Class
pdfforge Namespace


CreateTestImage Method

pdfforge.dll help file
Tools..::CreateTestImage Method

Overload List

Name | Description
CreateTestImage(String, Int32, Int32, Int32) | Create a test image file. Possible formats BMP (*.bmp), EMF (*.emf), GIF(*.gif), JPEG(*.jpg, *.jpeg, *.jfif), PNG (*.png), TIFF (*.tif, *.tiff), WMF (*.wmf).
CreateTestImage(String, Int32, Int32, Int32, Int32) | Create a test image file. Possible format TIFF (*.tif, *.tiff).

See Also

Tools Class
pdfforge Namespace


CreateTestImage Method (String, Int32, Int32, Int32)

| Example | See Also
pdfforge.dll help file
Tools..::CreateTestImage Method (String, Int32, Int32, Int32)
Create a test image file. Possible formats BMP (*.bmp), EMF (*.emf), GIF(*.gif), JPEG(*.jpg, *.jpeg, *.jfif), PNG (*.png), TIFF (*.tif, *.tiff), WMF (*.wmf).

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool CreateTestImage(
    string destinationFilename,
    int red,
    int green,
    int blue
)
Public Function CreateTestImage ( _
    destinationFilename As String, _
    red As Integer, _
    green As Integer, _
    blue As Integer _
) As Boolean
public:
virtual bool CreateTestImage(
    String^ destinationFilename,
    int red,
    int green,
    int blue
) sealed

Parameters

destinationFilename
String
File name of the destination image file.
red
Int32
Red part of the color from 0 to 255.
green
Int32
Green part of the color from 0 to 255.
blue
Int32
Blue part of the color from 0 to 255.

Return Value

false: If there is a given unknown graphic file extension or any error.

true: If the image file is created.

Examples

This sample creates a test image file.
C# Copy image Copy
Tools tools = new Tools();
tools.CreateTestImage("Image.png", 175, 89, 210);
tools = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim tools
Set tools = WScript.CreateObject("pdfforge.tools")
tools.CreateTestImage "Image.png", 175, 89, 210
Set tools = Nothing

See Also

Tools Class
CreateTestImage Overload
pdfforge Namespace


CreateTestImage Method (String, Int32, Int32, Int32, Int32)

| Example | See Also
pdfforge.dll help file
Tools..::CreateTestImage Method (String, Int32, Int32, Int32, Int32)
Create a test image file. Possible format TIFF (*.tif, *.tiff).

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool CreateTestImage(
    string destinationFilename,
    int red,
    int green,
    int blue,
    int countOfFrames
)
Public Function CreateTestImage ( _
    destinationFilename As String, _
    red As Integer, _
    green As Integer, _
    blue As Integer, _
    countOfFrames As Integer _
) As Boolean
public:
virtual bool CreateTestImage(
    String^ destinationFilename,
    int red,
    int green,
    int blue,
    int countOfFrames
) sealed

Parameters

destinationFilename
String
File name of the destination image file.
red
Int32
Red part of the color from 0 to 255.
green
Int32
Green part of the color from 0 to 255.
blue
Int32
Blue part of the color from 0 to 255.
countOfFrames
Int32
Count of frames. (Multi-page image like animated gif for example.)

Return Value

false: If countOfFrames lower or equal 0, a given unknown graphic file extension or there is any error.

true: If the image file is created.

Examples

This sample creates a test image file.
C# Copy image Copy
Tools tools = new Tools();
tools.CreateTestImage("Image.tif", 175, 89, 210, 4);
tools = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim tools
Set tools = WScript.CreateObject("pdfforge.tools")
tools.CreateTestImage "Image.tif", 175, 89, 210, 4
Set tools = Nothing

See Also

Tools Class
CreateTestImage Overload
pdfforge Namespace


GetTempFileName Method

| Example | See Also
pdfforge.dll help file
Tools..::GetTempFileName Method
Get temp filename and try to create it.

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string GetTempFileName()
Public Function GetTempFileName As String
public:
virtual String^ GetTempFileName() sealed

Return Value

The name of a temp filename in users temp path.

Examples

This sample returns the name of a created temp file in users temp path.
C# Copy image Copy
Tools tools = new Tools();
string tempFileName = tools.GetTempFileName();
tools = null;
Console.WriteLine(tempFileName);
Visual Basic Script Copy image Copy
Option Explicit
Dim tools, tempFileName
Set tools = WScript.CreateObject("pdfforge.tools")
tempFileName = tools.GetTempFileName
Set tools = Nothing
MsgBox tempFileName

See Also

Tools Class
pdfforge Namespace


SaveToTiff Method

pdfforge.dll help file
Tools..::SaveToTiff Method
Save a List of Bitmaps to a tiff sequentially as frames (pages)

Namespace: pdfforge
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static void SaveToTiff(
    List<Bitmap> frames,
    string path
)
Public Shared Sub SaveToTiff ( _
    frames As List(Of Bitmap), _
    path As String _
)
public:
static void SaveToTiff(
    List<Bitmap^>^ frames,
    String^ path
)

Parameters

frames
List <(Of <(<' Bitmap >)>)>
A list containing the bitmaps to save
path
String
The path to save to tiff file to

See Also

Tools Class
pdfforge Namespace


pdfforge.PDF Namespace

pdfforge.dll help file
pdfforge.PDF Namespace
Namspace includes all pdf methodes with belonging interfaces.

Types

All Types | Classes
Name | Description
PDF | This class contains all available pdf methods.
PDFEncryptor | A class to define an encryptor with all necessary parameters to encrypt a pdf file.
PDFLine | A PDFLine class to draw lines in a pdf file.
PDFRectangle | A PDFRectangle class to draw rectangles in a pdf file.
PDFText | A PDFText class to add text to a page in a pdf file.
PDF..::..X509..::..Signing | This class contains all available members and methods for signing.
PDF..::..X509 | This class contains all available X509 methods.


PDF Class

| Members | See Also
pdfforge.dll help file
PDF Class
This class contains all available pdf methods.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class PDF : IPDF
Public Class PDF _
    Implements IPDF
public ref class PDF : IPDF

Members

All Members | Constructors | Fields | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
PDF()()()() | Initializes a new instance of the PDF class
AddCropMarksToPDFFile(String, String, Int32, Int32, Single, Single, Single, Single, PDFLine%) | Add crop marks to a pdf file.
AddLineToPDFFile(String, String, Int32, Int32, PDFLine%) | Add a line to a pdf.
AddPageNumberToPDFFile(String, String, Int32, Int32, Int32, Int32, Int32, Single, Single, PDFText%) | Add page numbers to a pdf document.
AddRectangleToPDFFile(String, String, Int32, Int32, PDFRectangle%) | Add a rectangle to a pdf.
AddTextAnnotationToPDFFile(String, String, Int32, Int32, PDFRectangle%, String, String, String, Boolean, Boolean, Byte, Byte, Byte) | Add a text annotations to a pdf file.
AddTextToPDFFile(String, String, Int32, Int32, PDFText%) | Add text to a pdf document.
AllowAssembly | This is the constant for the permission AllowAssembly.
AllowCopy | This is the constant for the permission AllowCopy.
AllowFillIn | This is the constant for the permission AllowFillIn.
AllowModifyAnnotations | This is the constant for the permission AllowModifyAnnotations.
AllowModifyContents | This is the constant for the permission AllowModifyContents.
AllowPrinting | This is the constant for the permission AllowPrinting.
AllowPrintingHighResolution | This is the constant for the permission AllowPrintingHighResolution.
AllowScreenreaders | This is the constant for the permission AllowScreenreaders.
Brochure(String, String, Single, Single, Int32) | Sorted the pages of a given pdf file in a brochure format.
Brochure(String, String, String, Int32, Int32) | Sorted the pages of a given pdf file in a brochure format.
CopyPDFFile(String, String, Int32, Int32) | Copy a subset of pages of a given pdf file.
CreatePDFTestDocument(String, Int32, String, Boolean) | This method creates a sample PDF in A4 portrait format.
CreatePDFTestDocument(String, Single, Single, Int32, String, Boolean) | This method creates a sample PDF using a given width and height.
CreatePDFTestDocument(String, String, Int32, Int32, String, Boolean) | This method creates a sample PDF using a given paper size and paper orientation.
EmbedFilesInPDFFile(String, String, array<Object>[]()[][]%, Boolean) | Embed files in a pdf file.
EmbedFilesInPDFFile(String, String, array<String>[]()[][]%, Boolean) | Embed files in a pdf file.
EncryptPDFFile(String, String, PDFEncryptor%) | Encrypt a pdf file.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
ExtractImages(String, String, Int32, String) | Extract images from a pdf file.
FileLength(String) | Returns the file length of a given file.
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetEncryptionSettings(String, String, PDFEncryptor%) | Get the encryption parameters of an encrypted pdf file.
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
GetMetadata(String, String) | Returns the value of a given metadata key like author, subject, keywords etc. of a given pdf file.
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
Images2PDF(array<Object>[]()[][]%, String, Int32) | Convert Images to a single pdf file.
Images2PDF(array<String>[]()[][]%, String, Int32) | Convert Images to a single pdf file.
IsEncrypted(String) | This method returns true if the source file is an encrIypted pdf file.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MergePDFFiles(array<Object>[]()[][]%, String, Boolean) | This method merges the given pdf files in one single pdf file.
MergePDFFiles(array<String>[]()[][]%, String, Boolean) | This method merges the given pdf files in one single pdf file.
NumberOfPages(String) | This method returns number of pages of a given pdf file.
NUp(String, String, Int32) | Put the given count of pages pagesPerPage on one page.
PDFVersion(String) | This method returns the version of a given pdf file.
RemoveEmptyPagesFromPDFFile(String, String) | Removes pages with no content.
RemovePageFromPDFFile(String, String, Int32) | Removes a single page from a pdf file.
ReplacePagesFromPDFFile(String, String, String, Int32, Int32, Int32, Int32) | Replaces the given region of pages for sourceFilename1 with a region of given pages from sourceFilename2.
RotatePages(String, String, Int32, Int32, Int32) | Rotate the given region of pages for sourceFilename with a given angle.
SetBackgroundColor(String, String, Int32, Int32, Byte, Byte, Byte) | Set a background color a the bottom end layer of a pdf page.
SetMetadata(String, String, String, String, String, String, String) | Set a standard set of metadatas of a pdf file.
SetMetadataKey(String, String, String, String) | Set a single metadata key.
SplitPDFFile(String, String) | Split a pdf file in single pages.
StampPDFFileWithImage(String, String, String, Int32, Int32, Boolean, Single, Int32) | Put an image stamp over or under a page of a pdf file.
StampPDFFileWithPDFFile(String, String, String, Int32, Int32, Boolean, Single, Int32) | Put an pdf page stamp over or under a page of a pdf file.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
UpdateXMPMetadata(String, String) | This method updates the the xmp metadata of a given pdf file.

Inheritance Hierarchy

System..::..Object
pdfforge.PDF..::..PDF

See Also

pdfforge.PDF Namespace


PDF Constructor

pdfforge.dll help file
PDF Constructor
Initializes a new instance of the PDF class

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public PDF()
Public Sub New
public:
PDF()

See Also

PDF Class


PDF Fields

pdfforge.dll help file
PDF Fields

The PDF type exposes the following fields.

Fields

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
AllowAssembly | This is the constant for the permission AllowAssembly.
AllowCopy | This is the constant for the permission AllowCopy.
AllowFillIn | This is the constant for the permission AllowFillIn.
AllowModifyAnnotations | This is the constant for the permission AllowModifyAnnotations.
AllowModifyContents | This is the constant for the permission AllowModifyContents.
AllowPrinting | This is the constant for the permission AllowPrinting.
AllowPrintingHighResolution | This is the constant for the permission AllowPrintingHighResolution.
AllowScreenreaders | This is the constant for the permission AllowScreenreaders.

See Also

PDF Class


AllowAssembly Field

pdfforge.dll help file
PDF..::AllowAssembly Field
This is the constant for the permission AllowAssembly.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static int AllowAssembly
Public Shared AllowAssembly As Integer
public:
static int AllowAssembly

See Also

PDF Class


AllowCopy Field

pdfforge.dll help file
PDF..::AllowCopy Field
This is the constant for the permission AllowCopy.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static int AllowCopy
Public Shared AllowCopy As Integer
public:
static int AllowCopy

See Also

PDF Class


AllowFillIn Field

pdfforge.dll help file
PDF..::AllowFillIn Field
This is the constant for the permission AllowFillIn.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static int AllowFillIn
Public Shared AllowFillIn As Integer
public:
static int AllowFillIn

See Also

PDF Class


AllowModifyAnnotations Field

pdfforge.dll help file
PDF..::AllowModifyAnnotations Field
This is the constant for the permission AllowModifyAnnotations.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static int AllowModifyAnnotations
Public Shared AllowModifyAnnotations As Integer
public:
static int AllowModifyAnnotations

See Also

PDF Class


AllowModifyContents Field

pdfforge.dll help file
PDF..::AllowModifyContents Field
This is the constant for the permission AllowModifyContents.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static int AllowModifyContents
Public Shared AllowModifyContents As Integer
public:
static int AllowModifyContents

See Also

PDF Class


AllowPrinting Field

pdfforge.dll help file
PDF..::AllowPrinting Field
This is the constant for the permission AllowPrinting.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static int AllowPrinting
Public Shared AllowPrinting As Integer
public:
static int AllowPrinting

See Also

PDF Class


AllowPrintingHighResolution Field

pdfforge.dll help file
PDF..::AllowPrintingHighResolution Field
This is the constant for the permission AllowPrintingHighResolution.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static int AllowPrintingHighResolution
Public Shared AllowPrintingHighResolution As Integer
public:
static int AllowPrintingHighResolution

See Also

PDF Class


AllowScreenreaders Field

pdfforge.dll help file
PDF..::AllowScreenreaders Field
This is the constant for the permission AllowScreenreaders.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public static int AllowScreenreaders
Public Shared AllowScreenreaders As Integer
public:
static int AllowScreenreaders

See Also

PDF Class


PDF Methods

pdfforge.dll help file
PDF Methods

The PDF type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
AddCropMarksToPDFFile(String, String, Int32, Int32, Single, Single, Single, Single, PDFLine%) | Add crop marks to a pdf file.
AddLineToPDFFile(String, String, Int32, Int32, PDFLine%) | Add a line to a pdf.
AddPageNumberToPDFFile(String, String, Int32, Int32, Int32, Int32, Int32, Single, Single, PDFText%) | Add page numbers to a pdf document.
AddRectangleToPDFFile(String, String, Int32, Int32, PDFRectangle%) | Add a rectangle to a pdf.
AddTextAnnotationToPDFFile(String, String, Int32, Int32, PDFRectangle%, String, String, String, Boolean, Boolean, Byte, Byte, Byte) | Add a text annotations to a pdf file.
AddTextToPDFFile(String, String, Int32, Int32, PDFText%) | Add text to a pdf document.
Brochure(String, String, Single, Single, Int32) | Sorted the pages of a given pdf file in a brochure format.
Brochure(String, String, String, Int32, Int32) | Sorted the pages of a given pdf file in a brochure format.
CopyPDFFile(String, String, Int32, Int32) | Copy a subset of pages of a given pdf file.
CreatePDFTestDocument(String, Int32, String, Boolean) | This method creates a sample PDF in A4 portrait format.
CreatePDFTestDocument(String, Single, Single, Int32, String, Boolean) | This method creates a sample PDF using a given width and height.
CreatePDFTestDocument(String, String, Int32, Int32, String, Boolean) | This method creates a sample PDF using a given paper size and paper orientation.
EmbedFilesInPDFFile(String, String, array<Object>[]()[][]%, Boolean) | Embed files in a pdf file.
EmbedFilesInPDFFile(String, String, array<String>[]()[][]%, Boolean) | Embed files in a pdf file.
EncryptPDFFile(String, String, PDFEncryptor%) | Encrypt a pdf file.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
ExtractImages(String, String, Int32, String) | Extract images from a pdf file.
FileLength(String) | Returns the file length of a given file.
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetEncryptionSettings(String, String, PDFEncryptor%) | Get the encryption parameters of an encrypted pdf file.
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
GetMetadata(String, String) | Returns the value of a given metadata key like author, subject, keywords etc. of a given pdf file.
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
Images2PDF(array<Object>[]()[][]%, String, Int32) | Convert Images to a single pdf file.
Images2PDF(array<String>[]()[][]%, String, Int32) | Convert Images to a single pdf file.
IsEncrypted(String) | This method returns true if the source file is an encrIypted pdf file.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MergePDFFiles(array<Object>[]()[][]%, String, Boolean) | This method merges the given pdf files in one single pdf file.
MergePDFFiles(array<String>[]()[][]%, String, Boolean) | This method merges the given pdf files in one single pdf file.
NumberOfPages(String) | This method returns number of pages of a given pdf file.
NUp(String, String, Int32) | Put the given count of pages pagesPerPage on one page.
PDFVersion(String) | This method returns the version of a given pdf file.
RemoveEmptyPagesFromPDFFile(String, String) | Removes pages with no content.
RemovePageFromPDFFile(String, String, Int32) | Removes a single page from a pdf file.
ReplacePagesFromPDFFile(String, String, String, Int32, Int32, Int32, Int32) | Replaces the given region of pages for sourceFilename1 with a region of given pages from sourceFilename2.
RotatePages(String, String, Int32, Int32, Int32) | Rotate the given region of pages for sourceFilename with a given angle.
SetBackgroundColor(String, String, Int32, Int32, Byte, Byte, Byte) | Set a background color a the bottom end layer of a pdf page.
SetMetadata(String, String, String, String, String, String, String) | Set a standard set of metadatas of a pdf file.
SetMetadataKey(String, String, String, String) | Set a single metadata key.
SplitPDFFile(String, String) | Split a pdf file in single pages.
StampPDFFileWithImage(String, String, String, Int32, Int32, Boolean, Single, Int32) | Put an image stamp over or under a page of a pdf file.
StampPDFFileWithPDFFile(String, String, String, Int32, Int32, Boolean, Single, Int32) | Put an pdf page stamp over or under a page of a pdf file.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
UpdateXMPMetadata(String, String) | This method updates the the xmp metadata of a given pdf file.

See Also

PDF Class


AddCropMarksToPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::AddCropMarksToPDFFile Method
Add crop marks to a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int AddCropMarksToPDFFile(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage,
    float borderTopMillimeter,
    float borderBottomMillimeter,
    float borderLeftMillimeter,
    float borderRightMillimeter,
    ref PDFLine lineObject
)
Public Function AddCropMarksToPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    borderTopMillimeter As Single, _
    borderBottomMillimeter As Single, _
    borderLeftMillimeter As Single, _
    borderRightMillimeter As Single, _
    ByRef lineObject As PDFLine _
) As Integer
public:
virtual int AddCropMarksToPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage,
    float borderTopMillimeter,
    float borderBottomMillimeter,
    float borderLeftMillimeter,
    float borderRightMillimeter,
    PDFLine^% lineObject
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
Start page. Must be bigger than 0.
toPage
Int32
Last page. Use 0 for the last page if you don't know the count of pages.
borderTopMillimeter
Single
How many millimeters should be crop from top.
borderBottomMillimeter
Single
How many millimeters should be crop from bottom.
borderLeftMillimeter
Single
How many millimeters should be crop from left.
borderRightMillimeter
Single
How many millimeters should be crop from right.
lineObject
PDFLine %
A PDFLine object which defines the line parameters.

Return Value

Returns the count of pages which are cropped. 0 if there was an error.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 10, "This is an example.", true);
PDFLine pdfLine = new PDFLine();
pdfLine.UnitsOn = 2;
pdfLine.UnitsOff = 2;
pdfLine.LineColorBlue = 127;
pdf.AddCropMarksToPDFFile("input.pdf", "output.pdf", 1, 0, 10, 10, 10, 10, ref pdfLine);
pdfLine = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, pdfLine
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 10, "This is an example.", true
Set pdfLine  = Wscript.CreateObject("pdfforge.pdf.pdfline")
pdfLine.UnitsOn = 2
pdfLine.UnitsOff = 2
pdf.AddCropMarksToPDFFile "input.pdf", "output.pdf", 1, 0, 10, 10, 10, 10, (pdfLine)
Set pdfLine = Nothing
Set pdf = Nothing

See Also

PDF Class


AddLineToPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::AddLineToPDFFile Method
Add a line to a pdf.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int AddLineToPDFFile(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage,
    ref PDFLine lineObject
)
Public Function AddLineToPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    ByRef lineObject As PDFLine _
) As Integer
public:
virtual int AddLineToPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage,
    PDFLine^% lineObject
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
Start page. Must be bigger than 0.
toPage
Int32
Last page. Use 0 for the last page if you don't know the count of pages.
lineObject
PDFLine %
A PDFLine object which defines the line parameters.

Return Value

Returns the count of pages on which a line is added. 0 if there was an error.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 1, "This is an example.", true);
PDFLine pdfLine = new PDFLine();
pdfLine.FromX = 20;
pdfLine.FromY = 20;
pdfLine.ToX = pdfLine.FromX + 180;
pdfLine.ToY = pdfLine.FromY + 230;
pdfLine.LineColorBlue = 255;
pdfLine.LineThickness = 4;
pdfLine.UnitsOn = 10;
pdfLine.UnitsOff = 10;
pdfLine.Phase = 5;
pdf.AddLineToPDFFile("input.pdf", "output.pdf", 1, 1, ref pdfLine);
pdfLine = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, pdfLine
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 10, "This is an example.", true
Set pdfLine  = Wscript.CreateObject("pdfforge.pdf.pdfline")
pdfLine.FromX = 20
pdfLine.FromY = 20
pdfLine.ToX = pdfLine.FromX + 180
pdfLine.ToY = pdfLine.FromY + 230
pdfLine.LineColorBlue = 255
pdfLine.LineThickness = 4
pdfLine.UnitsOn = 10
pdfLine.UnitsOff = 10
pdfLine.Phase = 5
pdf.AddLineToPDFFile "input.pdf", "output.pdf", 1, 1, (pdfLine)
Set pdfLine = Nothing
Set pdf = Nothing

See Also

PDF Class


AddPageNumberToPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::AddPageNumberToPDFFile Method
Add page numbers to a pdf document.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int AddPageNumberToPDFFile(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage,
    int startPageNumber,
    int numberOfPages,
    int pageNumberPosition,
    float borderXMillimeter,
    float borderYMillimeter,
    ref PDFText textObject
)
Public Function AddPageNumberToPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    startPageNumber As Integer, _
    numberOfPages As Integer, _
    pageNumberPosition As Integer, _
    borderXMillimeter As Single, _
    borderYMillimeter As Single, _
    ByRef textObject As PDFText _
) As Integer
public:
virtual int AddPageNumberToPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage,
    int startPageNumber,
    int numberOfPages,
    int pageNumberPosition,
    float borderXMillimeter,
    float borderYMillimeter,
    PDFText^% textObject
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
Start page. Must be bigger than 0.
toPage
Int32
Last page. Use 0 for the last page if you don't know the count of pages.
startPageNumber
Int32
Start page number.
numberOfPages
Int32
Number of pages.
pageNumberPosition
Int32
Page number position: Possible values: 1-6, 1: top left, 2: top middle, 3: top right, 4: bottom left, 5: bottom middle, 6: bottom right
borderXMillimeter
Single
X-Position in millimeters from border.
borderYMillimeter
Single
Y-Position in millimeters from border.
textObject
PDFText %
A PDFText object which defines the text parameters.

Return Value

Returns the count of pages on which a page number is added. 0 if there was an error.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 10, "This is an example.", false);
PDFText pdfText = new PDFText();
pdfText.Text = "[PAGE] ([PAGES])";
pdfText.FontColorRed = 200;
pdfText.FontName = "Arial.ttf";
pdfText.FontPath = System.IO.Path.Combine(System.Environment.GetEnvironmentVariable("windir"), "Fonts");
pdfText.FontSize = 12;
pdf.AddPageNumberToPDFFile("input.pdf", "output.pdf", 2, 10, 2, 10, 6, 15, 15, ref pdfText);
pdfText = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, pdfText, WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 10, "This is an example.", false
Set pdfText  = Wscript.CreateObject("pdfforge.pdf.pdfText")
pdfText.Text = "[PAGE] ([PAGES])"
pdfText.FontColorRed = 200
pdfText.FontName = "Arial.ttf"
pdfText.FontPath = WshShell.SpecialFolders("Fonts")
pdfText.FontSize = 12
pdf.AddPageNumberToPDFFile "input.pdf", "output.pdf", 2, 10, 2, 10, 6, 15, 15, (pdfText)
Set pdfText = Nothing
Set pdf = Nothing

See Also

PDF Class


AddRectangleToPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::AddRectangleToPDFFile Method
Add a rectangle to a pdf.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int AddRectangleToPDFFile(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage,
    ref PDFRectangle rectangleObject
)
Public Function AddRectangleToPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    ByRef rectangleObject As PDFRectangle _
) As Integer
public:
virtual int AddRectangleToPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage,
    PDFRectangle^% rectangleObject
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
Start page. Must be bigger than 0.
toPage
Int32
Last page. Use 0 for the last page if you don't know the count of pages.
rectangleObject
PDFRectangle %
A PDFRectangle object which defines the rectangle parameters.

Return Value

Returns the count of pages on which a rectangle is added. 0 if there was an error.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 1, "This is an example.", true);
PDFRectangle pdfRectangle = new PDFRectangle();
pdfRectangle.LowerLeftX = 20;
pdfRectangle.LowerLeftY = 20;
pdfRectangle.UpperRightX = 200;
pdfRectangle.UpperRightY = 250;
pdfRectangle.BorderColorRed = 255;
pdf.AddRectangleToPDFFile("input.pdf", "output.pdf", 1, 1, ref pdfRectangle);
pdfRectangle.LowerLeftX = 50;
pdfRectangle.LowerLeftY = 650;
pdfRectangle.UpperRightX = 150;
pdfRectangle.UpperRightY = 750;

pdf.AddRectangleToPDFFile("output.pdf", "output2.pdf", 1, 1, ref pdfRectangle);
pdfRectangle = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, pdfRectangle
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 10, "This is an example.", true
Set pdfRectangle  = Wscript.CreateObject("pdfforge.pdf.pdfrectangle")
pdfRectangle.LowerLeftX = 20
pdfRectangle.LowerLeftY = 20
pdfRectangle.UpperRightX = 200
pdfRectangle.UpperRightY = 250
pdfRectangle.BorderColorRed = 255
pdf.AddRectangleToPDFFile "input.pdf", "output.pdf", 1, 1, (pdfRectangle)
Set pdfRectangle = Nothing
Set pdf = Nothing

See Also

PDF Class


AddTextAnnotationToPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::AddTextAnnotationToPDFFile Method
Add a text annotations to a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int AddTextAnnotationToPDFFile(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage,
    ref PDFRectangle rectangleObject,
    string title,
    string text,
    string icon,
    bool open,
    bool locked,
    byte colorRed,
    byte colorGreen,
    byte colorBlue
)
Public Function AddTextAnnotationToPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    ByRef rectangleObject As PDFRectangle, _
    title As String, _
    text As String, _
    icon As String, _
    open As Boolean, _
    locked As Boolean, _
    colorRed As Byte, _
    colorGreen As Byte, _
    colorBlue As Byte _
) As Integer
public:
virtual int AddTextAnnotationToPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage,
    PDFRectangle^% rectangleObject,
    String^ title,
    String^ text,
    String^ icon,
    bool open,
    bool locked,
    unsigned char colorRed,
    unsigned char colorGreen,
    unsigned char colorBlue
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
Start page. Must be bigger than 0.
toPage
Int32
Last page. Use 0 for the last page if you don't know the count of pages.
rectangleObject
PDFRectangle %
A PDFRectangle object which defines the rectangle dimensions of the annotation. All other parameters of PDFRectangle ​​are ignored.
title
String
Title of the annotation.
text
String
Text of the annotation.
icon
String
The displayed annotation icon. Valid values are: Comment, Key, Note, Help, NewParagraph, Paragraph, Insert. If the parameter is empty the value Comment is used.
open
Boolean
Is the annotation open?
locked
Boolean
Is the annotation text editable?
colorRed
Byte
The red color part of the annotation.
colorGreen
Byte
The green color part of the annotation.
colorBlue
Byte
The blue color part of the annotation.

Return Value

Returns the count of changed pages. 0 if there was an error.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 1, "This is an example.", true);
PDFRectangle pdfRectangle = new PDFRectangle();
pdfRectangle.LowerLeftX = 20;
pdfRectangle.LowerLeftY = 650;
pdfRectangle.UpperRightX = 180;
pdfRectangle.UpperRightY = 690;
pdfRectangle.BorderColorRed = 255;
pdf.AddRectangleToPDFFile("input.pdf", "rectangle.pdf", 1, 1, ref pdfRectangle);
pdf.AddTextAnnotationToPDFFile("rectangle.pdf", "output.pdf", 1, 1, ref pdfRectangle, "Title", "Lorem ipsum dolor sit amet.", "Comment", true, true, 255, 255, 0);
pdfRectangle = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, pdfRectangle
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 10, "This is an example.", true
Set pdfRectangle  = Wscript.CreateObject("pdfforge.pdf.pdfrectangle")
pdfRectangle.LowerLeftX = 20
pdfRectangle.LowerLeftY = 650
pdfRectangle.UpperRightX = 180
pdfRectangle.UpperRightY = 690
pdfRectangle.BorderColorRed = 255
pdf.AddRectangleToPDFFile "input.pdf", "rectangle.pdf", 1, 1, (pdfRectangle)
pdf.AddTextAnnotationToPDFFile "rectangle.pdf", "output.pdf", 1, 1, (pdfRectangle), "Title", "Lorem ipsum dolor sit amet.", "Comment", true, true, 255, 255, 0
Set pdfRectangle = Nothing
Set pdf = Nothing

See Also

PDF Class


AddTextToPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::AddTextToPDFFile Method
Add text to a pdf document.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int AddTextToPDFFile(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage,
    ref PDFText textObject
)
Public Function AddTextToPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    ByRef textObject As PDFText _
) As Integer
public:
virtual int AddTextToPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage,
    PDFText^% textObject
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
Start page. Must be bigger than 0.
toPage
Int32
Last page. Use 0 for the last page if you don't know the count of pages.
textObject
PDFText %
A PDFText object which defines the text parameters.

Return Value

Returns the count of pages on which text is added. 0 if there was an error.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 10, "This is an example.", true);
PDFText pdfText = new PDFText();
pdfText.FillOpacity = 1;
pdfText.FontColorBlue = 255;
pdfText.FontColorGreen = 127;
pdfText.FontColorRed = 200;
pdfText.FontName = "arial.ttf";
pdfText.FontPath = System.IO.Path.Combine(System.Environment.GetEnvironmentVariable("windir"), "Fonts");
pdfText.FontSize = 48;
pdfText.Rotation = 90;
pdfText.Text = "Hello world";
pdfText.XPosition = 50;
pdfText.YPosition = 90;
pdf.AddTextToPDFFile("input.pdf", "output.pdf", 1, 1, ref pdfText);

pdfText.FontColorBlue = 50;
pdfText.XPosition = 70;
pdfText.YPosition = 110;
pdf.AddTextToPDFFile("output.pdf", "output2.pdf", 1, 1, ref pdfText);

pdfText.FontColorBlue = 0;
pdfText.FontColorGreen = 57;
pdfText.FontColorRed = 255;
pdfText.XPosition = 90;
pdfText.YPosition = 130;
pdf.AddTextToPDFFile("output2.pdf", "output.pdf", 1, 1, ref pdfText);

pdfText.FontColorBlue = 255;
pdfText.FontColorGreen = 0;
pdfText.FontColorRed = 0;
pdfText.XPosition = 110;
pdfText.YPosition = 150;
pdf.AddTextToPDFFile("output.pdf", "output2.pdf", 1, 1, ref pdfText);

pdfText.FillOpacity = 0.5f;
pdfText.FontColorBlue = 100;
pdfText.FontColorGreen = 127;
pdfText.FontColorRed = 255;
pdfText.FontName = "times.ttf";
pdfText.FontSize = 144;
pdfText.Rotation = 30;
pdfText.Text = "pdfforge";
pdfText.XPosition = 30;
pdfText.YPosition = 110;
pdf.AddTextToPDFFile("output2.pdf", "output.pdf", 1, 1, ref pdfText);

pdfText = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, pdfText, WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 10, "This is an example.", true
Set pdfText  = Wscript.CreateObject("pdfforge.pdf.pdfText")
pdfText.FillOpacity = 1
pdfText.FontColorBlue = 255
pdfText.FontColorGreen = 127
pdfText.FontColorRed = 200
pdfText.FontName = "arial.ttf"
pdfText.FontPath = WshShell.SpecialFolders("Fonts")
pdfText.FontSize = 48
pdfText.Rotation = 90
pdfText.Text = "Hello world"
pdfText.XPosition = 50
pdfText.YPosition = 90
pdf.AddTextToPDFFile "input.pdf", "output.pdf", 1, 1, (pdfText)

pdfText.FontColorBlue = 50
pdfText.XPosition = 70
pdfText.YPosition = 110
pdf.AddTextToPDFFile "output.pdf", "output2.pdf", 1, 1, (pdfText)

pdfText.FontColorBlue = 0
pdfText.FontColorGreen = 57
pdfText.FontColorRed = 255
pdfText.XPosition = 90
pdfText.YPosition = 130
pdf.AddTextToPDFFile "output2.pdf", "output.pdf", 1, 1, (pdfText)

pdfText.FontColorBlue = 255
pdfText.FontColorGreen = 0
pdfText.FontColorRed = 0
pdfText.XPosition = 110
pdfText.YPosition = 150
pdf.AddTextToPDFFile "output.pdf", "output2.pdf", 1, 1, (pdfText)

pdfText.FillOpacity = 0.5
pdfText.FontColorBlue = 100
pdfText.FontColorGreen = 127
pdfText.FontColorRed = 255
pdfText.FontName = "times.ttf"
pdfText.FontSize = 144
pdfText.Rotation = 30
pdfText.Text = "pdfforge"
pdfText.XPosition = 30
pdfText.YPosition = 110
pdf.AddTextToPDFFile "output2.pdf", "output.pdf", 1, 1, (pdfText)

Set pdfText = Nothing
Set pdf = Nothing

See Also

PDF Class


Brochure Method

pdfforge.dll help file
PDF..::Brochure Method

Overload List

Name | Description
Brochure(String, String, Single, Single, Int32) | Sorted the pages of a given pdf file in a brochure format.
Brochure(String, String, String, Int32, Int32) | Sorted the pages of a given pdf file in a brochure format.

See Also

PDF Class


Brochure Method (String, String, Single, Single, Int32)

| Example | See Also
pdfforge.dll help file
PDF..::Brochure Method (String, String, Single, Single, Int32)
Sorted the pages of a given pdf file in a brochure format.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int Brochure(
    string sourceFilename,
    string destinationFilename,
    float width,
    float height,
    int pageAlign
)
Public Function Brochure ( _
    sourceFilename As String, _
    destinationFilename As String, _
    width As Single, _
    height As Single, _
    pageAlign As Integer _
) As Integer
public:
virtual int Brochure(
    String^ sourceFilename,
    String^ destinationFilename,
    float width,
    float height,
    int pageAlign
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
width
Single
Width of the brochure in millimeters.
height
Single
Height of the brochure in millimeters.
pageAlign
Int32
Valid values for page align are: 0 - Center, 1 - InnerBound, 2 - OuterBound

Return Value

0: If there is any error. Otherwise this method returns the count of pages of result file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 16, "This is an example.", true);
pdf.Brochure("input.pdf", "output.pdf", 297, 210, 1);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 16, "This is an example.", true
pdf.Brochure "input.pdf", "output.pdf", 297, 210, 1
Set pdf = Nothing

See Also

PDF Class
Brochure Overload


Brochure Method (String, String, String, Int32, Int32)

| Example | See Also
pdfforge.dll help file
PDF..::Brochure Method (String, String, String, Int32, Int32)
Sorted the pages of a given pdf file in a brochure format.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int Brochure(
    string sourceFilename,
    string destinationFilename,
    string pageSize,
    int pageOrientation,
    int pageAlign
)
Public Function Brochure ( _
    sourceFilename As String, _
    destinationFilename As String, _
    pageSize As String, _
    pageOrientation As Integer, _
    pageAlign As Integer _
) As Integer
public:
virtual int Brochure(
    String^ sourceFilename,
    String^ destinationFilename,
    String^ pageSize,
    int pageOrientation,
    int pageAlign
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
pageSize
String
Valid values for pagesize are: 11x17, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ARCH_A, ARCH_B, ARCH_C, ARCH_D, ARCH_E, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, CROWN_OCTAVO, CROWN_QUARTO, DEMY_OCTAVO, DEMY_QUARTO, EXECUTIVE, FLSA, FLSE, HALFLETTER, ID_1, ID_2, ID_3, LEDGER, LEGAL, LETTER, NOTE, PENGUIN_LARGE_PAPERBACK, PENGUIN_SMALL_PAPERBACK, POSTCARD, ROYAL_OCTAVO, ROYAL_QUARTO, SMALL_PAPERBACK, TABLOID
pageOrientation
Int32
Valid values for pageorientation are: 0 - Portrait, 1 - Landscape
pageAlign
Int32
Valid values for page align are: 0 - Center, 1 - InnerBound, 2 - OuterBound

Return Value

0: If there is any error. Otherwise this method returns the count of pages of result file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 16, "This is an example.", true);
pdf.Brochure("input.pdf", "output.pdf", "A4", 1, 1);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 16, "This is an example.", true
pdf.Brochure "input.pdf", "output.pdf", "A4", 1, 1
Set pdf = Nothing

See Also

PDF Class
Brochure Overload


CopyPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::CopyPDFFile Method
Copy a subset of pages of a given pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int CopyPDFFile(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage
)
Public Function CopyPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer _
) As Integer
public:
virtual int CopyPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
First page which should copy.
toPage
Int32
Last page which should copy.

Return Value

0: If there is any error. Otherwise this method returns the count of pages of result file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 16, "This is an example.", true);
pdf.CopyPDFFile("input.pdf", "output.pdf", 2, 5);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 16, "This is an example.", true
pdf.CopyPDFFile "input.pdf", "output.pdf", 2, 5
Set pdf = Nothing

See Also

PDF Class


CreatePDFTestDocument Method

pdfforge.dll help file
PDF..::CreatePDFTestDocument Method

Overload List

Name | Description
CreatePDFTestDocument(String, Int32, String, Boolean) | This method creates a sample PDF in A4 portrait format.
CreatePDFTestDocument(String, Single, Single, Int32, String, Boolean) | This method creates a sample PDF using a given width and height.
CreatePDFTestDocument(String, String, Int32, Int32, String, Boolean) | This method creates a sample PDF using a given paper size and paper orientation.

See Also

PDF Class


CreatePDFTestDocument Method (String, Int32, String, Boolean)

| Example | See Also
pdfforge.dll help file
PDF..::CreatePDFTestDocument Method (String, Int32, String, Boolean)
This method creates a sample PDF in A4 portrait format.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int CreatePDFTestDocument(
    string destinationFilename,
    int countOfPages,
    string additionalText,
    bool addPagenumbers
)
Public Function CreatePDFTestDocument ( _
    destinationFilename As String, _
    countOfPages As Integer, _
    additionalText As String, _
    addPagenumbers As Boolean _
) As Integer
public:
virtual int CreatePDFTestDocument(
    String^ destinationFilename,
    int countOfPages,
    String^ additionalText,
    bool addPagenumbers
) sealed

Parameters

destinationFilename
String
Name of the pdf destination file.
countOfPages
Int32
Count of pages. This value must be greater or equal 0.
additionalText
String
A string which can be added on each page.
addPagenumbers
Boolean
Add page numbers independent if you use 'NoContent' for additionalText.

Return Value

-1: If there is any error or countOfPages lesser than 0. Otherwise this method returns the count of pages.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", true
Set pdf = Nothing
VB6 (VB Classic) Copy image Copy
' Add a reference to pdfforge.dll.
Option Explicit
Dim pdf As pdfforge.pdf
Private Sub CreatePDFTestDocument()
 Set pdf = New pdfforge.pdf
 pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", True
 Set pdf = Nothing
End Sub

See Also

PDF Class
CreatePDFTestDocument Overload


CreatePDFTestDocument Method (String, Single, Single, Int32, String, Boolean)

| Example | See Also
pdfforge.dll help file
PDF..::CreatePDFTestDocument Method (String, Single, Single, Int32, String, Boolean)
This method creates a sample PDF using a given width and height.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int CreatePDFTestDocument(
    string destinationFilename,
    float width,
    float height,
    int countOfPages,
    string additionalText,
    bool addPagenumbers
)
Public Function CreatePDFTestDocument ( _
    destinationFilename As String, _
    width As Single, _
    height As Single, _
    countOfPages As Integer, _
    additionalText As String, _
    addPagenumbers As Boolean _
) As Integer
public:
virtual int CreatePDFTestDocument(
    String^ destinationFilename,
    float width,
    float height,
    int countOfPages,
    String^ additionalText,
    bool addPagenumbers
) sealed

Parameters

destinationFilename
String
Name of the pdf destination file.
width
Single
Width of pages in millimeters.
height
Single
Height of pages in millimeters.
countOfPages
Int32
Count of pages. This value must be greater or equal 0.
additionalText
String
A string which can be added on each page.
addPagenumbers
Boolean
Add page numbers independent if you use 'NoContent' for additionalText.

Return Value

-1: If there is any error or countOfPages lesser than 0. Otherwise this method returns the count of pages.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 297, 210, 10, "This is an example.", true);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 210, 297, 10, "This is an example.", true
Set pdf = Nothing
VB6 (VB Classic) Copy image Copy
' Add a reference to pdfforge.dll.
Option Explicit
Dim pdf As pdfforge.pdf
Private Sub CreatePDFTestDocument()
 Set pdf = New pdfforge.pdf
 pdf.CreatePDFTestDocument "output.pdf", 210, 297, 10, "This is an example.", True
 Set pdf = Nothing
End Sub

See Also

PDF Class
CreatePDFTestDocument Overload


CreatePDFTestDocument Method (String, String, Int32, Int32, String, Boolean)

| Example | See Also
pdfforge.dll help file
PDF..::CreatePDFTestDocument Method (String, String, Int32, Int32, String, Boolean)
This method creates a sample PDF using a given paper size and paper orientation.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int CreatePDFTestDocument(
    string destinationFilename,
    string pageSize,
    int pageOrientation,
    int countOfPages,
    string additionalText,
    bool addPagenumbers
)
Public Function CreatePDFTestDocument ( _
    destinationFilename As String, _
    pageSize As String, _
    pageOrientation As Integer, _
    countOfPages As Integer, _
    additionalText As String, _
    addPagenumbers As Boolean _
) As Integer
public:
virtual int CreatePDFTestDocument(
    String^ destinationFilename,
    String^ pageSize,
    int pageOrientation,
    int countOfPages,
    String^ additionalText,
    bool addPagenumbers
) sealed

Parameters

destinationFilename
String
Name of the pdf destination file.
pageSize
String
Valid values for paper size are: 11x17, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ARCH_A, ARCH_B, ARCH_C, ARCH_D, ARCH_E, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, CROWN_OCTAVO, CROWN_QUARTO, DEMY_OCTAVO, DEMY_QUARTO, EXECUTIVE, FLSA, FLSE, HALFLETTER, ID_1, ID_2, ID_3, LEDGER, LEGAL, LETTER, NOTE, PENGUIN_LARGE_PAPERBACK, PENGUIN_SMALL_PAPERBACK, POSTCARD, ROYAL_OCTAVO, ROYAL_QUARTO, SMALL_PAPERBACK, TABLOID
pageOrientation
Int32
Valid values for paper orientation are: 0 - Portrait, 1 - Landscape
countOfPages
Int32
Count of pages. This value must be greater or equal 0.
additionalText
String
A string which can be added on each page.
addPagenumbers
Boolean
Add page numbers independent if you use 'NoContent' for additionalText.

Return Value

-1: If there is any error or countOfPages lesser than 0. Otherwise this method returns the count of pages.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", "A4", 0, 10, "This is an example.", true);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", "A4", 0, 10, "This is an example.", true
Set pdf = Nothing
VB6 (VB Classic) Copy image Copy
' Add a reference to pdfforge.dll.
Option Explicit
Dim pdf As pdfforge.pdf
Private Sub CreatePDFTestDocument()
 Set pdf = New pdfforge.pdf
 pdf.CreatePDFTestDocument "test.pdf", "A4", 0, 10, "This is an example.", True
 Set pdf = Nothing
End Sub

See Also

PDF Class
CreatePDFTestDocument Overload


EmbedFilesInPDFFile Method

pdfforge.dll help file
PDF..::EmbedFilesInPDFFile Method

Overload List

Name | Description
EmbedFilesInPDFFile(String, String, array<Object>[]()[][]%, Boolean) | Embed files in a pdf file.
EmbedFilesInPDFFile(String, String, array<String>[]()[][]%, Boolean) | Embed files in a pdf file.

See Also

PDF Class


EmbedFilesInPDFFile Method (String, String, Object[], Boolean)

| Example | See Also
pdfforge.dll help file
PDF..::EmbedFilesInPDFFile Method (String, String, array<Object>[]()[][]%, Boolean)
Embed files in a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public void EmbedFilesInPDFFile(
    string sourceFilename,
    string destinationFilename,
    ref Object[] embedFilenames,
    bool compress
)
Public Sub EmbedFilesInPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    ByRef embedFilenames As Object(), _
    compress As Boolean _
)
public:
virtual void EmbedFilesInPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    array<Object^>^% embedFilenames,
    bool compress
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
embedFilenames
array< Object >[]()[][]%
A list of files which should embed.
compress
Boolean
true: If the embedded file should compress.

Examples

C# Copy image Copy
string[] embeddedFilenames = new string[1];
embeddedFilenames[0] = "image1.png";
Tools tools = new Tools();
tools.CreateTestImage(embeddedFilenames[0], 255, 0, 0);
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
pdf.EmbedFilesInPDFFile("test.pdf", "output.pdf", ref embeddedFilenames, true);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, tools, embeddedFilenames(0)
embeddedFilenames(0) = "image1.png"
Set tools = WScript.CreateObject("pdfforge.tools")
tools.CreateTestImage embeddedFilenames(0), 255, 0, 0
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", true
pdf.EmbedFilesInPDFFile_2 "input.pdf", "output.pdf", (embeddedFilenames), true
Set pdf = Nothing

See Also

PDF Class
EmbedFilesInPDFFile Overload


EmbedFilesInPDFFile Method (String, String, String[], Boolean)

| Example | See Also
pdfforge.dll help file
PDF..::EmbedFilesInPDFFile Method (String, String, array<String>[]()[][]%, Boolean)
Embed files in a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public void EmbedFilesInPDFFile(
    string sourceFilename,
    string destinationFilename,
    ref string[] embedFilenames,
    bool compress
)
Public Sub EmbedFilesInPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    ByRef embedFilenames As String(), _
    compress As Boolean _
)
public:
virtual void EmbedFilesInPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    array<String^>^% embedFilenames,
    bool compress
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
embedFilenames
array< String >[]()[][]%
A list of files which should embed.
compress
Boolean
true: If the embedded file should compress.

Examples

C# Copy image Copy
string[] embeddedFilenames = new string[1];
embeddedFilenames[0] = "image1.png";
Tools tools = new Tools();
tools.CreateTestImage(embeddedFilenames[0], 255, 0, 0);
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
pdf.EmbedFilesInPDFFile("test.pdf", "output.pdf", ref embeddedFilenames, true);
pdf = null;
Visual Basic Script Copy image Copy
See EmbedFilesInPDFFile(String, String, array<Object>[]()[][]%, Boolean).

See Also

PDF Class
EmbedFilesInPDFFile Overload


EncryptPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::EncryptPDFFile Method
Encrypt a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int EncryptPDFFile(
    string sourceFilename,
    string destinationFilename,
    ref PDFEncryptor enc
)
Public Function EncryptPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    ByRef enc As PDFEncryptor _
) As Integer
public:
virtual int EncryptPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    PDFEncryptor^% enc
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
enc
PDFEncryptor %
A PDFEncryptor object.

Return Value

-1: if there was an error. 0: If there were no errors.

Examples

C# Copy image Copy
PDFEncryptor enc = new PDFEncryptor();
enc.AllowAssembly = false;
enc.AllowCopy = false;
enc.AllowFillIn = true;
enc.AllowModifyAnnotations = false;
enc.AllowModifyContents = false;
enc.AllowPrinting = true;
enc.AllowPrintingHighResolution = false;
enc.AllowScreenreaders = false;
enc.EncryptionMethod = 2;
enc.OwnerPassword = "pdfforge";
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
int res = pdf.EncryptPDFFile("test.pdf", "encrypted.pdf", ref enc);
if (res == -1)
    Console.WriteLine("Encryption failed: Unknown encryption method");
else if (res == -2)
    Console.WriteLine("Encryption failed: Empty passwords");
enc = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, enc, res
Set enc = WScript.CreateObject("pdfforge.pdf.PDFEncryptor")
enc.AllowAssembly = false
enc.AllowCopy = false
enc.AllowFillIn = true
enc.AllowModifyAnnotations = false
enc.AllowModifyContents = false
enc.AllowPrinting = true
enc.AllowPrintingHighResolution = false
enc.AllowScreenreaders = false
enc.EncryptionMethod = 2
enc.OwnerPassword = "pdfforge"
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", true
res = pdf.EncryptPDFFile("test.pdf", "encrypted.pdf", (enc))
if res = -1 then
 MsgBox "Encryption failed: Unknown encryption method"
elseif res = -2 then
 MsgBox "Encryption failed: Empty passwords"
end if
Set enc = Nothing
Set pdf = Nothing
VB6 (VB Classic) Copy image Copy
' Using late binding.
Option Explicit
Public Function EncryptPDFUsingPdfforgeDll() As Boolean
 Dim pdf As Object, enc As Object, res As Long
 Set enc = CreateObject("pdfforge.pdf.PDFEncryptor")

 enc.AllowAssembly = False
 enc.AllowCopy = False
 enc.AllowFillIn = False
 enc.AllowModifyAnnotations = False
 enc.AllowModifyContents = False
 enc.AllowPrinting = True
 enc.AllowPrintingHighResolution = False
 enc.AllowScreenReaders = True
 enc.EncryptionMethod = 2
 enc.OwnerPassword = "pdfforge"
 enc.UserPassword = ""
 Set pdf = CreateObject("pdfforge.pdf.pdf")
 pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", True
 res = pdf.EncryptPDFFile("test.pdf", "encrypted.pdf", enc)
 If res = 0 Then
  EncryptPDFUsingPdfforgeDll = True
 Else
  EncryptPDFUsingPdfforgeDll = False ' -1: Unknown encryption method; -2: empty passwords
 End If
End Function

See Also

PDF Class


ExtractImages Method

| Example | See Also
pdfforge.dll help file
PDF..::ExtractImages Method
Extract images from a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int ExtractImages(
    string sourceFilename,
    string destinationPath,
    int pageNumber,
    string destinationFileNamePrefix
)
Public Function ExtractImages ( _
    sourceFilename As String, _
    destinationPath As String, _
    pageNumber As Integer, _
    destinationFileNamePrefix As String _
) As Integer
public:
virtual int ExtractImages(
    String^ sourceFilename,
    String^ destinationPath,
    int pageNumber,
    String^ destinationFileNamePrefix
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationPath
String
Name of the pdf destination path.
pageNumber
Int32
The page from which the images should be extracted.
destinationFileNamePrefix
String
The filename prefix of the images filename.

Return Value

-1: If there is any. Otherwise this method returns the count of images which are extracted.

Examples

C# Copy image Copy
string fileName = @"C:\PDFs\MyPDF.pdf";
int numberOfImagesPerPage = 0, numberOfImagesPerDocument = 0;
PDF pdf = new PDF();
int numberOfPages = pdf.NumberOfPages(fileName);
string ImagesPath = @"C:\PDFs\Images";
if (!Directory.Exists(ImagesPath))
    Directory.CreateDirectory(ImagesPath);
for (int i = 1; i <= numberOfPages; i++)
{
    numberOfImagesPerPage = pdf.ExtractImages(fileName, ImagesPath, i, "Page_" + i.ToString() + "_");
    numberOfImagesPerDocument = numberOfImagesPerDocument + numberOfImagesPerPage;
    if (numberOfImagesPerPage > 0)
        Console.WriteLine("Page {0} [{1}]: {2} image(s) extracted", i, numberOfPages, numberOfImagesPerPage);
}
Console.WriteLine("Document {0}: {1} images extracted", Path.GetFileName(fileName), numberOfImagesPerDocument);
Console.ReadLine();
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, fileName, numberOfPages, numberOfImagesPerPage, numberOfImagesPerDocument, ImagesPath, fso, i
fileName = "C:\PDFs\MyPDF.pdf"
numberOfImagesPerPage = 0: numberOfImagesPerDocument = 0
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
numberOfPages = pdf.NumberOfPages(fileName)
ImagesPath = "C:\PDFs\Images"
Set fso = CreateObject("Scripting.FileSystemObject")
if Not fso.FolderExists(ImagesPath) then
 fso.CreateFolder(ImagesPath)
end if
for i = 1 to numberOfPages
 numberOfImagesPerPage = pdf.ExtractImages(fileName, ImagesPath, i, "Page_" & CStr(i) & "_")
 numberOfImagesPerDocument = numberOfImagesPerDocument + numberOfImagesPerPage
 MsgBox "Page " & i & " [" & numberOfPages & "]: " & numberOfImagesPerPage & " images extracted"
next
MsgBox "Document " & fso.GetFileName(fileName) & ": " & CStr(numberOfImagesPerDocument) & " images extracted"

See Also

PDF Class


FileLength Method

| Example | See Also
pdfforge.dll help file
PDF..::FileLength Method
Returns the file length of a given file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int FileLength(
    string sourceFilename
)
Public Function FileLength ( _
    sourceFilename As String _
) As Integer
public:
virtual int FileLength(
    String^ sourceFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.

Return Value

The file length in bytes.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
Console.WriteLine("File length: " + pdf.FileLength("test.pdf"));
pdf = null;
Console.ReadLine();
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", true
MsgBox "File length: " & pdf.FileLength("test.pdf")
Set pdf = Nothing

See Also

PDF Class


GetEncryptionSettings Method

| Example | See Also
pdfforge.dll help file
PDF..::GetEncryptionSettings Method
Get the encryption parameters of an encrypted pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int GetEncryptionSettings(
    string sourceFilename,
    string ownerPassword,
    ref PDFEncryptor enc
)
Public Function GetEncryptionSettings ( _
    sourceFilename As String, _
    ownerPassword As String, _
    ByRef enc As PDFEncryptor _
) As Integer
public:
virtual int GetEncryptionSettings(
    String^ sourceFilename,
    String^ ownerPassword,
    PDFEncryptor^% enc
) sealed

Parameters

sourceFilename
String
Name of the encrypted source file.
ownerPassword
String
The owner password of the encrypted pdf file.
enc
PDFEncryptor %
A reference to a PDFEncryptor object.

Return Value

-1: if there was any error. Otherwise the encryption method. See PDFEncryptor

Examples

C# Copy image Copy
PDFEncryptor enc = new PDFEncryptor();
enc.AllowAssembly = false;
enc.AllowCopy = false;
enc.AllowFillIn = true;
enc.AllowModifyAnnotations = false;
enc.AllowModifyContents = false;
enc.AllowPrinting = true;
enc.AllowPrintingHighResolution = false;
enc.AllowScreenreaders = false;
enc.EncryptionMethod = 2;
enc.OwnerPassword = "pdfforge";
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
pdf.EncryptPDFFile("test.pdf", "encrypted.pdf", ref enc);
enc = new PDFEncryptor(); // Reset the encryptor.
int res = pdf.GetEncryptionSettings("encrypted.pdf", "pdfforge", ref enc);
Console.WriteLine("Encryption settings:");
Console.WriteLine("AllowAssembly: " + enc.AllowAssembly);
Console.WriteLine("AllowCopy: " + enc.AllowCopy);
Console.WriteLine("AllowFillIn: " + enc.AllowFillIn);
Console.WriteLine("AllowModifyAnnotations: " + enc.AllowModifyAnnotations);
Console.WriteLine("AllowModifyContents: " + enc.AllowModifyContents);
Console.WriteLine("AllowPrinting: " + enc.AllowPrinting);
Console.WriteLine("AllowPrintingHighResolution: " + enc.AllowPrintingHighResolution);
Console.WriteLine("AllowScreenreaders: " + enc.AllowScreenreaders);
Console.WriteLine("EncryptionMethod: " + enc.EncryptionMethod);
Console.WriteLine();
Console.WriteLine("test.pdf is encrypted: " + pdf.IsEncrypted("test.pdf"));
Console.WriteLine("encrypted.pdf is encrypted: " + pdf.IsEncrypted("encrypted.pdf"));
Console.WriteLine();
enc = null;
pdf = null;
Console.ReadLine();
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, enc, res, resStr
Set enc = WScript.CreateObject("pdfforge.PDF.PDFEncryptor")
enc.AllowAssembly = false
enc.AllowCopy = false
enc.AllowFillIn = true
enc.AllowModifyAnnotations = false
enc.AllowModifyContents = false
enc.AllowPrinting = true
enc.AllowPrintingHighResolution = false
enc.AllowScreenreaders = false
enc.EncryptionMethod = 2
enc.OwnerPassword = "pdfforge"
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", true
pdf.EncryptPDFFile "test.pdf", "encrypted.pdf", (enc)
Set enc = WScript.CreateObject("pdfforge.PDF.PDFEncryptor")
res = pdf.GetEncryptionSettings("encrypted.pdf", "pdfforge", (enc))
resStr = "Encryption settings:"
resStr = resStr + vbCrLf + "AllowAssembly: " & CStr(enc.AllowAssembly)
resStr = resStr + vbCrLf + "AllowCopy: " & CStr(enc.AllowCopy)
resStr = resStr + vbCrLf + "AllowFillIn: " & CStr(enc.AllowFillIn)
resStr = resStr + vbCrLf + "AllowModifyAnnotations: " & CStr(enc.AllowModifyAnnotations)
resStr = resStr + vbCrLf + "AllowModifyContents: " & CStr(enc.AllowModifyContents)
resStr = resStr + vbCrLf + "AllowPrinting: " & CStr(enc.AllowPrinting)
resStr = resStr + vbCrLf + "AllowPrintingHighResolution: " & CStr(enc.AllowPrintingHighResolution)
resStr = resStr + vbCrLf + "AllowScreenreaders: " & CStr(enc.AllowScreenreaders)
resStr = resStr + vbCrLf + "EncryptionMethod: " & CStr(enc.EncryptionMethod)
resStr = resStr + vbCrLf
resStr = resStr + vbCrLf + "test.pdf is encrypted: " & CStr(pdf.IsEncrypted("test.pdf"))
resStr = resStr + vbCrLf + "encrypted.pdf is encrypted: " & CStr(pdf.IsEncrypted("encrypted.pdf"))
Set enc = Nothing
Set pdf = Nothing
MsgBox resStr

See Also

PDF Class


GetMetadata Method

| Example | See Also
pdfforge.dll help file
PDF..::GetMetadata Method
Returns the value of a given metadata key like author, subject, keywords etc. of a given pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string GetMetadata(
    string sourceFilename,
    string key
)
Public Function GetMetadata ( _
    sourceFilename As String, _
    key As String _
) As String
public:
virtual String^ GetMetadata(
    String^ sourceFilename,
    String^ key
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
key
String
The metadata key like author, subject, keywords, creator, producer etc..

Return Value

The value of the metada key.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
Console.WriteLine("Creator: " + pdf.GetMetadata("test.pdf", "Creator"));
pdf = null;
Console.ReadLine();
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", true
MsgBox "Creator: " & pdf.GetMetadata("test.pdf", "Creator")
Set pdf = Nothing

See Also

PDF Class


Images2PDF Method

pdfforge.dll help file
PDF..::Images2PDF Method

Overload List

Name | Description
Images2PDF(array<Object>[]()[][]%, String, Int32) | Convert Images to a single pdf file.
Images2PDF(array<String>[]()[][]%, String, Int32) | Convert Images to a single pdf file.

See Also

PDF Class


Images2PDF Method (Object[], String, Int32)

| Example | See Also
pdfforge.dll help file
PDF..::Images2PDF Method (array<Object>[]()[][]%, String, Int32)
Convert Images to a single pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int Images2PDF(
    ref Object[] sourceFilenames,
    string destinationFilename,
    int scaleMode
)
Public Function Images2PDF ( _
    ByRef sourceFilenames As Object(), _
    destinationFilename As String, _
    scaleMode As Integer _
) As Integer
public:
virtual int Images2PDF(
    array<Object^>^% sourceFilenames,
    String^ destinationFilename,
    int scaleMode
) sealed

Parameters

sourceFilenames
array< Object >[]()[][]%
An array of image source filenames.
destinationFilename
String
Name of the pdf destination file.
scaleMode
Int32
0: The pdf page has the same size like the image. 1: The image will be fitted on an A4 page.

Return Value

0: If there was any error. Otherwise a positive number of the created pages.

Examples

C# Copy image Copy
string[] imageFilenames = new string[3];
imageFilenames[0] = "image-red.png";
imageFilenames[1] = "image-green.png";
imageFilenames[2] = "image-blue.png";
Tools tools = new Tools();
tools.CreateTestImage(imageFilenames[0], 255, 0, 0);
tools.CreateTestImage(imageFilenames[1], 0, 255, 0);
tools.CreateTestImage(imageFilenames[2], 0, 0, 255);
PDF pdf = new PDF();
pdf.Images2PDF(ref imageFilenames, "output1.pdf", 0)
pdf.Images2PDF(ref imageFilenames, "output2.pdf", 1)
pdf = null;
Visual Basic Script Copy image Copy
Dim imageFilenames(2), tools, pdf
imageFilenames(0) = "image-red.png"
imageFilenames(1) = "image-green.png"
imageFilenames(2) = "image-blue.png"
Set tools = WScript.CreateObject("pdfforge.tools")
tools.CreateTestImage imageFilenames(0), 255, 0, 0
tools.CreateTestImage imageFilenames(1), 0, 255, 0
tools.CreateTestImage imageFilenames(2), 0, 0, 255
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.Images2PDF_2 (imageFilenames), "output1.pdf", 0
pdf.Images2PDF_2 (imageFilenames), "output2.pdf", 1
Set tools = Nothing
Set pdf = Nothing

See Also

PDF Class
Images2PDF Overload


Images2PDF Method (String[], String, Int32)

| Example | See Also
pdfforge.dll help file
PDF..::Images2PDF Method (array<String>[]()[][]%, String, Int32)
Convert Images to a single pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int Images2PDF(
    ref string[] sourceFilenames,
    string destinationFilename,
    int scaleMode
)
Public Function Images2PDF ( _
    ByRef sourceFilenames As String(), _
    destinationFilename As String, _
    scaleMode As Integer _
) As Integer
public:
virtual int Images2PDF(
    array<String^>^% sourceFilenames,
    String^ destinationFilename,
    int scaleMode
) sealed

Parameters

sourceFilenames
array< String >[]()[][]%
An array of image source filenames.
destinationFilename
String
Name of the pdf destination file.
scaleMode
Int32
0: The pdf page has the same size like the image. 1: The image will be fitted on an A4 page.

Return Value

0: If there was any error. Otherwise a positive number of the created pages.

Examples

C# Copy image Copy
string[] imageFilenames = new string[3];
imageFilenames[0] = "image-red.png";
imageFilenames[1] = "image-green.png";
imageFilenames[2] = "image-blue.png";
Tools tools = new Tools();
tools.CreateTestImage(imageFilenames[0], 255, 0, 0);
tools.CreateTestImage(imageFilenames[1], 0, 255, 0);
tools.CreateTestImage(imageFilenames[2], 0, 0, 255);
PDF pdf = new PDF();
pdf.Images2PDF(ref imageFilenames, "output1.pdf", 0);
pdf.Images2PDF(ref imageFilenames, "output2.pdf", 1);
pdf = null;
Visual Basic Script Copy image Copy
See Images2PDF(array<Object>[]()[][]%, String, Int32)

See Also

PDF Class
Images2PDF Overload


IsEncrypted Method

| Example | See Also
pdfforge.dll help file
PDF..::IsEncrypted Method
This method returns true if the source file is an encrIypted pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool IsEncrypted(
    string sourceFilename
)
Public Function IsEncrypted ( _
    sourceFilename As String _
) As Boolean
public:
virtual bool IsEncrypted(
    String^ sourceFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.

Return Value

True if the source file is encrypted.

Examples

C# Copy image Copy
See EncryptPDFFile(String, String, PDFEncryptor%)
Visual Basic Script Copy image Copy
See EncryptPDFFile(String, String, PDFEncryptor%)

See Also

PDF Class


MergePDFFiles Method

pdfforge.dll help file
PDF..::MergePDFFiles Method

Overload List

Name | Description
MergePDFFiles(array<Object>[]()[][]%, String, Boolean) | This method merges the given pdf files in one single pdf file.
MergePDFFiles(array<String>[]()[][]%, String, Boolean) | This method merges the given pdf files in one single pdf file.

See Also

PDF Class


MergePDFFiles Method (Object[], String, Boolean)

| Example | See Also
pdfforge.dll help file
PDF..::MergePDFFiles Method (array<Object>[]()[][]%, String, Boolean)
This method merges the given pdf files in one single pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public void MergePDFFiles(
    ref Object[] sourceFilenames,
    string destinationFilename,
    bool filenamesAsBookmarks
)
Public Sub MergePDFFiles ( _
    ByRef sourceFilenames As Object(), _
    destinationFilename As String, _
    filenamesAsBookmarks As Boolean _
)
public:
virtual void MergePDFFiles(
    array<Object^>^% sourceFilenames,
    String^ destinationFilename,
    bool filenamesAsBookmarks
) sealed

Parameters

sourceFilenames
array< Object >[]()[][]%
An array of source filenames.
destinationFilename
String
Name of the pdf destination file.
filenamesAsBookmarks
Boolean
Add the file names as bookmarks to the pdf file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
string[] sourceFilenames = new string[2];
sourceFilenames[0] = "test1.pdf";
sourceFilenames[1] = "test2.pdf";
pdf.CreatePDFTestDocument(sourceFilenames[0], 3, "This is example1.", true);
pdf.CreatePDFTestDocument(sourceFilenames[1], 2, "This is example2.", true);
pdf.MergePDFFiles(ref sourceFilenames, "output1.pdf", false);
pdf.MergePDFFiles(ref sourceFilenames, "output2.pdf", true);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, sourceFilenames(1)
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
sourceFilenames(0) = "test1.pdf"
sourceFilenames(1) = "test2.pdf"
pdf.CreatePDFTestDocument sourceFilenames(0), 3, "This is example1.", true
pdf.CreatePDFTestDocument sourceFilenames(1), 2, "This is example2.", true
pdf.MergePDFFiles_2 (sourceFilenames), "output1.pdf", false
pdf.MergePDFFiles_2 (sourceFilenames), "output2.pdf", true
Set pdf = Nothing

See Also

PDF Class
MergePDFFiles Overload


MergePDFFiles Method (String[], String, Boolean)

| Example | See Also
pdfforge.dll help file
PDF..::MergePDFFiles Method (array<String>[]()[][]%, String, Boolean)
This method merges the given pdf files in one single pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public void MergePDFFiles(
    ref string[] sourceFilenames,
    string destinationFilename,
    bool filenamesAsBookmarks
)
Public Sub MergePDFFiles ( _
    ByRef sourceFilenames As String(), _
    destinationFilename As String, _
    filenamesAsBookmarks As Boolean _
)
public:
virtual void MergePDFFiles(
    array<String^>^% sourceFilenames,
    String^ destinationFilename,
    bool filenamesAsBookmarks
) sealed

Parameters

sourceFilenames
array< String >[]()[][]%
An array of source filenames.
destinationFilename
String
Name of the pdf destination file.
filenamesAsBookmarks
Boolean
Add the file names as bookmarks to the pdf file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
string[] sourceFilenames = new string[2];
sourceFilenames[0] = "test1.pdf";
sourceFilenames[1] = "test2.pdf";
pdf.CreatePDFTestDocument(sourceFilenames[0], 3, "This is example1.", true);
pdf.CreatePDFTestDocument(sourceFilenames[1], 2, "This is example2.", true);
pdf.MergePDFFiles(ref sourceFilenames, "output1.pdf", false);
pdf.MergePDFFiles(ref sourceFilenames, "output2.pdf", true);
pdf = null;
Visual Basic Script Copy image Copy
See MergePDFFiles(array<Object>[]()[][]%, String, Boolean)

See Also

PDF Class
MergePDFFiles Overload


NumberOfPages Method

| Example | See Also
pdfforge.dll help file
PDF..::NumberOfPages Method
This method returns number of pages of a given pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int NumberOfPages(
    string sourceFilename
)
Public Function NumberOfPages ( _
    sourceFilename As String _
) As Integer
public:
virtual int NumberOfPages(
    String^ sourceFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.

Return Value

Number of pages.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 17, "This is an example.", true);
Console.WriteLine("The file 'test.pdf' has " + pdf.NumberOfPages("test.pdf") + " pages.");
pdf = null;
Console.ReadLine();
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 17, "This is an example.", true
MsgBox "The file 'test.pdf' has " & CStr(pdf.NumberOfPages("test.pdf")) & " pages."
Set pdf = Nothing

See Also

PDF Class


NUp Method

| Example | See Also
pdfforge.dll help file
PDF..::NUp Method
Put the given count of pages pagesPerPage on one page.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int NUp(
    string sourceFilename,
    string destinationFilename,
    int pagesPerPage
)
Public Function NUp ( _
    sourceFilename As String, _
    destinationFilename As String, _
    pagesPerPage As Integer _
) As Integer
public:
virtual int NUp(
    String^ sourceFilename,
    String^ destinationFilename,
    int pagesPerPage
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
pagesPerPage
Int32
Count of pages per page.

Return Value

0: If there is any error. Otherwise the count of pages of the result file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("input.pdf", 10, "This is an example.", true);
pdf.NUp("input.pdf", "output.pdf", 4);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "input.pdf", 10, "This is an example.", true
pdf.NUp "input.pdf", "output.pdf", 4
Set pdf = Nothing

See Also

PDF Class


PDFVersion Method

| Example | See Also
pdfforge.dll help file
PDF..::PDFVersion Method
This method returns the version of a given pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string PDFVersion(
    string sourceFilename
)
Public Function PDFVersion ( _
    sourceFilename As String _
) As String
public:
virtual String^ PDFVersion(
    String^ sourceFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.

Return Value

The version of the pdf file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
Console.WriteLine("The file 'test.pdf' has pdf version: 1." + pdf.PDFVersion("test.pdf"));
pdf = null;
Console.ReadLine();
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", true
MsgBox "The file 'test.pdf' has pdf version: 1." & pdf.PDFVersion("test.pdf")
Set pdf = Nothing

See Also

PDF Class


RemoveEmptyPagesFromPDFFile Method

pdfforge.dll help file
PDF..::RemoveEmptyPagesFromPDFFile Method
Removes pages with no content.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int RemoveEmptyPagesFromPDFFile(
    string sourceFilename,
    string destinationFilename
)
Public Function RemoveEmptyPagesFromPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String _
) As Integer
public:
virtual int RemoveEmptyPagesFromPDFFile(
    String^ sourceFilename,
    String^ destinationFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.

Return Value

The count of removed pages.

See Also

PDF Class


RemovePageFromPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::RemovePageFromPDFFile Method
Removes a single page from a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int RemovePageFromPDFFile(
    string sourceFilename,
    string destinationFilename,
    int pageNumber
)
Public Function RemovePageFromPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    pageNumber As Integer _
) As Integer
public:
virtual int RemovePageFromPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    int pageNumber
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
pageNumber
Int32

[Missing <param name="pageNumber"/> documentation for "M:pdfforge.PDF.PDF.RemovePageFromPDFFile(System.String,System.String,System.Int32)"]

Return Value

0: If the source file has no pages. -1: If the pageNumber is bigger than the count of pages. Otherwise it returns 1.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 3, "This is an example.", true);
pdf.RemovePageFromPDFFile("test.pdf", "output.pdf", 1);
pdf = null;
Console.ReadLine();
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 3, "This is an example.", true
pdf.RemovePageFromPDFFile "test.pdf", "output.pdf", 1
Set pdf = Nothing

See Also

PDF Class


ReplacePagesFromPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::ReplacePagesFromPDFFile Method
Replaces the given region of pages for sourceFilename1 with a region of given pages from sourceFilename2.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int ReplacePagesFromPDFFile(
    string sourceFilename1,
    string sourceFilename2,
    string destinationFilename,
    int source1FromPage,
    int source1ToPage,
    int source2FromPage,
    int source2ToPage
)
Public Function ReplacePagesFromPDFFile ( _
    sourceFilename1 As String, _
    sourceFilename2 As String, _
    destinationFilename As String, _
    source1FromPage As Integer, _
    source1ToPage As Integer, _
    source2FromPage As Integer, _
    source2ToPage As Integer _
) As Integer
public:
virtual int ReplacePagesFromPDFFile(
    String^ sourceFilename1,
    String^ sourceFilename2,
    String^ destinationFilename,
    int source1FromPage,
    int source1ToPage,
    int source2FromPage,
    int source2ToPage
) sealed

Parameters

sourceFilename1
String
Name of the pdf source file 1.
sourceFilename2
String
Name of the pdf source file 2.
destinationFilename
String
Name of the pdf destination file.
source1FromPage
Int32
The first page which should replaced from sourceFilename1.
source1ToPage
Int32
The last page which should replaced from sourceFilename1.
source2FromPage
Int32
The start page which should used from sourceFilename2.
source2ToPage
Int32
The start page which should used from sourceFilename2.

Return Value

0: If there is any error. Otherwise the count of pages of the result file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test1.pdf", 4, "This is an example 1.", true);
pdf.CreatePDFTestDocument("test2.pdf", 12, "This is an example 2.", true);
pdf.ReplacePagesFromPDFFile("test1.pdf", "test2.pdf", "output.pdf", 2, 3, 4, 8);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test1.pdf", 4, "This is an example.", true
pdf.CreatePDFTestDocument "test2.pdf", 12, "This is an example.", true
pdf.ReplacePagesFromPDFFile "test1.pdf", "test2.pdf", "output.pdf", 2, 3, 4, 8
Set pdf = Nothing

See Also

PDF Class


RotatePages Method

| Example | See Also
pdfforge.dll help file
PDF..::RotatePages Method
Rotate the given region of pages for sourceFilename with a given angle.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int RotatePages(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage,
    int angle
)
Public Function RotatePages ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    angle As Integer _
) As Integer
public:
virtual int RotatePages(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage,
    int angle
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
Start page. Must be bigger than 0.
toPage
Int32
Last page. Use 0 for the last page if you don't know the count of pages.
angle
Int32
The rotation angle in degrees. Valid values are every angle which is divisable by 90. (Samples: -90, 90, 180, 270)

Return Value

0: If there is any error. Otherwise the count of pages of the result file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test1.pdf", 1, "", true);
pdf.RotatePages("test1.pdf", "test2-0degrees.pdf", 1, 1, 0);
pdf.RotatePages("test1.pdf", "test2-90degrees.pdf", 1, 1, 90);
pdf.RotatePages("test1.pdf", "test2-180degrees.pdf", 1, 1, 180);
pdf.RotatePages("test1.pdf", "test2-270degrees.pdf", 1, 1, 270);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test1.pdf", 1, "", true
pdf.RotatePages "test1.pdf", "test2-0degrees.pdf", 1, 1, 0
pdf.RotatePages "test1.pdf", "test2-90degrees.pdf", 1, 1, 90
pdf.RotatePages "test1.pdf", "test2-180degrees.pdf", 1, 1, 180
pdf.RotatePages "test1.pdf", "test2-270degrees.pdf", 1, 1, 270
Set pdf = Nothing

See Also

PDF Class


SetBackgroundColor Method

| Example | See Also
pdfforge.dll help file
PDF..::SetBackgroundColor Method
Set a background color a the bottom end layer of a pdf page.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int SetBackgroundColor(
    string sourceFilename,
    string destinationFilename,
    int fromPage,
    int toPage,
    byte red,
    byte green,
    byte blue
)
Public Function SetBackgroundColor ( _
    sourceFilename As String, _
    destinationFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    red As Byte, _
    green As Byte, _
    blue As Byte _
) As Integer
public:
virtual int SetBackgroundColor(
    String^ sourceFilename,
    String^ destinationFilename,
    int fromPage,
    int toPage,
    unsigned char red,
    unsigned char green,
    unsigned char blue
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
fromPage
Int32
The start page on which the background color should set.
toPage
Int32
The start page on which the background color should set.
red
Byte
The red part of the background color.
green
Byte
The green part of the background color.
blue
Byte
The blue part of the background color.

Return Value

The count of pages on which the background color is set.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 4, "This is an example.", true);
pdf.SetBackgroundColor("test.pdf", "output.pdf", 2, 3, 255, 0, 0);
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 4, "This is an example.", true
pdf.SetBackgroundColor "test.pdf", "output.pdf", 2, 3, 255, 0, 0
Set pdf = Nothing

See Also

PDF Class


SetMetadata Method

| Example | See Also
pdfforge.dll help file
PDF..::SetMetadata Method
Set a standard set of metadatas of a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public void SetMetadata(
    string sourceFilename,
    string destinationFilename,
    string author,
    string creator,
    string keywords,
    string subject,
    string title
)
Public Sub SetMetadata ( _
    sourceFilename As String, _
    destinationFilename As String, _
    author As String, _
    creator As String, _
    keywords As String, _
    subject As String, _
    title As String _
)
public:
virtual void SetMetadata(
    String^ sourceFilename,
    String^ destinationFilename,
    String^ author,
    String^ creator,
    String^ keywords,
    String^ subject,
    String^ title
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
author
String
The author of a pdf file.
creator
String
The creator of a pdf file.
keywords
String
Keywords of a pdf file.
subject
String
The subject of a pdf file.
title
String
The title of a pdf file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 4, "This is an example.", true);
pdf.SetMetadata("test.pdf", "output.pdf", "John Doe", "The creator ;-)", "My keywords, this and that", "pdfforge.dll sample", "SetMetadata");
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 4, "This is an example.", true
pdf.SetMetadata "test.pdf", "output.pdf", "John Doe", "The creator ;-)", "My keywords, this and that", "pdfforge.dll sample", "SetMetadata"
Set pdf = Nothing

See Also

PDF Class


SetMetadataKey Method

| Example | See Also
pdfforge.dll help file
PDF..::SetMetadataKey Method
Set a single metadata key.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool SetMetadataKey(
    string sourceFilename,
    string destinationFilename,
    string key,
    string value
)
Public Function SetMetadataKey ( _
    sourceFilename As String, _
    destinationFilename As String, _
    key As String, _
    value As String _
) As Boolean
public:
virtual bool SetMetadataKey(
    String^ sourceFilename,
    String^ destinationFilename,
    String^ key,
    String^ value
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
key
String
Set a single metadata key to a given value. Valid keys are author, creator, keywords, subject and title.
value
String
The value.

Return Value

false: If key was not an valid key or any other error. Otherwise true.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 4, "This is an example.", true);
pdf.SetMetadataKey("test.pdf", "output.pdf", "Author", "John Doe");
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 4, "This is an example.", true
pdf.SetMetadataKey "test.pdf", "output.pdf", "Author", "John Doe"
Set pdf = Nothing

See Also

PDF Class


SplitPDFFile Method

| Example | See Also
pdfforge.dll help file
PDF..::SplitPDFFile Method
Split a pdf file in single pages.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int SplitPDFFile(
    string sourceFilename,
    string destinationFilename
)
Public Function SplitPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String _
) As Integer
public:
virtual int SplitPDFFile(
    String^ sourceFilename,
    String^ destinationFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
The base name of the pdf destination files.

Return Value

The count of splitted pages.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 10, "This is an example.", true);
pdf.SplitPDFFile("test.pdf", "output.pdf");
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 10, "This is an example.", true
pdf.SplitPDFFile "test.pdf", "output.pdf"
Set pdf = Nothing

See Also

PDF Class


StampPDFFileWithImage Method

| Example | See Also
pdfforge.dll help file
PDF..::StampPDFFileWithImage Method
Put an image stamp over or under a page of a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int StampPDFFileWithImage(
    string sourceFilename,
    string destinationFilename,
    string imageFilename,
    int fromPage,
    int toPage,
    bool overUnder,
    float fillOpacity,
    int blendMode
)
Public Function StampPDFFileWithImage ( _
    sourceFilename As String, _
    destinationFilename As String, _
    imageFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    overUnder As Boolean, _
    fillOpacity As Single, _
    blendMode As Integer _
) As Integer
public:
virtual int StampPDFFileWithImage(
    String^ sourceFilename,
    String^ destinationFilename,
    String^ imageFilename,
    int fromPage,
    int toPage,
    bool overUnder,
    float fillOpacity,
    int blendMode
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
imageFilename
String
Name of the image file.
fromPage
Int32
First page which should stamped.
toPage
Int32
Last page which should stamped.
overUnder
Boolean
true: The stamp is on the topmost layer. false: The stamp is on the bottom end layer.
fillOpacity
Single
The fill opacity of the image. 0 means the image transparent. 1 means there is no transparency. The default value is 1.
blendMode
Int32
How the image is blended with the other layers.
Blend mode | Description
1 | Color burn
2 | Color dodge
3 | Color compatible
4 | Color darken
5 | Color difference
6 | Color exclusion
7 | Color hardlight
8 | Color lighten
9 | Color multiply
10 | Color normal
11 | Color overlay
12 | Color screen
13 | Color softlight
All other values | Color normal

Return Value

Count of pages which are stamped.

Examples

C# Copy image Copy
Tools tools = new Tools();
tools.CreateTestImage("image.png", 255, 0, 0);
string sample = "This is an example.";
for (int i = 0; i < 6; i++)
    sample += sample;
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 4, sample, true);
pdf.StampPDFFileWithImage("test.pdf", "output.pdf", "image.png", 1, 1, true, 0.8f, 9);
tools = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, tools, sample, i
Set tools = WScript.CreateObject("pdfforge.Tools")
tools.CreateTestImage "image.png", 255, 0, 0
sample = "This is an example."
For i = 0 to 5
 sample = sample + sample
next
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 4, sample, true
pdf.StampPDFFileWithImage "test.pdf", "output.pdf", "image.png", 1, 1, true, 0.8, 9
Set tools = Nothing
Set pdf = Nothing

See Also

PDF Class


StampPDFFileWithPDFFile Method

pdfforge.dll help file
PDF..::StampPDFFileWithPDFFile Method
Put an pdf page stamp over or under a page of a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int StampPDFFileWithPDFFile(
    string sourceFilename,
    string destinationFilename,
    string pdfFilename,
    int fromPage,
    int toPage,
    bool overUnder,
    float fillOpacity,
    int blendMode
)
Public Function StampPDFFileWithPDFFile ( _
    sourceFilename As String, _
    destinationFilename As String, _
    pdfFilename As String, _
    fromPage As Integer, _
    toPage As Integer, _
    overUnder As Boolean, _
    fillOpacity As Single, _
    blendMode As Integer _
) As Integer
public:
virtual int StampPDFFileWithPDFFile(
    String^ sourceFilename,
    String^ destinationFilename,
    String^ pdfFilename,
    int fromPage,
    int toPage,
    bool overUnder,
    float fillOpacity,
    int blendMode
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.
pdfFilename
String
Name of the stamp pdf file.
fromPage
Int32
First page which should stamped.
toPage
Int32
Last page which should stamped.
overUnder
Boolean
true: The stamp is on the topmost layer. false: The stamp is on the bottom end layer.
fillOpacity
Single
The fill opacity of the image. 0 means the image transparent. 1 means there is no transparency. The default value is 1.
blendMode
Int32
How the image is blended with the other layers.
Blend mode | Description
1 | Color burn
2 | Color dodge
3 | Color compatible
4 | Color darken
5 | Color difference
6 | Color exclusion
7 | Color hardlight
8 | Color lighten
9 | Color multiply
10 | Color normal
11 | Color overlay
12 | Color screen
13 | Color softlight
All other values | Color normal

Return Value

Count of pages which are stamped.

See Also

PDF Class


UpdateXMPMetadata Method

pdfforge.dll help file
PDF..::UpdateXMPMetadata Method
This method updates the the xmp metadata of a given pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public void UpdateXMPMetadata(
    string sourceFilename,
    string destinationFilename
)
Public Sub UpdateXMPMetadata ( _
    sourceFilename As String, _
    destinationFilename As String _
)
public:
virtual void UpdateXMPMetadata(
    String^ sourceFilename,
    String^ destinationFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
destinationFilename
String
Name of the pdf destination file.

See Also

PDF Class


PDF.X509 Class

| Members | See Also
pdfforge.dll help file
PDF..::..X509 Class
This class contains all available X509 methods.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class X509 : IX509
Public Class X509 _
    Implements IX509
public ref class X509 : IX509

Members

All Members | Constructors | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
PDF..::..X509()()()() | Initializes a new instance of the PDF..::..X509 class
CountOfSignatures(String) | This method returns the count of signatures of a signed pdf file.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
IsSigned(String) | This method returns true if a pdf is signed.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
SignatureCoversWholeDocument(String, Int32) | Returns true if the signature covers the whole document.
SignatureName(String, Int32) | Returns the name of a signature of a signed pdf.
SignatureRevision(String, Int32) | Returns the revision of a signature of a signed pdf.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
VerifySignature(String, String) | Verify the signature of a signed pdf.
VerifySignedPDFFile(String) | Verify a signed pdf.
VerifySignedPDFFile(String, Int32) | Verify a signed pdf.

Inheritance Hierarchy

System..::..Object
pdfforge.PDF..::..PDF..::..X509

See Also

pdfforge.PDF Namespace
Copyright by pdfforge GbR

Send comments on this topic to info@pdfforge.org

Copyright pdfforge GmbH


PDF.X509 Constructor

pdfforge.dll help file
PDF..::..X509 Constructor
Initializes a new instance of the PDF..::..X509 class

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public X509()
Public Sub New
public:
X509()

See Also

PDF..::..X509 Class


X509 Methods

pdfforge.dll help file
PDF..::..X509 Methods

The PDF..::..X509 type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
CountOfSignatures(String) | This method returns the count of signatures of a signed pdf file.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
IsSigned(String) | This method returns true if a pdf is signed.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
SignatureCoversWholeDocument(String, Int32) | Returns true if the signature covers the whole document.
SignatureName(String, Int32) | Returns the name of a signature of a signed pdf.
SignatureRevision(String, Int32) | Returns the revision of a signature of a signed pdf.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
VerifySignature(String, String) | Verify the signature of a signed pdf.
VerifySignedPDFFile(String) | Verify a signed pdf.
VerifySignedPDFFile(String, Int32) | Verify a signed pdf.

See Also

PDF..::..X509 Class


CountOfSignatures Method

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::CountOfSignatures Method
This method returns the count of signatures of a signed pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int CountOfSignatures(
    string sourceFilename
)
Public Function CountOfSignatures ( _
    sourceFilename As String _
) As Integer
public:
virtual int CountOfSignatures(
    String^ sourceFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.

Return Value

The count of signatures of a signed pdf file. If the pdf file has no signatures it returns 0.

Examples

C# Copy image Copy
PDF.X509 pdfX509 = new PDF.X509();
int res = pdfX509.CountOfSignatures("signed.pdf");
pdfX509 = null;
if (res == 0)
    System.Console.Out.WriteLine("This pdf file has no signatures.");
else
    System.Console.Out.WriteLine("This pdf file has {0} signatures.", res);
Visual Basic Script Copy image Copy
Option Explicit
Dim pdfX509, res
Set pdfX509 = WScript.CreateObject("pdfforge.pdf.pdf.x509")
res = pdfX509.CountOfSignatures("signed.pdf")
Set pdfX509 = Nothing
if res = 0 then
   MsgBox "This pdf file has no signatures."
else
   MsgBox "This pdf file has " & res & " signatures."
end if

See Also

PDF..::..X509 Class


IsSigned Method

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::IsSigned Method
This method returns true if a pdf is signed.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool IsSigned(
    string sourceFilename
)
Public Function IsSigned ( _
    sourceFilename As String _
) As Boolean
public:
virtual bool IsSigned(
    String^ sourceFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.

Return Value

True if the pdf file is signed.

Examples

C# Copy image Copy
PDF.X509 pdfX509 = new PDF.X509();
int res = pdfX509.IsSigned("signed.pdf");
pdfX509 = null;
if (res == 0)
    System.Console.Out.WriteLine("This pdf file has no signatures.");
else
    System.Console.Out.WriteLine("This pdf file has {0} signatures.", res);
Visual Basic Script Copy image Copy
Option Explicit
Dim pdfX509, res
Set pdfX509 = WScript.CreateObject("pdfforge.pdf.pdf.x509")
res = pdfX509.IsSigned("signed.pdf")
Set pdfX509 = Nothing
if res = true then
   MsgBox "This pdf file has no signatures."
else
   MsgBox "This pdf file has " & res & " signatures."
end if

See Also

PDF..::..X509 Class


SignatureCoversWholeDocument Method

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::SignatureCoversWholeDocument Method
Returns true if the signature covers the whole document.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool SignatureCoversWholeDocument(
    string sourceFilename,
    int index
)
Public Function SignatureCoversWholeDocument ( _
    sourceFilename As String, _
    index As Integer _
) As Boolean
public:
virtual bool SignatureCoversWholeDocument(
    String^ sourceFilename,
    int index
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
index
Int32
0-based index value.

Return Value

True if the signature covers the wholöe document.

Examples

C# Copy image Copy
PDF.X509 pdfX509 = new PDF.X509();
bool res = pdfX509.SignatureCoversWholeDocument("signed.pdf", 0);
pdfX509 = null;
if (res == true)
    System.Console.Out.WriteLine("The signature {0} covers the whole pdf file.");
else
    System.Console.Out.WriteLine("The signature {0} doesn't cover the whole pdf file.");
Visual Basic Script Copy image Copy
Option Explicit
Dim pdfX509, res
Set pdfX509 = WScript.CreateObject("pdfforge.pdf.pdf.x509")
res = pdfX509.SignatureCoversWholeDocument("signed.pdf", 0)
Set pdfX509 = Nothing
if res = true then
   MsgBox "The signature 0 covers the whole pdf file."
else
   MsgBox "The signature 0 doesn't cover the whole pdf file."
end if

See Also

PDF..::..X509 Class


SignatureName Method

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::SignatureName Method
Returns the name of a signature of a signed pdf.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string SignatureName(
    string sourceFilename,
    int index
)
Public Function SignatureName ( _
    sourceFilename As String, _
    index As Integer _
) As String
public:
virtual String^ SignatureName(
    String^ sourceFilename,
    int index
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
index
Int32
0-based index value.

Return Value

The name of the signature.

Examples

C# Copy image Copy
PDF.X509 pdfX509 = new PDF.X509();
string res = pdfX509.SignatureName("signed.pdf", 0);
pdfX509 = null;
System.Console.Out.WriteLine("The Signature with index {0} has the name: {1}.", 0, res);
Visual Basic Script Copy image Copy
Option Explicit
Dim pdfX509, res
Set pdfX509 = WScript.CreateObject("pdfforge.pdf.pdf.x509")
res = pdfX509.SignatureName("signed.pdf", 0)
Set pdfX509 = Nothing
MsgBox "The Signature with index 0 has the name " & res & "."

See Also

PDF..::..X509 Class


SignatureRevision Method

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::SignatureRevision Method
Returns the revision of a signature of a signed pdf.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int SignatureRevision(
    string sourceFilename,
    int index
)
Public Function SignatureRevision ( _
    sourceFilename As String, _
    index As Integer _
) As Integer
public:
virtual int SignatureRevision(
    String^ sourceFilename,
    int index
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
index
Int32
0-based index value.

Return Value

The revision of the signature.

Examples

C# Copy image Copy
PDF.X509 pdfX509 = new PDF.X509();
int res = pdfX509.SignatureRevision("signed.pdf", 0);
pdfX509 = null;
System.Console.Out.WriteLine("The Signature with index {0} has the revision: {1}.", 0, res);
Visual Basic Script Copy image Copy
Option Explicit
Dim pdfX509, res
Set pdfX509 = WScript.CreateObject("pdfforge.pdf.pdf.x509")
res = pdfX509.SignatureRevision("signed.pdf", 0)
Set pdfX509 = Nothing
MsgBox "The Signature with index 0 has the revision " & res & "."

See Also

PDF..::..X509 Class


VerifySignature Method

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::VerifySignature Method
Verify the signature of a signed pdf.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool VerifySignature(
    string sourceFilename,
    string keyStore
)
Public Function VerifySignature ( _
    sourceFilename As String, _
    keyStore As String _
) As Boolean
public:
virtual bool VerifySignature(
    String^ sourceFilename,
    String^ keyStore
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
keyStore
String
Name of the key-store. Valid values: AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, TrustedPublisher

Return Value

false: If one of certificates of the pdf is not valid. Otherwise true.

Examples

C# Copy image Copy
PDF.X509 pdfX509 = new PDF.X509();
bool res = pdfX509.VerifySignedPDFFile("signed.pdf", "Root");
pdfX509 = null;
if (res)
    System.Console.Out.WriteLine("Certificates verified against the KeyStore.");
else
    System.Console.Out.WriteLine("At least one Certificate failed.");
Visual Basic Script Copy image Copy
Option Explicit
Dim pdfX509, res
Set pdfX509 = WScript.CreateObject("pdfforge.pdf.pdf.x509")
res = pdfX509.VerifySignedPDFFile("signed.pdf", "Root")
Set pdfX509 = Nothing
if res then
   MsgBox "Certificates verified against the KeyStore."
else
   MsgBox "At least one Certificate failed."
end if

See Also

PDF..::..X509 Class


VerifySignedPDFFile Method

pdfforge.dll help file
PDF..::..X509..::VerifySignedPDFFile Method

Overload List

Name | Description
VerifySignedPDFFile(String) | Verify a signed pdf.
VerifySignedPDFFile(String, Int32) | Verify a signed pdf.

See Also

PDF..::..X509 Class


VerifySignedPDFFile Method (String)

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::VerifySignedPDFFile Method (String)
Verify a signed pdf.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool VerifySignedPDFFile(
    string sourceFilename
)
Public Function VerifySignedPDFFile ( _
    sourceFilename As String _
) As Boolean
public:
virtual bool VerifySignedPDFFile(
    String^ sourceFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.

Return Value

false: If one of certificates don't verify the pdf. Otherwise true.

Examples

C# Copy image Copy
PDF.X509 pdfX509 = new PDF.X509();
bool res = pdfX509.VerifySignedPDFFile("signed.pdf");
pdfX509 = null;
if (res)
    System.Console.Out.WriteLine("The pdf file is positiv verified against all certificates.");
else
    System.Console.Out.WriteLine("At least one certificate doesn't verify the pdf file.");
Visual Basic Script Copy image Copy
Option Explicit
Dim pdfX509, res
Set pdfX509 = WScript.CreateObject("pdfforge.pdf.pdf.x509")
res = pdfX509.VerifySignedPDFFile("signed.pdf")
Set pdfX509 = Nothing
if res then
   MsgBox "The pdf file is positiv verified against all certificates."
else
   MsgBox "At least one certificate doesn't verify the pdf file."
end if

See Also

PDF..::..X509 Class
VerifySignedPDFFile Overload


VerifySignedPDFFile Method (String, Int32)

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::VerifySignedPDFFile Method (String, Int32)
Verify a signed pdf.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool VerifySignedPDFFile(
    string sourceFilename,
    int index
)
Public Function VerifySignedPDFFile ( _
    sourceFilename As String, _
    index As Integer _
) As Boolean
public:
virtual bool VerifySignedPDFFile(
    String^ sourceFilename,
    int index
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
index
Int32
0-based index value.

Return Value

false: If the given certificate doesn't verify the pdf. Otherwise true.

Examples

C# Copy image Copy
PDF.X509 pdfX509 = new PDF.X509();
bool res = pdfX509.VerifySignedPDFFile("signed.pdf", 0);
pdfX509 = null;
if (res)
    System.Console.Out.WriteLine("The certificate {0} verifies the pdf file.", 0);
else
    System.Console.Out.WriteLine("The certificate {0} doesn't verify the pdf file.", 0);
Visual Basic Script Copy image Copy
Option Explicit
Dim pdfX509, res
Set pdfX509 = WScript.CreateObject("pdfforge.pdf.pdf.x509")
res = pdfX509.VerifySignedPDFFile("signed.pdf", 0)
Set pdfX509 = Nothing
if res then
   MsgBox "The certificates 0 verifies the pdf file."
else
   MsgBox "The certificate 0 doesn't verify the pdf file."
end if

See Also

PDF..::..X509 Class
VerifySignedPDFFile Overload


PDF.X509.Signing Class

| Members | See Also
pdfforge.dll help file
PDF..::..X509..::..Signing Class
This class contains all available members and methods for signing.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class Signing : ISigning
Public Class Signing _
    Implements ISigning
public ref class Signing : ISigning

Members

All Members | Constructors | Properties | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member Description
PDF..::..X509..::..Signing()()()()
Initialization the signing class.
CertficateFilename
The certificate file name.
CertifcatePassword
The password of the pfx or p12 certificate file.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(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.)
HashAlgorithm
The hash algorithm.

Permitted values are: MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160

Default value: SHA1

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
MultiSignatures
Allow multi signatures.
PdfEncryptor
The PDFEncryptor object for encrytion settings.
SignatureContact
The contact of the signature.
SignatureLocation
The location of the signature.
SignatureOnPage
If SignatureVisible is True on which page should the signature shown.
SignaturePositionLowerLeftX
The left x-point of the signature if SignatureVisible is True.
SignaturePositionLowerLeftY
The left y-point of the signature if SignatureVisible is True.
SignaturePositionUpperRightX
The right x-point of the signature if SignatureVisible is True.
SignaturePositionUpperRightY
The right y-point of the signature if SignatureVisible is True.
SignatureReason
The reason of the signature.
SignatureVisible
Should be the signature visible.
SignPDFFile(String, String)
Sign a pdf file.
SignPDFFile(String, String, String)
Sign a pdf file.
TimeServerLogonName
The logon name for the given time server.
TimeServerLogonPassword
The password for the given time server.
TimeServerURL
The url for a time server.

Examples

http://timestamp.globalsign.com/scripts/timstamp.dll

This server doesn't need a logon and a password.
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)

Inheritance Hierarchy

System..::..Object
pdfforge.PDF..::..PDF..::..X509..::..Signing

See Also

pdfforge.PDF Namespace
Copyright by pdfforge GbR

Send comments on this topic to info@pdfforge.org

Copyright pdfforge GmbH


PDF.X509.Signing Constructor

pdfforge.dll help file
PDF..::..X509..::..Signing Constructor
Initialization the signing class.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public Signing()
Public Sub New
public:
Signing()

Examples

SignPDFFile(String, String)
SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


Signing Methods

pdfforge.dll help file
PDF..::..X509..::..Signing Methods

The PDF..::..X509..::..Signing type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
SignPDFFile(String, String) | Sign a pdf file.
SignPDFFile(String, String, String) | Sign a pdf file.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

See Also

PDF..::..X509..::..Signing Class


SignPDFFile Method

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignPDFFile Method

Overload List

Name | Description
SignPDFFile(String, String) | Sign a pdf file.
SignPDFFile(String, String, String) | Sign a pdf file.

See Also

PDF..::..X509..::..Signing Class


SignPDFFile Method (String, String)

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::..Signing..::SignPDFFile Method (String, String)
Sign a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public void SignPDFFile(
    string sourceFilename,
    string ownerPasswordSourceFilename
)
Public Sub SignPDFFile ( _
    sourceFilename As String, _
    ownerPasswordSourceFilename As String _
)
public:
virtual void SignPDFFile(
    String^ sourceFilename,
    String^ ownerPasswordSourceFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
ownerPasswordSourceFilename
String
The owner password of the source file if it is encrypted. If it is not encrypted use an empty string.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 4, "This is an example.", true);
PDF.X509.Signing pxs = new PDF.X509.Signing();
pxs.CertficateFilename = "MyCertificate.pfx";
pxs.CertifcatePassword = "MyPassword";
pxs.TimeServerURL = "http://timestamp.globalsign.com/scripts/timstamp.dll";
pxs.HashAlgorithm = "SHA512"; // MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160
pxs.SignatureContact = "pdfforge";
pxs.SignatureLocation = "Germany";
pxs.SignatureReason = "Test - Show signature";
pxs.SignPDFFile("test.pdf", "");
pxs = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, pxs
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 4, "This is an example.", true
Set pxs = WScript.CreateObject("pdfforge.PDF.PDF.X509.Signing")
pxs.CertficateFilename = "MyCertificate.pfx"
pxs.CertifcatePassword = "MyPassword"
pxs.TimeServerURL = "http://timestamp.globalsign.com/scripts/timstamp.dll"
pxs.HashAlgorithm = "SHA512" ' MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160
pxs.SignatureContact = "pdfforge"
pxs.SignatureLocation = "Germany"
pxs.SignatureReason = "Test - Show signature"
pxs.SignPDFFile "test.pdf", ""
Set pxs = Nothing
Set pdf = Nothing
MsgBox "Ready"
VB6 (VB Classic) Copy image Copy
' Add a reference to pdfforge.tlb for early binding
Dim pdf As pdfforge.pdf, pxs As pdfforge.Signing
Set pdf = New pdfforge.pdf
pdf.CreatePDFTestDocument "test.pdf", 4, "This is an example.", True
Set pxs = New pdfforge.Signing
pxs.certficateFilename = "MyCertificate.pfx"
pxs.certifcatePassword = "MyPassword"
pxs.TimeServerURL = "http://timestamp.globalsign.com/scripts/timstamp.dll"
pxs.HashAlgorithm = "SHA512" ' MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160
pxs.signatureContact = "pdfforge"
pxs.signatureLocation = "Germany"
pxs.signatureReason = "Test - Show signature"
pxs.SignPDFFile "test.pdf", ""
Set pxs = Nothing
Set pdf = Nothing
MsgBox "Ready"

See Also

PDF..::..X509..::..Signing Class
SignPDFFile Overload


SignPDFFile Method (String, String, String)

| Example | See Also
pdfforge.dll help file
PDF..::..X509..::..Signing..::SignPDFFile Method (String, String, String)
Sign a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public void SignPDFFile(
    string sourceFilename,
    string ownerPasswordSourceFilename,
    string destinationFilename
)
Public Sub SignPDFFile ( _
    sourceFilename As String, _
    ownerPasswordSourceFilename As String, _
    destinationFilename As String _
)
public:
virtual void SignPDFFile(
    String^ sourceFilename,
    String^ ownerPasswordSourceFilename,
    String^ destinationFilename
) sealed

Parameters

sourceFilename
String
Name of the pdf source file.
ownerPasswordSourceFilename
String
The owner password of the source file if it is encrypted. If it is not encrypted use an empty string.
destinationFilename
String
Name of the pdf destination file.

Examples

C# Copy image Copy
PDF pdf = new PDF();
pdf.CreatePDFTestDocument("test.pdf", 4, "This is an example.", true);
PDF.X509.Signing pxs = new PDF.X509.Signing();
pxs.CertficateFilename = "MyCertificate.pfx";
pxs.CertifcatePassword = "MyPassword";
pxs.TimeServerURL = "http://timestamp.globalsign.com/scripts/timstamp.dll";
pxs.HashAlgorithm = "SHA512"; // MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160
pxs.SignPDFFile("test.pdf", "", "outputSigned.pdf");
pxs.PdfEncryptor = new PDFEncryptor();
pxs.PdfEncryptor.AllowAssembly = false;
pxs.PdfEncryptor.AllowCopy = false;
pxs.PdfEncryptor.AllowFillIn = false;
pxs.PdfEncryptor.AllowModifyAnnotations = false;
pxs.PdfEncryptor.AllowModifyContents = false;
pxs.PdfEncryptor.AllowPrinting = false;
pxs.PdfEncryptor.AllowPrintingHighResolution = false;
pxs.PdfEncryptor.AllowScreenreaders = false;
pxs.PdfEncryptor.EncryptionMethod = 2;
pxs.PdfEncryptor.OwnerPassword = "pdfforge";
pxs.PdfEncryptor.UserPassword = "user";
pxs.SignPDFFile("test.pdf", "", "outputSignedEncrypted.pdf");
pxs.PdfEncryptor = null;
pxs.MultiSignatures = false;
pxs.SignatureContact = "pdfforge";
pxs.SignatureLocation = "Germany";
pxs.SignatureOnPage = 1;
pxs.SignaturePositionLowerLeftX = 150;
pxs.SignaturePositionLowerLeftY = 10;
pxs.SignaturePositionUpperRightX = pxs.SignaturePositionLowerLeftX + 30;
pxs.SignaturePositionUpperRightY = pxs.SignaturePositionLowerLeftY + 30;
pxs.SignatureReason = "Test - Show signature";
pxs.SignatureVisible = true;
pxs.SignPDFFile("test.pdf", "", "outputSignedShowSignature.pdf");
pxs = null;
pdf = null;
Visual Basic Script Copy image Copy
Option Explicit
Dim pdf, pxs
Set pdf = WScript.CreateObject("pdfforge.pdf.pdf")
pdf.CreatePDFTestDocument "test.pdf", 4, "This is an example.", true
Set pxs = WScript.CreateObject("pdfforge.PDF.PDF.X509.Signing")
pxs.CertficateFilename = "MyCertificate.pfx"
pxs.CertifcatePassword = "MyPassword"
pxs.TimeServerURL = "http://timestamp.globalsign.com/scripts/timstamp.dll"
pxs.HashAlgorithm = "SHA512" ' MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160
pxs.SignPDFFile_2 "test.pdf", "", "outputSigned.pdf"
Set pxs.PdfEncryptor = CreateObject("pdfforge.pdf.PDFEncryptor")
pxs.PdfEncryptor.AllowAssembly = false
pxs.PdfEncryptor.AllowCopy = false
pxs.PdfEncryptor.AllowFillIn = false
pxs.PdfEncryptor.AllowModifyAnnotations = false
pxs.PdfEncryptor.AllowModifyContents = false
pxs.PdfEncryptor.AllowPrinting = false
pxs.PdfEncryptor.AllowPrintingHighResolution = false
pxs.PdfEncryptor.AllowScreenreaders = false
pxs.PdfEncryptor.EncryptionMethod = 2
pxs.PdfEncryptor.OwnerPassword = "pdfforge"
pxs.PdfEncryptor.UserPassword = "user"
pxs.SignPDFFile_2 "test.pdf", "", "outputSignedEncrypted.pdf"
Set pxs.PdfEncryptor = nothing
pxs.MultiSignatures = false
pxs.SignatureContact = "pdfforge"
pxs.SignatureLocation = "Germany"
pxs.SignatureOnPage = 1
pxs.SignaturePositionLowerLeftX = 350
pxs.SignaturePositionLowerLeftY = 60
pxs.SignaturePositionUpperRightX = pxs.SignaturePositionLowerLeftX + 200
pxs.SignaturePositionUpperRightY = pxs.SignaturePositionLowerLeftY + 150
pxs.SignatureReason = "Test - Show signature"
pxs.SignatureVisible = true
pxs.SignPDFFile_2 "test.pdf", "", "outputSignedShowSignature.pdf"
Set pxs = Nothing
Set pdf = Nothing
MsgBox "Ready"
VB6 (VB Classic) Copy image Copy
' Add a reference to pdfforge.tlb for early binding
Dim pdf As pdfforge.pdf, pxs As pdfforge.Signing
Set pdf = New pdfforge.pdf
pdf.CreatePDFTestDocument "test.pdf", 4, "This is an example.", True
Set pxs = New pdfforge.Signing
pxs.certficateFilename = "MyCertificate.pfx"
pxs.certifcatePassword = "MyPassword"
pxs.TimeServerURL = "http://timestamp.globalsign.com/scripts/timstamp.dll"
pxs.HashAlgorithm = "SHA512" ' MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160
pxs.SignPDFFile_2 "test.pdf", "", "outputSigned.pdf"
Set pxs.PDFEncryptor = CreateObject("pdfforge.pdf.PDFEncryptor")
pxs.PDFEncryptor.AllowAssembly = False
pxs.PDFEncryptor.AllowCopy = False
pxs.PDFEncryptor.AllowFillIn = False
pxs.PDFEncryptor.AllowModifyAnnotations = False
pxs.PDFEncryptor.AllowModifyContents = False
pxs.PDFEncryptor.AllowPrinting = False
pxs.PDFEncryptor.AllowPrintingHighResolution = False
pxs.PDFEncryptor.AllowScreenreaders = False
pxs.PDFEncryptor.EncryptionMethod = 2
pxs.PDFEncryptor.ownerPassword = "pdfforge"
pxs.PDFEncryptor.UserPassword = "user"
pxs.SignPDFFile_2 "test.pdf", "", "outputSignedEncrypted.pdf"
Set pxs.PDFEncryptor = Nothing
pxs.multiSignatures = False
pxs.signatureContact = "pdfforge"
pxs.signatureLocation = "Germany"
pxs.signatureOnPage = 1
pxs.signaturePositionLowerLeftX = 350
pxs.signaturePositionLowerLeftY = 60
pxs.signaturePositionUpperRightX = pxs.signaturePositionLowerLeftX + 200
pxs.signaturePositionUpperRightY = pxs.signaturePositionLowerLeftY + 150
pxs.signatureReason = "Test - Show signature"
pxs.signatureVisible = True
pxs.SignPDFFile_2 "test.pdf", "", "outputSignedShowSignature.pdf"
Set pxs = Nothing
Set pdf = Nothing
MsgBox "Ready"

See Also

PDF..::..X509..::..Signing Class
SignPDFFile Overload


Signing Properties

pdfforge.dll help file
PDF..::..X509..::..Signing Properties

The PDF..::..X509..::..Signing type exposes the following properties.

Properties

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member Description
CertficateFilename
The certificate file name.
CertifcatePassword
The password of the pfx or p12 certificate file.
HashAlgorithm
The hash algorithm.

Permitted values are: MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160

Default value: SHA1

MultiSignatures
Allow multi signatures.
PdfEncryptor
The PDFEncryptor object for encrytion settings.
SignatureContact
The contact of the signature.
SignatureLocation
The location of the signature.
SignatureOnPage
If SignatureVisible is True on which page should the signature shown.
SignaturePositionLowerLeftX
The left x-point of the signature if SignatureVisible is True.
SignaturePositionLowerLeftY
The left y-point of the signature if SignatureVisible is True.
SignaturePositionUpperRightX
The right x-point of the signature if SignatureVisible is True.
SignaturePositionUpperRightY
The right y-point of the signature if SignatureVisible is True.
SignatureReason
The reason of the signature.
SignatureVisible
Should be the signature visible.
TimeServerLogonName
The logon name for the given time server.
TimeServerLogonPassword
The password for the given time server.
TimeServerURL
The url for a time server.

Examples

http://timestamp.globalsign.com/scripts/timstamp.dll

This server doesn't need a logon and a password.

See Also

PDF..::..X509..::..Signing Class


CertficateFilename Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::CertficateFilename Property
The certificate file name.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string CertficateFilename { get; set; }
Public Property CertficateFilename As String
    Get
    Set
public:
virtual property String^ CertficateFilename {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


CertifcatePassword Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::CertifcatePassword Property
The password of the pfx or p12 certificate file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string CertifcatePassword { get; set; }
Public Property CertifcatePassword As String
    Get
    Set
public:
virtual property String^ CertifcatePassword {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


HashAlgorithm Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::HashAlgorithm Property
The hash algorithm.

Permitted values are: MD2, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160

Default value: SHA1

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string HashAlgorithm { get; set; }
Public Property HashAlgorithm As String
    Get
    Set
public:
virtual property String^ HashAlgorithm {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


MultiSignatures Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::MultiSignatures Property
Allow multi signatures.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool MultiSignatures { get; set; }
Public Property MultiSignatures As Boolean
    Get
    Set
public:
virtual property bool MultiSignatures {
    bool get () sealed;
    void set (bool value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


PdfEncryptor Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::PdfEncryptor Property
The PDFEncryptor object for encrytion settings.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public PDFEncryptor PdfEncryptor { get; set; }
Public Property PdfEncryptor As PDFEncryptor
    Get
    Set
public:
virtual property PDFEncryptor^ PdfEncryptor {
    PDFEncryptor^ get () sealed;
    void set (PDFEncryptor^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignatureContact Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignatureContact Property
The contact of the signature.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string SignatureContact { get; set; }
Public Property SignatureContact As String
    Get
    Set
public:
virtual property String^ SignatureContact {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignatureLocation Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignatureLocation Property
The location of the signature.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string SignatureLocation { get; set; }
Public Property SignatureLocation As String
    Get
    Set
public:
virtual property String^ SignatureLocation {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignatureOnPage Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignatureOnPage Property
If SignatureVisible is True on which page should the signature shown.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int SignatureOnPage { get; set; }
Public Property SignatureOnPage As Integer
    Get
    Set
public:
virtual property int SignatureOnPage {
    int get () sealed;
    void set (int value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignaturePositionLowerLeftX Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignaturePositionLowerLeftX Property
The left x-point of the signature if SignatureVisible is True.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int SignaturePositionLowerLeftX { get; set; }
Public Property SignaturePositionLowerLeftX As Integer
    Get
    Set
public:
virtual property int SignaturePositionLowerLeftX {
    int get () sealed;
    void set (int value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignaturePositionLowerLeftY Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignaturePositionLowerLeftY Property
The left y-point of the signature if SignatureVisible is True.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int SignaturePositionLowerLeftY { get; set; }
Public Property SignaturePositionLowerLeftY As Integer
    Get
    Set
public:
virtual property int SignaturePositionLowerLeftY {
    int get () sealed;
    void set (int value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignaturePositionUpperRightX Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignaturePositionUpperRightX Property
The right x-point of the signature if SignatureVisible is True.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int SignaturePositionUpperRightX { get; set; }
Public Property SignaturePositionUpperRightX As Integer
    Get
    Set
public:
virtual property int SignaturePositionUpperRightX {
    int get () sealed;
    void set (int value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignaturePositionUpperRightY Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignaturePositionUpperRightY Property
The right y-point of the signature if SignatureVisible is True.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int SignaturePositionUpperRightY { get; set; }
Public Property SignaturePositionUpperRightY As Integer
    Get
    Set
public:
virtual property int SignaturePositionUpperRightY {
    int get () sealed;
    void set (int value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignatureReason Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignatureReason Property
The reason of the signature.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string SignatureReason { get; set; }
Public Property SignatureReason As String
    Get
    Set
public:
virtual property String^ SignatureReason {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


SignatureVisible Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::SignatureVisible Property
Should be the signature visible.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool SignatureVisible { get; set; }
Public Property SignatureVisible As Boolean
    Get
    Set
public:
virtual property bool SignatureVisible {
    bool get () sealed;
    void set (bool value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


TimeServerLogonName Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::TimeServerLogonName Property
The logon name for the given time server.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string TimeServerLogonName { get; set; }
Public Property TimeServerLogonName As String
    Get
    Set
public:
virtual property String^ TimeServerLogonName {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


TimeServerLogonPassword Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::TimeServerLogonPassword Property
The password for the given time server.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string TimeServerLogonPassword { get; set; }
Public Property TimeServerLogonPassword As String
    Get
    Set
public:
virtual property String^ TimeServerLogonPassword {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


TimeServerURL Property

pdfforge.dll help file
PDF..::..X509..::..Signing..::TimeServerURL Property
The url for a time server.

Examples

http://timestamp.globalsign.com/scripts/timstamp.dll

This server doesn't need a logon and a password.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string TimeServerURL { get; set; }
Public Property TimeServerURL As String
    Get
    Set
public:
virtual property String^ TimeServerURL {
    String^ get () sealed;
    void set (String^ value) sealed;
}

Examples

SignPDFFile(String, String, String)

See Also

PDF..::..X509..::..Signing Class


PDFEncryptor Class

| Members | See Also
pdfforge.dll help file
PDFEncryptor Class
A class to define an encryptor with all necessary parameters to encrypt a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class PDFEncryptor : IPDFEncryptor
Public Class PDFEncryptor _
    Implements IPDFEncryptor
public ref class PDFEncryptor : IPDFEncryptor

Members

All Members | Constructors | Properties | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member Description
PDFEncryptor()()()()
PDFEncryptor
PDFEncryptor(Int32)
PDFEncryptor to set up the permissions according to the parameter "Permissions" (based on the callculated value in PDFCreator)
AllowAssembly
If you set this option to true than a true can assembly of the document. The default value is true.
AllowCopy
If you set this option to true than a user can copy content of the document. The default value is true.
AllowFillIn
If you set this option to true than a user can fill in the document. The default value is true.
AllowModifyAnnotations
If you set this option to true than a user can modify the annotations of the document. The default value is true.
AllowModifyContents
If you set this option to true than a user can modify the content of the document. The default value is true.
AllowPrinting
If you set this option to true than a user can print the document. The default value is true.
AllowPrintingHighResolution
If you set this option to true and AllowPrinting is true than a user can print the document in high resultion. If you set this option to false and AllowPrinting is true than a user can print the document only in low resultion. If AllowPrinting is false than this parameter has no effects. The default value is true.
AllowScreenreaders
If you set this option to true than screen readers are allowed to read the document. The default value is true.
EncryptionMethod
This parameter defines the encryption method. Possible values are 0, 1 and 2. The default value is 0.

Encryption method | Description
0 | The encryption key length is 40 bit, the encryption revision is 2 and the default encryption method is used.
1 | The encryption key length is 128 bit, the encryption revision is 3 and the default encryption method is used.
2 | The encryption key length is 128 bit and aes encryption is used.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(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.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
OwnerPassword
The owner password of an encrypted pdf file. The default value is empty. If you set this property a password is needed to edit a pdf file. If this value is empty the pdf file is not encrypted.
PdfVersion
This parameter defines the pdf-version. It gets automatically set, by setting the encryption method.
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
UserPassword
The user password of an encrypted pdf file. The default value is empty. If you set this property a password is needed to open a pdf file.

Inheritance Hierarchy

System..::..Object
pdfforge.PDF..::..PDFEncryptor

See Also

pdfforge.PDF Namespace
PDF..::..EncryptPDFFile(String, String, PDFEncryptor%)


PDFEncryptor Constructor

pdfforge.dll help file
PDFEncryptor Constructor

Overload List

Name | Description
PDFEncryptor()()()() | PDFEncryptor
PDFEncryptor(Int32) | PDFEncryptor to set up the permissions according to the parameter "Permissions" (based on the callculated value in PDFCreator)

See Also

PDFEncryptor Class


PDFEncryptor Constructor

pdfforge.dll help file
PDFEncryptor Constructor
PDFEncryptor

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public PDFEncryptor()
Public Sub New
public:
PDFEncryptor()

See Also

PDFEncryptor Class
PDFEncryptor Overload


PDFEncryptor Constructor (Int32)

pdfforge.dll help file
PDFEncryptor Constructor (Int32)
PDFEncryptor to set up the permissions according to the parameter "Permissions" (based on the callculated value in PDFCreator)

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public PDFEncryptor(
    int Permissions
)
Public Sub New ( _
    Permissions As Integer _
)
public:
PDFEncryptor(
    int Permissions
)

Parameters

Permissions
Int32
Permissions

See Also

PDFEncryptor Class
PDFEncryptor Overload


PDFEncryptor Methods

pdfforge.dll help file
PDFEncryptor Methods

The PDFEncryptor type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

See Also

PDFEncryptor Class


PDFEncryptor Properties

pdfforge.dll help file
PDFEncryptor Properties

The PDFEncryptor type exposes the following properties.

Properties

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member Description
AllowAssembly
If you set this option to true than a true can assembly of the document. The default value is true.
AllowCopy
If you set this option to true than a user can copy content of the document. The default value is true.
AllowFillIn
If you set this option to true than a user can fill in the document. The default value is true.
AllowModifyAnnotations
If you set this option to true than a user can modify the annotations of the document. The default value is true.
AllowModifyContents
If you set this option to true than a user can modify the content of the document. The default value is true.
AllowPrinting
If you set this option to true than a user can print the document. The default value is true.
AllowPrintingHighResolution
If you set this option to true and AllowPrinting is true than a user can print the document in high resultion. If you set this option to false and AllowPrinting is true than a user can print the document only in low resultion. If AllowPrinting is false than this parameter has no effects. The default value is true.
AllowScreenreaders
If you set this option to true than screen readers are allowed to read the document. The default value is true.
EncryptionMethod
This parameter defines the encryption method. Possible values are 0, 1 and 2. The default value is 0.

Encryption method | Description
0 | The encryption key length is 40 bit, the encryption revision is 2 and the default encryption method is used.
1 | The encryption key length is 128 bit, the encryption revision is 3 and the default encryption method is used.
2 | The encryption key length is 128 bit and aes encryption is used.
OwnerPassword
The owner password of an encrypted pdf file. The default value is empty. If you set this property a password is needed to edit a pdf file. If this value is empty the pdf file is not encrypted.
PdfVersion
This parameter defines the pdf-version. It gets automatically set, by setting the encryption method.
UserPassword
The user password of an encrypted pdf file. The default value is empty. If you set this property a password is needed to open a pdf file.

See Also

PDFEncryptor Class


AllowAssembly Property

pdfforge.dll help file
PDFEncryptor..::AllowAssembly Property
If you set this option to true than a true can assembly of the document. The default value is true.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool AllowAssembly { get; set; }
Public Property AllowAssembly As Boolean
    Get
    Set
public:
virtual property bool AllowAssembly {
    bool get () sealed;
    void set (bool value) sealed;
}

Remarks

For information see the pdf reference http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


AllowCopy Property

pdfforge.dll help file
PDFEncryptor..::AllowCopy Property
If you set this option to true than a user can copy content of the document. The default value is true.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool AllowCopy { get; set; }
Public Property AllowCopy As Boolean
    Get
    Set
public:
virtual property bool AllowCopy {
    bool get () sealed;
    void set (bool value) sealed;
}

Remarks

For information see the pdf reference http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


AllowFillIn Property

pdfforge.dll help file
PDFEncryptor..::AllowFillIn Property
If you set this option to true than a user can fill in the document. The default value is true.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool AllowFillIn { get; set; }
Public Property AllowFillIn As Boolean
    Get
    Set
public:
virtual property bool AllowFillIn {
    bool get () sealed;
    void set (bool value) sealed;
}

Remarks

For information see the pdf reference http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


AllowModifyAnnotations Property

pdfforge.dll help file
PDFEncryptor..::AllowModifyAnnotations Property
If you set this option to true than a user can modify the annotations of the document. The default value is true.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool AllowModifyAnnotations { get; set; }
Public Property AllowModifyAnnotations As Boolean
    Get
    Set
public:
virtual property bool AllowModifyAnnotations {
    bool get () sealed;
    void set (bool value) sealed;
}

Remarks

For information see the pdf reference http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


AllowModifyContents Property

pdfforge.dll help file
PDFEncryptor..::AllowModifyContents Property
If you set this option to true than a user can modify the content of the document. The default value is true.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool AllowModifyContents { get; set; }
Public Property AllowModifyContents As Boolean
    Get
    Set
public:
virtual property bool AllowModifyContents {
    bool get () sealed;
    void set (bool value) sealed;
}

Remarks

For information see the pdf reference http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


AllowPrinting Property

pdfforge.dll help file
PDFEncryptor..::AllowPrinting Property
If you set this option to true than a user can print the document. The default value is true.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool AllowPrinting { get; set; }
Public Property AllowPrinting As Boolean
    Get
    Set
public:
virtual property bool AllowPrinting {
    bool get () sealed;
    void set (bool value) sealed;
}

Remarks

For information see the pdf reference http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


AllowPrintingHighResolution Property

pdfforge.dll help file
PDFEncryptor..::AllowPrintingHighResolution Property
If you set this option to true and AllowPrinting is true than a user can print the document in high resultion. If you set this option to false and AllowPrinting is true than a user can print the document only in low resultion. If AllowPrinting is false than this parameter has no effects. The default value is true.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool AllowPrintingHighResolution { get; set; }
Public Property AllowPrintingHighResolution As Boolean
    Get
    Set
public:
virtual property bool AllowPrintingHighResolution {
    bool get () sealed;
    void set (bool value) sealed;
}

Remarks

For information see the pdf reference http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


AllowScreenreaders Property

pdfforge.dll help file
PDFEncryptor..::AllowScreenreaders Property
If you set this option to true than screen readers are allowed to read the document. The default value is true.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool AllowScreenreaders { get; set; }
Public Property AllowScreenreaders As Boolean
    Get
    Set
public:
virtual property bool AllowScreenreaders {
    bool get () sealed;
    void set (bool value) sealed;
}

Remarks

For information see the pdf reference http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


EncryptionMethod Property

pdfforge.dll help file
PDFEncryptor..::EncryptionMethod Property
This parameter defines the encryption method. Possible values are 0, 1 and 2. The default value is 0.

Encryption method | Description
0 | The encryption key length is 40 bit, the encryption revision is 2 and the default encryption method is used.
1 | The encryption key length is 128 bit, the encryption revision is 3 and the default encryption method is used.
2 | The encryption key length is 128 bit and aes encryption is used.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public int EncryptionMethod { get; set; }
Public Property EncryptionMethod As Integer
    Get
    Set
public:
virtual property int EncryptionMethod {
    int get () sealed;
    void set (int value) sealed;
}

Remarks

For information see the pdf reference. See also http://www.adobe.com/devnet/pdf/pdf_reference.html

See Also

PDFEncryptor Class


OwnerPassword Property

pdfforge.dll help file
PDFEncryptor..::OwnerPassword Property
The owner password of an encrypted pdf file. The default value is empty. If you set this property a password is needed to edit a pdf file. If this value is empty the pdf file is not encrypted.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string OwnerPassword { get; set; }
Public Property OwnerPassword As String
    Get
    Set
public:
virtual property String^ OwnerPassword {
    String^ get () sealed;
    void set (String^ value) sealed;
}

See Also

PDFEncryptor Class


PdfVersion Property

pdfforge.dll help file
PDFEncryptor..::PdfVersion Property
This parameter defines the pdf-version. It gets automatically set, by setting the encryption method.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public char PdfVersion { get; }
Public ReadOnly Property PdfVersion As Char
    Get
public:
property wchar_t PdfVersion {
    wchar_t get ();
}

See Also

PDFEncryptor Class


UserPassword Property

pdfforge.dll help file
PDFEncryptor..::UserPassword Property
The user password of an encrypted pdf file. The default value is empty. If you set this property a password is needed to open a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string UserPassword { get; set; }
Public Property UserPassword As String
    Get
    Set
public:
virtual property String^ UserPassword {
    String^ get () sealed;
    void set (String^ value) sealed;
}

See Also

PDFEncryptor Class


PDFLine Class

| Members | See Also
pdfforge.dll help file
PDFLine Class
A PDFLine class to draw lines in a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class PDFLine : IPDFLine
Public Class PDFLine _
    Implements IPDFLine
public ref class PDFLine : IPDFLine

Members

All Members | Constructors | Properties | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
PDFLine()()()() | Initializes a new instance of the PDFLine class
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FromX | The x start of the line. The default value is 0.0.
FromY | The y start of the line. The default value is 0.0.
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
LineColorBlue | The blue color part of the line. The default value is 0.
LineColorGreen | The green color part of the line. The default value is 0.
LineColorRed | The red color part of the line. The default value is 0.
LineThickness | The thickness of the line. The default value is 0.1.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
Phase | The phase of a dot line. The default value is 0.0.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
ToX | The x end of the line. The default value is 100.0.
ToY | The y end of the line. The default value is 100.0.
UnitsOff | The off part of a dot line. The default value is 0.0.
UnitsOn | The on part of a dot line. The default value is 1.0.

Inheritance Hierarchy

System..::..Object
pdfforge.PDF..::..PDFLine

See Also

pdfforge.PDF Namespace
Copyright by pdfforge GbR

Send comments on this topic to info@pdfforge.org

Copyright pdfforge GmbH


PDFLine Constructor

pdfforge.dll help file
PDFLine Constructor
Initializes a new instance of the PDFLine class

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public PDFLine()
Public Sub New
public:
PDFLine()

See Also

PDFLine Class


PDFLine Methods

pdfforge.dll help file
PDFLine Methods

The PDFLine type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

See Also

PDFLine Class


PDFLine Properties

pdfforge.dll help file
PDFLine Properties

The PDFLine type exposes the following properties.

Properties

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
FromX | The x start of the line. The default value is 0.0.
FromY | The y start of the line. The default value is 0.0.
LineColorBlue | The blue color part of the line. The default value is 0.
LineColorGreen | The green color part of the line. The default value is 0.
LineColorRed | The red color part of the line. The default value is 0.
LineThickness | The thickness of the line. The default value is 0.1.
Phase | The phase of a dot line. The default value is 0.0.
ToX | The x end of the line. The default value is 100.0.
ToY | The y end of the line. The default value is 100.0.
UnitsOff | The off part of a dot line. The default value is 0.0.
UnitsOn | The on part of a dot line. The default value is 1.0.

See Also

PDFLine Class


FromX Property

pdfforge.dll help file
PDFLine..::FromX Property
The x start of the line. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float FromX { get; set; }
Public Property FromX As Single
    Get
    Set
public:
virtual property float FromX {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFLine Class


FromY Property

pdfforge.dll help file
PDFLine..::FromY Property
The y start of the line. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float FromY { get; set; }
Public Property FromY As Single
    Get
    Set
public:
virtual property float FromY {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFLine Class


LineColorBlue Property

pdfforge.dll help file
PDFLine..::LineColorBlue Property
The blue color part of the line. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte LineColorBlue { get; set; }
Public Property LineColorBlue As Byte
    Get
    Set
public:
virtual property unsigned char LineColorBlue {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFLine Class


LineColorGreen Property

pdfforge.dll help file
PDFLine..::LineColorGreen Property
The green color part of the line. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte LineColorGreen { get; set; }
Public Property LineColorGreen As Byte
    Get
    Set
public:
virtual property unsigned char LineColorGreen {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFLine Class


LineColorRed Property

pdfforge.dll help file
PDFLine..::LineColorRed Property
The red color part of the line. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte LineColorRed { get; set; }
Public Property LineColorRed As Byte
    Get
    Set
public:
virtual property unsigned char LineColorRed {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFLine Class


LineThickness Property

pdfforge.dll help file
PDFLine..::LineThickness Property
The thickness of the line. The default value is 0.1.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float LineThickness { get; set; }
Public Property LineThickness As Single
    Get
    Set
public:
virtual property float LineThickness {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFLine Class


Phase Property

pdfforge.dll help file
PDFLine..::Phase Property
The phase of a dot line. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float Phase { get; set; }
Public Property Phase As Single
    Get
    Set
public:
virtual property float Phase {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFLine Class


ToX Property

pdfforge.dll help file
PDFLine..::ToX Property
The x end of the line. The default value is 100.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float ToX { get; set; }
Public Property ToX As Single
    Get
    Set
public:
virtual property float ToX {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFLine Class


ToY Property

pdfforge.dll help file
PDFLine..::ToY Property
The y end of the line. The default value is 100.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float ToY { get; set; }
Public Property ToY As Single
    Get
    Set
public:
virtual property float ToY {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFLine Class


UnitsOff Property

pdfforge.dll help file
PDFLine..::UnitsOff Property
The off part of a dot line. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float UnitsOff { get; set; }
Public Property UnitsOff As Single
    Get
    Set
public:
virtual property float UnitsOff {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFLine Class


UnitsOn Property

pdfforge.dll help file
PDFLine..::UnitsOn Property
The on part of a dot line. The default value is 1.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float UnitsOn { get; set; }
Public Property UnitsOn As Single
    Get
    Set
public:
virtual property float UnitsOn {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFLine Class


PDFRectangle Class

| Members | See Also
pdfforge.dll help file
PDFRectangle Class
A PDFRectangle class to draw rectangles in a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class PDFRectangle : IPDFRectangle
Public Class PDFRectangle _
    Implements IPDFRectangle
public ref class PDFRectangle : IPDFRectangle

Members

All Members | Constructors | Properties | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
PDFRectangle()()()() | Initializes a new instance of the PDFRectangle class
BorderColorBlue | The blue color part of the border line. The default value is 0.
BorderColorGreen | The green color part of the border line. The default value is 0.
BorderColorRed | The red color part of the border line. The default value is 0.
BorderOpacity | The border color opacity. Valid values are between 0 and 1. The default value is 1.
BorderWidth | The thickness of the border line. The default value is 0.1.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
FillColorBlue | The blue color part of the fill color. The default value is 0.
FillColorGreen | The green color part of the fill color. The default value is 0.
FillColorRed | The red color part of the fill color. The default value is 0.
Filled | Is the rectangled filled with the fill color. The default value is false.
FillOpacity | The fill color opacity. Valid values are between 0 and 1. The default value is 1.
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
LowerLeftX | The lower left x coordinate of the rectangle. The default value is 0.0.
LowerLeftY | The lower left y coordinate of the rectangle. The default value is 0.0.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
Phase | The phase of a border dot line. The default value is 0.0.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
UnitsOff | The off part of a border dot line. The default value is 0.0.
UnitsOn | The on part of a border dot line. The default value is 1.0.
UpperRightX | The upper right x coordinate of the rectangle. The default value is 0.0.
UpperRightY | The upper right y coordinate of the rectangle. The default value is 0.0.

Inheritance Hierarchy

System..::..Object
pdfforge.PDF..::..PDFRectangle

See Also

pdfforge.PDF Namespace
Copyright by pdfforge GbR

Send comments on this topic to info@pdfforge.org

Copyright pdfforge GmbH


PDFRectangle Constructor

pdfforge.dll help file
PDFRectangle Constructor
Initializes a new instance of the PDFRectangle class

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public PDFRectangle()
Public Sub New
public:
PDFRectangle()

See Also

PDFRectangle Class


PDFRectangle Methods

pdfforge.dll help file
PDFRectangle Methods

The PDFRectangle type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

See Also

PDFRectangle Class


PDFRectangle Properties

pdfforge.dll help file
PDFRectangle Properties

The PDFRectangle type exposes the following properties.

Properties

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
BorderColorBlue | The blue color part of the border line. The default value is 0.
BorderColorGreen | The green color part of the border line. The default value is 0.
BorderColorRed | The red color part of the border line. The default value is 0.
BorderOpacity | The border color opacity. Valid values are between 0 and 1. The default value is 1.
BorderWidth | The thickness of the border line. The default value is 0.1.
FillColorBlue | The blue color part of the fill color. The default value is 0.
FillColorGreen | The green color part of the fill color. The default value is 0.
FillColorRed | The red color part of the fill color. The default value is 0.
Filled | Is the rectangled filled with the fill color. The default value is false.
FillOpacity | The fill color opacity. Valid values are between 0 and 1. The default value is 1.
LowerLeftX | The lower left x coordinate of the rectangle. The default value is 0.0.
LowerLeftY | The lower left y coordinate of the rectangle. The default value is 0.0.
Phase | The phase of a border dot line. The default value is 0.0.
UnitsOff | The off part of a border dot line. The default value is 0.0.
UnitsOn | The on part of a border dot line. The default value is 1.0.
UpperRightX | The upper right x coordinate of the rectangle. The default value is 0.0.
UpperRightY | The upper right y coordinate of the rectangle. The default value is 0.0.

See Also

PDFRectangle Class


BorderColorBlue Property

pdfforge.dll help file
PDFRectangle..::BorderColorBlue Property
The blue color part of the border line. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte BorderColorBlue { get; set; }
Public Property BorderColorBlue As Byte
    Get
    Set
public:
virtual property unsigned char BorderColorBlue {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFRectangle Class


BorderColorGreen Property

pdfforge.dll help file
PDFRectangle..::BorderColorGreen Property
The green color part of the border line. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte BorderColorGreen { get; set; }
Public Property BorderColorGreen As Byte
    Get
    Set
public:
virtual property unsigned char BorderColorGreen {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFRectangle Class


BorderColorRed Property

pdfforge.dll help file
PDFRectangle..::BorderColorRed Property
The red color part of the border line. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte BorderColorRed { get; set; }
Public Property BorderColorRed As Byte
    Get
    Set
public:
virtual property unsigned char BorderColorRed {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFRectangle Class


BorderOpacity Property

pdfforge.dll help file
PDFRectangle..::BorderOpacity Property
The border color opacity. Valid values are between 0 and 1. The default value is 1.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float BorderOpacity { get; set; }
Public Property BorderOpacity As Single
    Get
    Set
public:
virtual property float BorderOpacity {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


BorderWidth Property

pdfforge.dll help file
PDFRectangle..::BorderWidth Property
The thickness of the border line. The default value is 0.1.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float BorderWidth { get; set; }
Public Property BorderWidth As Single
    Get
    Set
public:
virtual property float BorderWidth {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


FillColorBlue Property

pdfforge.dll help file
PDFRectangle..::FillColorBlue Property
The blue color part of the fill color. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte FillColorBlue { get; set; }
Public Property FillColorBlue As Byte
    Get
    Set
public:
virtual property unsigned char FillColorBlue {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFRectangle Class


FillColorGreen Property

pdfforge.dll help file
PDFRectangle..::FillColorGreen Property
The green color part of the fill color. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte FillColorGreen { get; set; }
Public Property FillColorGreen As Byte
    Get
    Set
public:
virtual property unsigned char FillColorGreen {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFRectangle Class


FillColorRed Property

pdfforge.dll help file
PDFRectangle..::FillColorRed Property
The red color part of the fill color. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte FillColorRed { get; set; }
Public Property FillColorRed As Byte
    Get
    Set
public:
virtual property unsigned char FillColorRed {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFRectangle Class


Filled Property

pdfforge.dll help file
PDFRectangle..::Filled Property
Is the rectangled filled with the fill color. The default value is false.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool Filled { get; set; }
Public Property Filled As Boolean
    Get
    Set
public:
virtual property bool Filled {
    bool get () sealed;
    void set (bool value) sealed;
}

See Also

PDFRectangle Class


FillOpacity Property

pdfforge.dll help file
PDFRectangle..::FillOpacity Property
The fill color opacity. Valid values are between 0 and 1. The default value is 1.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float FillOpacity { get; set; }
Public Property FillOpacity As Single
    Get
    Set
public:
virtual property float FillOpacity {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


LowerLeftX Property

pdfforge.dll help file
PDFRectangle..::LowerLeftX Property
The lower left x coordinate of the rectangle. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float LowerLeftX { get; set; }
Public Property LowerLeftX As Single
    Get
    Set
public:
virtual property float LowerLeftX {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


LowerLeftY Property

pdfforge.dll help file
PDFRectangle..::LowerLeftY Property
The lower left y coordinate of the rectangle. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float LowerLeftY { get; set; }
Public Property LowerLeftY As Single
    Get
    Set
public:
virtual property float LowerLeftY {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


Phase Property

pdfforge.dll help file
PDFRectangle..::Phase Property
The phase of a border dot line. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float Phase { get; set; }
Public Property Phase As Single
    Get
    Set
public:
virtual property float Phase {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


UnitsOff Property

pdfforge.dll help file
PDFRectangle..::UnitsOff Property
The off part of a border dot line. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float UnitsOff { get; set; }
Public Property UnitsOff As Single
    Get
    Set
public:
virtual property float UnitsOff {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


UnitsOn Property

pdfforge.dll help file
PDFRectangle..::UnitsOn Property
The on part of a border dot line. The default value is 1.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float UnitsOn { get; set; }
Public Property UnitsOn As Single
    Get
    Set
public:
virtual property float UnitsOn {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


UpperRightX Property

pdfforge.dll help file
PDFRectangle..::UpperRightX Property
The upper right x coordinate of the rectangle. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float UpperRightX { get; set; }
Public Property UpperRightX As Single
    Get
    Set
public:
virtual property float UpperRightX {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


UpperRightY Property

pdfforge.dll help file
PDFRectangle..::UpperRightY Property
The upper right y coordinate of the rectangle. The default value is 0.0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float UpperRightY { get; set; }
Public Property UpperRightY As Single
    Get
    Set
public:
virtual property float UpperRightY {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFRectangle Class


PDFText Class

| Members | See Also
pdfforge.dll help file
PDFText Class
A PDFText class to add text to a page in a pdf file.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class PDFText : IPDFText
Public Class PDFText _
    Implements IPDFText
public ref class PDFText : IPDFText

Members

All Members | Constructors | Properties | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
PDFText()()()() | The contructor sets the standard font for FontName. If Arial exists FontName is Arial, otherwise it is Times. If Times doesn't exist it uses the first font in the font directory for FontName.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
FillOpacity | The fill opacity of the text. 0 means the text transparent. 1 means there is no transparency. The default value is 1.
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FontColorBlue | The blue color part of the text. The default value is 0.
FontColorGreen | The green color part of the text. The default value is 0.
FontColorRed | The red color part of the text. The default value is 0.
FontName | The font. The default value is defined in PDFText()()()().
FontPath | The path to the font. The default value is the windows directory + 'Fonts'.
FontSize | The font size in points. The default value is 12.
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
Rotation | The rotation of the text in degrees (counterclockwise rotation). The default value is 0.
Text | The text string. The default value is 'www.pdfforge.org'.
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
XPosition | The x-position of the text in millimeters. The default value is 10.
YPosition | The y-position of the text in millimeters. The default value is 10.

Inheritance Hierarchy

System..::..Object
pdfforge.PDF..::..PDFText

See Also

pdfforge.PDF Namespace
Copyright by pdfforge GbR

Send comments on this topic to info@pdfforge.org

Copyright pdfforge GmbH


PDFText Constructor

pdfforge.dll help file
PDFText Constructor
The contructor sets the standard font for FontName. If Arial exists FontName is Arial, otherwise it is Times. If Times doesn't exist it uses the first font in the font directory for FontName.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public PDFText()
Public Sub New
public:
PDFText()

See Also

PDFText Class


PDFText Methods

pdfforge.dll help file
PDFText Methods

The PDFText type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

See Also

PDFText Class


PDFText Properties

pdfforge.dll help file
PDFText Properties

The PDFText type exposes the following properties.

Properties

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
FillOpacity | The fill opacity of the text. 0 means the text transparent. 1 means there is no transparency. The default value is 1.
FontColorBlue | The blue color part of the text. The default value is 0.
FontColorGreen | The green color part of the text. The default value is 0.
FontColorRed | The red color part of the text. The default value is 0.
FontName | The font. The default value is defined in PDFText()()()().
FontPath | The path to the font. The default value is the windows directory + 'Fonts'.
FontSize | The font size in points. The default value is 12.
Rotation | The rotation of the text in degrees (counterclockwise rotation). The default value is 0.
Text | The text string. The default value is 'www.pdfforge.org'.
XPosition | The x-position of the text in millimeters. The default value is 10.
YPosition | The y-position of the text in millimeters. The default value is 10.

See Also

PDFText Class


FillOpacity Property

pdfforge.dll help file
PDFText..::FillOpacity Property
The fill opacity of the text. 0 means the text transparent. 1 means there is no transparency. The default value is 1.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float FillOpacity { get; set; }
Public Property FillOpacity As Single
    Get
    Set
public:
virtual property float FillOpacity {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFText Class


FontColorBlue Property

pdfforge.dll help file
PDFText..::FontColorBlue Property
The blue color part of the text. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte FontColorBlue { get; set; }
Public Property FontColorBlue As Byte
    Get
    Set
public:
virtual property unsigned char FontColorBlue {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFText Class


FontColorGreen Property

pdfforge.dll help file
PDFText..::FontColorGreen Property
The green color part of the text. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte FontColorGreen { get; set; }
Public Property FontColorGreen As Byte
    Get
    Set
public:
virtual property unsigned char FontColorGreen {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFText Class


FontColorRed Property

pdfforge.dll help file
PDFText..::FontColorRed Property
The red color part of the text. The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public byte FontColorRed { get; set; }
Public Property FontColorRed As Byte
    Get
    Set
public:
virtual property unsigned char FontColorRed {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

See Also

PDFText Class


FontName Property

pdfforge.dll help file
PDFText..::FontName Property
The font. The default value is defined in PDFText()()()().

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string FontName { get; set; }
Public Property FontName As String
    Get
    Set
public:
virtual property String^ FontName {
    String^ get () sealed;
    void set (String^ value) sealed;
}

See Also

PDFText Class


FontPath Property

pdfforge.dll help file
PDFText..::FontPath Property
The path to the font. The default value is the windows directory + 'Fonts'.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string FontPath { get; set; }
Public Property FontPath As String
    Get
    Set
public:
virtual property String^ FontPath {
    String^ get () sealed;
    void set (String^ value) sealed;
}

See Also

PDFText Class


FontSize Property

pdfforge.dll help file
PDFText..::FontSize Property
The font size in points. The default value is 12.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float FontSize { get; set; }
Public Property FontSize As Single
    Get
    Set
public:
virtual property float FontSize {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFText Class


Rotation Property

pdfforge.dll help file
PDFText..::Rotation Property
The rotation of the text in degrees (counterclockwise rotation). The default value is 0.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float Rotation { get; set; }
Public Property Rotation As Single
    Get
    Set
public:
virtual property float Rotation {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFText Class


Text Property

pdfforge.dll help file
PDFText..::Text Property
The text string. The default value is 'www.pdfforge.org'.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public string Text { get; set; }
Public Property Text As String
    Get
    Set
public:
virtual property String^ Text {
    String^ get () sealed;
    void set (String^ value) sealed;
}

See Also

PDFText Class


XPosition Property

pdfforge.dll help file
PDFText..::XPosition Property
The x-position of the text in millimeters. The default value is 10.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float XPosition { get; set; }
Public Property XPosition As Single
    Get
    Set
public:
virtual property float XPosition {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFText Class


YPosition Property

pdfforge.dll help file
PDFText..::YPosition Property
The y-position of the text in millimeters. The default value is 10.

Namespace: pdfforge.PDF
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public float YPosition { get; set; }
Public Property YPosition As Single
    Get
    Set
public:
virtual property float YPosition {
    float get () sealed;
    void set (float value) sealed;
}

See Also

PDFText Class


pdfforge.X509 Namespace

pdfforge.dll help file
pdfforge.X509 Namespace
Namspace includes X509 methodes with belonging interfaces.

Types

All Types | Classes
Name | Description
X509 | This class contains X509 methods.


X509 Class

| Members | See Also
pdfforge.dll help file
X509 Class
This class contains X509 methods.

Namespace: pdfforge.X509
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public class X509 : IX509
Public Class X509 _
    Implements IX509
public ref class X509 : IX509

Members

All Members | Constructors | Methods
Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
X509()()()() | Initializes a new instance of the X509 class
CertificateHasPrivateKey(String, String) | This method returns true if a certificate has a private key.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
IsValidCertificatePassword(String, String) | This method returns true if a password for a given certificate file is valid.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

Inheritance Hierarchy

System..::..Object
pdfforge.X509..::..X509

See Also

pdfforge.X509 Namespace


X509 Constructor

pdfforge.dll help file
X509 Constructor
Initializes a new instance of the X509 class

Namespace: pdfforge.X509
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public X509()
Public Sub New
public:
X509()

See Also

X509 Class
pdfforge.X509 Namespace


X509 Methods

pdfforge.dll help file
X509 Methods

The X509 type exposes the following methods.

Methods

Public

Protected
Instance

Static
Declared

Inherited
XNA Framework Only

.NET Compact Framework Only

Member | Description
CertificateHasPrivateKey(String, String) | This method returns true if a certificate has a private key.
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (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.)
IsValidCertificatePassword(String, String) | This method returns true if a password for a given certificate file is valid.
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)

See Also

X509 Class
pdfforge.X509 Namespace


CertificateHasPrivateKey Method

| Example | See Also
pdfforge.dll help file
X509..::CertificateHasPrivateKey Method
This method returns true if a certificate has a private key.

Namespace: pdfforge.X509
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool CertificateHasPrivateKey(
    string certficateFilename,
    string certifcatePassword
)
Public Function CertificateHasPrivateKey ( _
    certficateFilename As String, _
    certifcatePassword As String _
) As Boolean
public:
virtual bool CertificateHasPrivateKey(
    String^ certficateFilename,
    String^ certifcatePassword
) sealed

Parameters

certficateFilename
String
Name of p12 or pfx certificate file.
certifcatePassword
String
A password string.

Return Value

True if the certificate has a private key.

Examples

C# Copy image Copy
X509 x509 = new X509();
string certificateFile = "MyCertificate.pfx";
string password = "MyPassword";
if (x509.CertificateHasPrivateKey(certificateFile, password))
 Console.WriteLine("The certifcate '{0}' has a private key.", certificateFile);
else
 Console.WriteLine("The certifcate '{0}' has NO private key.", certificateFile);
x509 = null;
Console.ReadLine();
Visual Basic Script Copy image Copy
Option Explicit
Dim x509, password, certificateFile
certificateFile = "MyCertificate.pfx"
password = "MyPassword"
Set x509 = WScript.CreateObject("pdfforge.x509.x509")
if (pdf.CertificateHasPrivateKey(certificateFile, password)) then
 MsgBox "The certifcate '" + certificateFile + "' has a private key."
else
 MsgBox "The certifcate '" + certificateFile + "' has a NO private key."
end if
Set x509 = Nothing

See Also

X509 Class
pdfforge.X509 Namespace


IsValidCertificatePassword Method

| Example | See Also
pdfforge.dll help file
X509..::IsValidCertificatePassword Method
This method returns true if a password for a given certificate file is valid.

Namespace: pdfforge.X509
Assembly: pdfforge (in pdfforge.dll) Version: 2.6.1.0 (2.6.1.0)

Syntax

C# | Visual Basic | Visual C++
public bool IsValidCertificatePassword(
    string certficateFilename,
    string certifcatePassword
)
Public Function IsValidCertificatePassword ( _
    certficateFilename As String, _
    certifcatePassword As String _
) As Boolean
public:
virtual bool IsValidCertificatePassword(
    String^ certficateFilename,
    String^ certifcatePassword
) sealed

Parameters

certficateFilename
String
Name of p12 or pfx certificate file.
certifcatePassword
String
A password string.

Return Value

True if the password is valid.

Examples

C# Copy image Copy
X509 x509 = new X509();
string certificateFile = "MyCertificate.pfx";
string password = "MyPassword";
Console.WriteLine("Check the password for certifcate '" + certificateFile + "':");
if (x509.IsValidCertificatePassword(certificateFile, password))
 Console.WriteLine("The password '" + password + "' is valid!");
else
 Console.WriteLine("The password '" + password + "'is invalid!");
password = "WrongPassword";
if (x509.IsValidCertificatePassword(certificateFile, password))
 Console.WriteLine("The password '" + password + "' is valid!");
else
 Console.WriteLine("The password '" + password + "'is invalid!");
x509 = null;
Console.ReadLine();
Visual Basic Script Copy image Copy
Option Explicit
Dim x509, password, certificateFile, resStr
certificateFile = "MyCertificate.pfx"
password = "MyPassword"
resStr = "Check the password for certifcate '" + certificateFile + "':"
Set x509 = WScript.CreateObject("pdfforge.x509.x509")
if (pdf.IsValidCertificatePassword(certificateFile, password)) then
 resStr = resStr + vbCrLf + "The password '" + password + "' is valid!"
else
 resStr = resStr + vbCrLf + "The password '" + password + "'is invalid!"
end if
password = "WrongPassword"
if (pdf.IsValidCertificatePassword(certificateFile, password)) then
 resStr = resStr + vbCrLf + "The password '" + password + "' is valid!"
else
 resStr = resStr + vbCrLf + "The password '" + password + "'is invalid!"
end if
Set x509 = Nothing
MsgBox resStr

See Also

X509 Class
pdfforge.X509 Namespace