You are viewing limited content. For full access, please sign in.

Question

Question

Getting FileNotFoundException when running DocumentExporter SDK

asked on February 4, 2022 Show version history
 

I am trying to convert a document from a Laserfiche TIFF image to a PDF document.  I found an example here Export tiff to pdff - Laserfiche Answers.

Changing this code to use RA I came up with the code below, but when I run this, I get the following error on the docuExport.ExportPdf line...

"System.IO.FileNotFoundException: Could not load file or assembly 'itextsharp, Version=4.1.7.0, Culture=neutral, PublicKeyToken=3f98b3eaee6c16a6'. The system cannot find the file specified.
File name: 'itextsharp, Version=4.1.7.0, Culture=neutral, PublicKeyToken=3f98b3eaee6c16a6'"

I am using RA SDK 10.3.0.242

var repository = new 
RepositoryRegistration(_laserficheConnection.ServerName, _laserficheConnection.RepositoryName);
Session session = new Session();
session.LogIn(repository);

DocumentInfo info = new DocumentInfo(id, session);
var ms = new MemoryStream();

var docuExport = new DocumentExporter();
docuExport.ExportPdf(info, info.AllPages, PdfExportOptions.None, ms);

Any help determining what I am doing wrong would be greatly appreciated.

0 0

Replies

replied on February 4, 2022

Are you getting the error when you run the code from the editor, when you run the workflow, or both?

0 0
replied on February 4, 2022

It's a C# program. --  .NET Standard 2.1

0 0
replied on February 4, 2022

Do you have the LF client installed on the machine you're testing from? iTextSharp isn't something that would be installed on most machines.

0 0
replied on February 7, 2022

iTextSharp is included with the SDK, it should be at c:\Windows\assembly\GAC_MSIL\itextsharp\4.1.7.0__3f98b3eaee6c16a6.

 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.