Generating documents through the SDK - which dlls are needed?

Discussions related to custom development with Select.
Post Reply
brooklyndev
Posts: 3
Joined: Thu May 12, 2022 2:48 pm

Generating documents through the SDK - which dlls are needed?

Post by brooklyndev »

I'm currently developing a new feature for our internal application that would need to automate the process of generating documents found in Select. For now I'm doing this in a standalone console application for testing purposes, but this will be part of an internal web app. When trying to run it though, I'm getting a fairly cryptic error that I can't understand. Here's the code I'm messing with:

Code: Select all

        
        public static void Run()
        {
            var nc = new NetworkCredential(_selectUser, _selectPassword, "[SERVER]");
            using (SelectServer ss = new SelectServer(new Uri(_selectUrl), nc))
            {
                IOrderStore orderStore = ss.GetService<IOrderStore>();
                IOrderInfo orderInfo = orderStore.Orders.Where(t => t.Number == "MY_TEST_ORDER").FirstOrDefault();
                IDocumentManager dm = ss.GetService<IDocumentManager>();
                IRendererFactory rendererFactory = ss.GetService<IRendererFactory>();
                IRenderer renderer = rendererFactory.Create();

                IDocumentInfo docInfo = dm.Documents
                    .Where(t => t.Title == "Abstract Search Request")
                    .FirstOrDefault();


                IRendering rendering = renderer.Render(docInfo, orderInfo,  new RenderPrompts()); //this line blows up
            }
        }
The error that I'm getting is the following:
An unhandled exception of type 'System.Exception' occurred in TXTextControl.dll

Additional information: The module for displaying images could not be found.

(01-0804)
Just to get to that point, I had to add references to various dlls (that were not part of the Select SDK install), such as Softpro.Documents.Client, SoftPro.Documents.Rendering.TXTextControl and a handful of others.

I guess my question is: Which dlls are needed for document generation, and which ones am I missing? Thanks in advance!
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Generating documents through the SDK - which dlls are needed?

Post by BobRichards »

Sorry but I don't have the answer. I have to send this to R&D for resolution. I will furnish any updates they provide.
Bob Richards, Senior Software Developer, SoftPro
brooklyndev
Posts: 3
Joined: Thu May 12, 2022 2:48 pm

Re: Generating documents through the SDK - which dlls are needed?

Post by brooklyndev »

Any updates? Thank you!
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Generating documents through the SDK - which dlls are needed?

Post by BobRichards »

Sorry, not yet.
Bob Richards, Senior Software Developer, SoftPro
danvanf
Posts: 54
Joined: Fri Nov 07, 2008 10:45 am
Location: Dayton, Ohio
Contact:

Re: Generating documents through the SDK - which dlls are needed?

Post by danvanf »

Hey, brooklyndev,

I've done some document rendering using these:

Code: Select all

SoftPro.Documents.Client
SoftPro.Documents.Controls
SoftPro.Documents.Markup
SoftPro.Documents.Rendering.CrystalReports 
SoftPro.Documents.Rendering.Static
SoftPro.Documents.Rendering.TXTextControl
SoftPro.Imaging.Client
SoftPro.Select.Documents.Shared
There are separate DLLs for each rendering type. My recollection was that Rendering.Static is always required. The others not so much.
I mean, I did not include SoftPro.Documents.Rendering.Html as I'm not dealing with HTML.
SoftPro.Select.Client and other more basic DLLs as expected are required.

Good luck,
-Dan
I blog at http://DanVanFleet.com on SoftPro and other things
brooklyndev
Posts: 3
Joined: Thu May 12, 2022 2:48 pm

Re: Generating documents through the SDK - which dlls are needed?

Post by brooklyndev »

Hey Dan, thank you for taking the time to post a reply.

I was already referencing SoftPro.Documents.Rendering.Static, but I'm still getting that error. Thanks for trying though!
danvanf
Posts: 54
Joined: Fri Nov 07, 2008 10:45 am
Location: Dayton, Ohio
Contact:

Re: Generating documents through the SDK - which dlls are needed?

Post by danvanf »

No problem, happy to try to help a bit. I have fought that battle. I will hand it back to the professionals after this one. :lol: 8-) :lol:
Are you running from the Select Folder or have you tried putting all Select DLLs in your output folder?
Here's something that might help to narrow it down. A list of the SoftPro* DLLs from my "Documents" DLL Release folder.

Code: Select all

SoftPro.Accounting.Client.dll
SoftPro.ClientModel.dll
SoftPro.Documents.Client.dll
SoftPro.Documents.Controls.dll
SoftPro.Documents.Design.Client.dll
SoftPro.Documents.Markup.dll
SoftPro.Documents.Rendering.CrystalReports.dll
SoftPro.Documents.Rendering.Static.dll
SoftPro.Documents.Rendering.TXTextControl.dll
SoftPro.EntityModel.dll
SoftPro.Imaging.Client.dll
SoftPro.OrderTracking.Client.dll
SoftPro.ProceedsTracking.Client.dll
SoftPro.Register.Client.dll
SoftPro.Reporting.Client.dll
SoftPro.Select.Automation.Controls.dll
SoftPro.Select.Client.dll
SoftPro.Select.Compatibility.dll
SoftPro.Select.Configuration.Client.dll
SoftPro.Select.Controls.dll
SoftPro.Select.dll
SoftPro.Select.Documents.Shared.dll
SoftPro.Select.Reporting.Shared.dll
SoftPro.Select.Shared.dll
SoftPro.Select.Shell.dll
Best of luck,
-Dan
I blog at http://DanVanFleet.com on SoftPro and other things
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Generating documents through the SDK - which dlls are needed?

Post by BobRichards »

And I'm happy to take all the help I can get!
Bob Richards, Senior Software Developer, SoftPro
Post Reply