Gets and sets the path to the PDF engine runtime DLL.
public string InitialPath {get; set;}
Public Property InitialPath As String
public String getInitialPath()
public void setInitialPath(String value)
The path to the PDF runtime files, or an empty string or null, if the default location is to be used.
The value of this property is used only when Leadtools.PdfEngine.dll is used by the application. For more information, refer to Implementing PDF 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");
For an example, refer to CodecsPdfOptions.
Products |
Support |
Feedback: InitialPath Property - Leadtools.Codecs |
Introduction |
Help Version 19.0.2017.6.16
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.