Leadtools.Codecs Namespace > CodecsPdfOptions Class : InitialPath Property |
public string InitialPath {get; set;}
'Declaration Public Property InitialPath As String
'Usage Dim instance As CodecsPdfOptions Dim value As String instance.InitialPath = value value = instance.InitialPath
public string InitialPath {get; set;}
get_InitialPath();
set_InitialPath(value);
The value of this property is used only when Leadtools.PdfEngine.dll is used by the application. For more information, refer to Implementing PDF Plug in Features.
The PDF engine runtime DLL is Leadtools.PdfEngine.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.PdfEngine.dll between different applications. For example, many ASP.NET web applications, in this case, you can copy Leadtools.PdfEngine.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.PdfEngine.dll.
Leadtools.PdfEngine.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.PdfEngine.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.
You do not have access to this property when using the LEADTOOLS WCF services to load PDF files, instead you must add a section in the web configuration to instruct the LEADTOOLS WCF service on the location of the PDF engine's DLL. Refer to Programming with LEADTOOLS WCF Services for more information.
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");
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2