Hi all,

I’m working on a PDF processing feature that requires the use of PdfiumViewer.dll along -with the platform-specific native library pdfium.dll.

In my local Creatio environment, I was able to make it work by manually placing the x64 version of pdfium.dll in the bin folder of the installation. 

However, I haven’t found a way to add this kind of native DLL through the Creatio UI to have it available in the Cloud environment of the client.

Could you advise on the proper way to include a native platform-specific DLL like pdfium.dll in a cloud-deployed Creatio instance?

Is there any way to include that in the package?

 

Thanks!

Like 1

Like

6 comments
Best reply

Andres,

Hello!

The error "File 'pdfium.dll' is not a valid .Net assembly" indicates that you're trying to load an incorrect type of library for the .NET platform.

pdfium.dll is a native (unmanaged) library, not a managed .NET assembly. Any .NET development environment, including Creatio, expects only .DLL files compiled for .NET. Platform-specific native DLLs like pdfium.dll cannot be imported directly as .NET assemblies.

As a workaround, you may consider trying the following approach: 

To do this:
1) Open the Files folder of the required package.
2) Create a new subfolder inside it—for example, name it Libs.
3) Place the required .dll file into the newly created folder.
4) Open the .csproj file of the package.
5) In the "3rd Party References" section, add a reference to the native library.
For example:
<ItemGroup Label="3rd Party References">
  <Reference Include="$(RelativePkgFolderPath)/<PackageName>/Files/Libs/<NativeLib>.dll">
    <SpecificVersion>False</SpecificVersion>
    <Private>False</Private>
  </Reference>
</ItemGroup>

After completing these steps, you can compile the package, proceed with the development and later install it on the cloud environment. This approach enables the use of native libraries within your package.

One way is to use the Import option in your package: 

Other options, add to Files\bin in an assembly package (and add reference to csproj file), see https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/development-tools/packages/assembly-package

Ryan

Also need to make sure that any dependencies and trust level will work with cloud hosted systems.

Hi Ryan,

I usually add referenced assemblies using the import option you mentioned there, but thats not working for platform-specific assembies or native assemblies (the ones that need to know if its x64 or x86).

trying to load that type of assembies is showing an error message: 

Will check with assembly package if that works. Thanks!

 

Andres,

Hello!

The error "File 'pdfium.dll' is not a valid .Net assembly" indicates that you're trying to load an incorrect type of library for the .NET platform.

pdfium.dll is a native (unmanaged) library, not a managed .NET assembly. Any .NET development environment, including Creatio, expects only .DLL files compiled for .NET. Platform-specific native DLLs like pdfium.dll cannot be imported directly as .NET assemblies.

As a workaround, you may consider trying the following approach: 

To do this:
1) Open the Files folder of the required package.
2) Create a new subfolder inside it—for example, name it Libs.
3) Place the required .dll file into the newly created folder.
4) Open the .csproj file of the package.
5) In the "3rd Party References" section, add a reference to the native library.
For example:
<ItemGroup Label="3rd Party References">
  <Reference Include="$(RelativePkgFolderPath)/<PackageName>/Files/Libs/<NativeLib>.dll">
    <SpecificVersion>False</SpecificVersion>
    <Private>False</Private>
  </Reference>
</ItemGroup>

After completing these steps, you can compile the package, proceed with the development and later install it on the cloud environment. This approach enables the use of native libraries within your package.

That worked. Thanks!

Orkhan,

When deploying such a solution to a cloud environment, does Creatio automatically bundle the DLL from the Files directory into the application deployment zip, or would this DLL need to be manually deployed onto the cloud environment application server(s)?

Show all comments

Hi,

I'm looking for an example code of using the aspose pdf libraries inside creatio's code.

Thanks,

Raz

Like 0

Like

10 comments

Are we talking about this Marketplace add-on? https://marketplace.creatio.com/app/asposepdf-connector-creatio

 

Did you read the Installation > Guides and manualsRead Manuals on the marketplace page?

1. Register at Aspose.PDF service (https://products.aspose.cloud/pdf/net), add an application (My Apps> Add an App), get access keys (Client Secret, Client ID).

2. Fill in the system settings "Aspose API Access Key" (= Client Secret) and "Aspose Security Identifier (App SID)" (= Client ID) with the data from item 1, respectively. Logout and login to the Creatio app again.

3. Go to System Designer > Lookups > the ‘Printables’ lookup, select the printable, and open the printable setup page, select the ‘Convert to PDF’ checkbox and save changes. Note that the ‘Convert to PDF’ checkbox is available only on the printable setup page in the new UI.

4. The add-on shows an error message if a printable conversion fails on the Aspose side (Aspose service is unavailable, service access is not paid, etc.). Detailed error description is available in the browser console.

What sort of code do you need?

Julius,

Hi Julius,

 

Yes, I'm taking about this addon.

The thing is that this connector only allows me to create a pdf document.

I want to merge 2 pdf documents to 1.

So I thought about using the aspose cloud API SDK for .Net.

 

I've read in the academy that I can include external libraries, so I've been thinking using aspose libraries to do so.

 

So my question is related to the usage of aspose API SDK Libraries in creatio.

 

Raz

Hi Raz,

 

You can find an example of the Aspose API library call from Creatio in the 'AsposeCloud' package. Additional information on Aspose API SDK is available here - https://products.aspose.cloud/pdf/net.

 

Hope it helps.

Svetlana Kobizka,

Hi Svetlana,

 

Thank you very much for the reply.

I managed to find the AsposeCloud :)

 

The thing is that when I download the Apospe dll the libraries are different.

 

I need to use the service to merge documents, but it's not working.

 

I attached the code and the library that I'm using.

 

I appreciate if you could assist me

 

https://www.dropbox.com/s/2lplgni2wsi5piy/Aspose.PDF.dll?dl=0

 

This is the code

PdfApi api = new PdfApi("11d276990520041f6cda09531e25aabb", "9568f0a0-cf77-4836-97d2-fd1389338080");

 

Hi Raz,

 

The responsible team checked that the Aspose connector uses Aspose.Words.Cloud.Sdk.dll, which does not include the method that you need. You can find the description of the .Pages.Add() method that you need here: https://docs.aspose.com/pdf/net/merge-pdf-documents. Please install the required library and follow the Aspose official guidelines.

 

We have asked the team about possible development assistance, unfortunately, they cannot assist.

Why don't you just make an extra printable template for this purpose?

A printable template which includes all the pages you need

Julius,

What do you mean by "extra printable"?

I need the two printables merged together in the same document.

Alexander Demidov,

Hi,

 

Thank you very much for the detailed answer.

All the documentation that I've found about merging files through the Aspose Words Cloud eventually needs a directory to put the file.

Or in the other way a filestream to create the file from and I can't do that, because my creatio  application is a cloud base.

Am I missing something?

Hi Raz,

 

I have forwarded your question to the relevant team. We will get back to you once we have more information.

Show all comments