Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, April 17, 2018 3:48:55 PM(UTC)
jnethercutt

Groups: Registered
Posts: 26

Thanks: 3 times

When attempting to use the ExtractPages command below I get an error -

// Get the number of pages in the source file
PDFFile file = new PDFFile(imageFile);
int pageCount = file.GetPageCount();
// Extract each page to an individual PDF file
for (int i = 1; i <= pageCount; i++)
{
var pageFileName = Path.Combine(outputDir,
"Emailed_" + DateTime.Now.ToString("yyyyMMddHHmmss") + "_" + onlyFileName +
"_Page_" + i + ".pdf");
file.ExtractPages(i, i, pageFileName);
}

"The Leadtools.Pdf.Utilities.dll library is missing".

When I try to add the dll as a reference to my project from -

C:\LEADTOOLS 20\Redist\DotNet4\x64\Leadtools.Pdf.Utilities.dll, I get an error -

"A refererence to ..... could not be added. Please make sure the file is accessible, and that it is a valid assembly or COM component."

Is this some sort of license/unlock issue? My understanding is that I should be able to split a multi-page PDF.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, April 17, 2018 3:54:39 PM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

Hello Judy,

There are a few DLLs that can't be added as a reference, but instead should just be copied directly to the output folder for your application. Leadtools.Pdf.Engine.dll and Leadtools.Pdf.Utilities.dll are examples. You should be able to simply copy the file into your output directory and run again. If you are still having issues after copying over the DLL, let me know.

Thanks,
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Tuesday, April 17, 2018 3:58:57 PM(UTC)
jnethercutt

Groups: Registered
Posts: 26

Thanks: 3 times

OH - yes, that's right I made this one entirely too complicated.....Read too many Google posts that got me thinking it was a license issue.
Thanks for the quick response.
 
#4 Posted : Tuesday, May 22, 2018 4:30:24 PM(UTC)

VictorG  
VictorG

Groups: Registered
Posts: 1


Originally Posted by: Anthony Northrup Go to Quoted Post
Hello Judy,

There are a few DLLs that can't be added as a reference, but instead should just be copied directly to the output folder for your application. Leadtools.Pdf.Engine.dll and Leadtools.Pdf.Utilities.dll are examples. You should be able to simply copy the file into your output directory and run again. If you are still having issues after copying over the DLL, let me know.

Thanks,


This doesn't work with web api scenario. My web application hosted by IIS says that "The Leadtools.Pdf.Utilities.dll library is missing." even tho its in the bin folder. What to do in such cases?
 
#5 Posted : Tuesday, May 22, 2018 4:32:12 PM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 218

Was thanked: 12 time(s) in 12 post(s)

Hello,

In a Web api scenario, you need to tell the Leadtools.Pdf.dll where the Leadtools.Pdf.Utilities.dll is:

https://www.leadtools.co...options-initialpath.html

Quote:
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.

Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.093 seconds.