use pdfnet.dll like a service

Hello

In our system we use pdf.dll and use this function

" pdftron.PDF.Convert.ToPdf() "

We use with it like a service

<<<<<<<<<

using (var myChannelFactory = new ChannelFactory(myBinding, myEndpoint))

<<<<<<<<<<<<<

I don’t write this code and I want to know why I need it why I can’t

Only add it reference to the project and use it like the example

" ConvertTest "

I wait to quick answer

Regards,

Tehila

Hello, are you experiencing any issues just using the ToPDF call in your system? Our SDK does not require you to use the ChannelFactory class for conversions.

Hello

Thanks for the reply

I have a license

And the person who wrote the code said he remembered that he needed several cores (2 cores)

Is that so?

Or enough I have a license

Regards,

Tehila

‫בתאריך יום ו׳, 11 בספט׳ 2020 ב-22:32 מאת ‪Shakthi Wijeratne via PDFTron PDFNet SDK‬‏ <‪pdfnet-sdk@googlegroups.com‬‏>:‬

I Put the .dll in the gac on the server

And use it like every .dll

It is ok?

I do:

My Class

Xrm.PDFCreator inst = Xrm.PDFCreator.Instance;

Common.RequestPdfCreateor req = new Common.RequestPdfCreateor();

Common.ResponsePdfCreateor res = inst.ConvertDocListToPdfFromFile(req, “”, “”, “pdf”);

PDFCreator Class

public sealed class PDFCreator

{

private PDFCreator()

{

// used only for local mechine

pdftron.PDFNet.Initialize(“Our Initialize”);

if (!pdftron.PDF.Convert.Printer.IsInstalled())

pdftron.PDF.Convert.Printer.Install();

}

public static PDFCreator Instance { get { return Nested.instance; } }

private class Nested

{

// Explicit static constructor to tell C# compiler

// not to mark type as beforefieldinit

static Nested()

{

}

internal static readonly PDFCreator instance = new PDFCreator();

}

public ResponsePdfCreateor ConvertDocListToPdfFromFile(RequestPdfCreateor request, string inPath, string outPath, string format = “pdf”)

{

var res = new ResponsePdfCreateor();

string file = @"\crm2016fulldev4\DocPreview\090bc034804241a5.docm";

List files = new List();

files.Add(file);

request = new RequestPdfCreateor { FullInputPathList = files };

var pdfdoc = new PDFDoc();

if (format == “pdf”)

{

foreach (var path in request.FullInputPathList)

{

try

{

pdftron.PDF.Convert.ToPdf(pdfdoc, path);

}

catch (PDFNetException e)

{

}

}

using (var ms = new MemoryStream())

{

pdfdoc.Save(ms, SDFDoc.SaveOptions.e_linearized);//.e_remove_unused);

pdfdoc.Close();

pdfdoc = null;

res.Data = ms.ToArray();

}

}

}

return res;

}

}

‫בתאריך יום א׳, 13 בספט׳ 2020 ב-9:55 מאת ‪Tehila Horvitz‬‏ <‪hstehilaeli@gmail.com‬‏>:‬

hello
I wait for an answer…

Tehila

‫בתאריך יום ב׳, 14 בספט׳ 2020 ב-15:30 מאת ‪Tehila Horvitz‬‏ <‪hstehilaeli@gmail.com‬‏>:‬

Hello,

Could you please email support@pdftron.com with your licensing information to verify on our end?

Thank you in advance.