LEADTOOLS Support
Document
Document SDK Questions
DocumentFactory.LoadFromFile(path, loadDocOptions) throws a method not found RasterDefaults.DeleteTe
#1
Posted
:
Wednesday, May 13, 2020 3:46:37 PM(UTC)
Groups: Registered
Posts: 52
Thanks: 14 times
When I try to Load document from file I am getting the following error:
Message=Method not found: 'Boolean Leadtools.RasterDefaults.DeleteTemporaryFile(System.String)'.
Source=Leadtools.Document
I am using the 64 bit leadtools V20 versions of Leadtools.dll and Leadtools.document.dll.
Along with numerous other Leadtools dlls.
I have confirmed in my code that RasterDefaults does not have a Method DeleteTemporaryFile available.
Any help would be appreciated.
#2
Posted
:
Thursday, May 14, 2020 10:26:04 AM(UTC)
Groups: Registered
Posts: 52
Thanks: 14 times
Actual code below:
// Get and delete previous TemporaryFile
string tempFile = RasterDefaults.GetTemporaryFileName();
RasterDefaults.DeleteTemporaryFile(tempFile); // This throws error 'RasterDefaults' does not contain a definition for 'DeleteTemporaryFile'
// Check if there is a reviewed version of the document already saved to cache except in File mode.
// In File mode always load the image from the filepath (i.e. path) specified, not from cache.
bool loadFromCache = cache.Contains(strSequenceNo, "");
if (loadFromCache && DocMode != Constants.DocumentMode.File)
{
LoadDocumentFromCache(strSequenceNo);
}
else
{
switch (DocMode)
{
case Constants.DocumentMode.File:
leadDocument = DocumentFactory.LoadFromFile(path, loadDocOptions); // This code throws the error noted above
break;
#3
Posted
:
Thursday, May 14, 2020 11:00:30 AM(UTC)
Groups: Registered, Manager, Tech Support, Administrators
Posts: 107
Was thanked: 9 time(s) in 9 post(s)
Hi Rob,
Thank you for reaching out to us and for providing the code snippet. I was able to test the DeleteTemporaryFile Method with the latest installation of our toolkit found on our website:
https://www.leadtools.co...=main&linkloc=navbarIf I'm understanding correctly, this method does not exist for you in your implementation. This method falls under the Leadtools Assembly, which means that you should have access to this method after including the Leadtools.dll into your project. If you right click on the Leadtools.dll you are referencing, and then select properties, you should be able to navigate and see the file version of the dll. The Leadtools.dll File version that I checked this with is 20.0.0.101.
If your DLL does not match this, please uninstall the older v20 SDK you have on your machine, and install our most recent installation using the first link I provided. You may be using an older version of our toolkit which may be causing you this conflict. Please check this and let us know your results. If you are getting the same issue with our most recent DLLs, please reach back out to us
Thanks,
Marcus Andra
Developer Support Engineer
LEAD Technologies, Inc.
1 user thanked Marcus Andra for this useful post.
#4
Posted
:
Thursday, May 14, 2020 12:54:49 PM(UTC)
Groups: Registered
Posts: 52
Thanks: 14 times
Thank you!
That solved the problem.
I had version 20.0.0.25.
How can I know that a newer version is available within the version 20 libraries.
#5
Posted
:
Thursday, May 14, 2020 3:22:03 PM(UTC)
Groups: Registered, Manager, Tech Support, Administrators
Posts: 107
Was thanked: 9 time(s) in 9 post(s)
1 user thanked Marcus Andra for this useful post.
LEADTOOLS Support
Document
Document SDK Questions
DocumentFactory.LoadFromFile(path, loadDocOptions) throws a method not found RasterDefaults.DeleteTe
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.