←Select platform

InitialPath Property

Summary

Gets and sets the path to the PDF engine runtime DLL.

Syntax
C#
VB
C++
Java
public string InitialPath { get; set; } 
Public Property InitialPath As String 
public String getInitialPath() 
public void setInitialPath(String value) 
public: 
property String^ InitialPath { 
   String^ get(); 
   void set (    String^ ); 
} 

Property Value

The path to the PDF runtime files, or an empty string or null, if the default location is to be used.

Remarks

The value of this property is used only when Leadtools.Pdf.Utilities.dll is used by the application. For more information, refer to Implementing PDF Features.

The PDF engine runtime DLL is Leadtools.Pdf.Utilities.dll. This DLL is never referenced directly by the LEADTOOLS Raster PDF file filter (Leadtools.Pdf.dll) or PDF document readers (Leadtools.DocumentReaders.Pdf) instead it is loaded dynamically and out of process by the filter.

By default, the LEADTOOLS installer will copy this DLL next to the filter (in the Bin\DotNet\Win32, Bin\DotNet\x64, Bin\DotNet4\Win32 and Bin\DotNet4\x64 folders) and the filter will look for the engine DLL in the same folder it is located (default location).

In some cases, you can share the same copy of Leadtools.Pdf.Utilities.dll between different applications. For example, many ASP.NET web applications, in this case, you can copy Leadtools.Pdf.Utilities.dll to a fixed directory on your server and pass the name of this directory to InitialPath. From this point on, LEADTOOLS will use this value to locate and load Leadtools.Pdf.Utilities.dll.

Leadtools.Pdf.Utilities.dll is not a standard .NET assembly. In some project types, such as web applications or services, the compiler will not copy this file to your binary folder even though you have a reference to it in your project. This could cause PDF files to fail to load since IIS will create a temporary folder and copy all other LEADTOOLS referenced assemblies to service a request, but it will not copy Leadtools.Pdf.Utilities.dll. So, when using PDF in a web application, you must always use InitialPath to instruct LEADTOOLS on the location of the PDF engine DLL.

Note that setting this value in a RasterCodecs object will affect all the RasterCodecs objects that are currently created in the application (in all threads) or will be created in the future, for example:

RasterCodecs codecs1 = new RasterCodecs(); 
codecs1.Options.Pdf.InitialPath = @"C:\MyApp\Bin"; 
codecs1.Dispose(); 
RasterCodecs codecs2 = new RasterCodecs(); 
// This will work even though the RasterCodecs object that set this value has been disposed. 
System.Diagnostics.Debug.Assert(codecs2.Options.Pdf.InitialPath == @"C:\MyApp\Bin"); 

Example

For an example, refer to CodecsPdfOptions.

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly