Welcome Guest Search | Active Topics | Sign In | Register

Eo.Pdf.HtmlToPdf.ConvertHtml Options
Myrio Kluser
Posted: Monday, October 23, 2023 8:26:19 AM
Rank: Newbie
Groups: Member

Joined: 7/11/2014
Posts: 2
var pdfDoc = new PdfDocument();
var result = RenderRazorViewForPrint(viewName, viewModel);

var options = new HtmlToPdfOptions()
{
AllowLocalAccess = true,
GeneratePageImages = true,
MinLoadWaitTime = 2000,
PageSize = new SizeF(8.2677165354f, 11.6929133858f), // DIN A4
OutputArea = new RectangleF (0.787402f, 0.393701f, 7.4803145354f, 10.5118103858f), // 1cm Rand oben und rechts, 2cm links und unten
FooterHtmlFormat = "<div style='text-align:center; font-family: arial,helvetica,sans-serif; font-size:9pt;'>" + sPage + " {page_number} / {total_pages}</div>",
AfterRenderPage = new EO.Pdf.PdfPageEventHandler (On_AfterRenderPage)
};

var pdfResult = HtmlToPdf.ConvertHtml(result, pdfDoc, options);

Failed to resolve LoadLibrary.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Failed to resolve LoadLibrary.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[Exception: Failed to resolve LoadLibrary.]
EO.Internal.b.d() +2198
EO.Internal.b.a(bae[] A_0, String A_1, String A_2) +101
EO.Internal.jq.a(Boolean& A_0, bae[] A_1, String A_2, String A_3) +2975
EO.Internal.jq.a(bae[] A_0, String A_1, String A_2) +72
EO.Internal.o.c() +271
EO.Internal.o.f() +74
EO.Internal.jq.o() +520
EO.Internal.jq.a(Boolean& A_0, bae[] A_1, String A_2, String A_3) +150
EO.Internal.jq.a(bae[] A_0, String A_1, String A_2) +72
EO.Internal.av5.b() +4654
EO.Internal.av5.a(WindowsIdentity A_0) +358
EO.WebEngine.Engine.Start(WindowsIdentity user) +328
EO.Internal.sx.b() +691
EO.Internal.np.a(sx& A_0) +340
EO.Internal.aly.a(aw A_0, sx& A_1) +632
EO.Internal.pa..ctor(aw A_0, HtmlToPdfOptions A_1) +121
EO.Pdf.HtmlToPdfSession.a(HtmlToPdfOptions A_0) +433
EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0, Boolean A_1) +51
EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) +73
SEC.Web.Controllers.AnalysisController.CreatePDFResult(String viewName, Object viewModel, String pdfFileName) in D:\Projekte\K1025 - Crystal Partners\P8200 - ServiceCenterExcellence\DigitalExcellence\ServiceExcellenceCenter\Controllers\AnalysisController.cs:835
SEC.Web.Controllers.AnalysisController.Export(Int32 surveyId, Nullable`1 categoryId, Nullable`1 analysisId, Nullable`1 userId) in D:\Projekte\K1025 - Crystal Partners\P8200 - ServiceCenterExcellence\DigitalExcellence\ServiceExcellenceCenter\Controllers\AnalysisController.cs:731
SEC.Web.Controllers.AnalysisController.Export2(Int32 surveyId, Nullable`1 categoryId, Nullable`1 analysisId, Nullable`1 userId) in D:\Projekte\K1025 - Crystal Partners\P8200 - ServiceCenterExcellence\DigitalExcellence\ServiceExcellenceCenter\Controllers\AnalysisController.cs:745
lambda_method(Closure , ControllerBase , Object[] ) +343
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +77
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +396
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +396
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +38
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +32
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +46
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +431
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4667.0
eo_support
Posted: Monday, October 23, 2023 8:37:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

This occurs when you use an older version of our EO.Pdf product on a newer unsupported version of Windows. Please update to the latest build and the issue should be resolved.

Thanks!
Myrio Kluser
Posted: Tuesday, October 24, 2023 1:18:08 AM
Rank: Newbie
Groups: Member

Joined: 7/11/2014
Posts: 2
Solved. Thank you
eo_support
Posted: Thursday, October 26, 2023 10:06:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
You are very welcome. Please feel free to let us know if there is anything else.


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.