Hi,
I tried with the new HTML2PDF Module, but still getting the error. I have uploaded the sample project I created for you to check.
This is the error that we got from the main application thrown from here
if (isConverted)
{
m_logger.LogInformation("Html is being processed");
var pdfBytes = doc.Save(SDFDoc.SaveOptions.e_linearized);
return Task.FromResult(pdfBytes);
}
else
{
string errMessage = $"HTML to PDF conversion using Pdftron failed !, {converter.GetHTTPErrorCode()}, {converter.GetLog()}";
throw new Exception(errMessage);
}
System.Exception: HTML to PDF conversion using Pdftron failed !, 0, Missing output file /tmp/pdftron/Trn-24-1679047330-2b9738f6-caa1-4aac-8c66-6c2ff3f26343
at DIPS.DocumentPublish.Service.WebApi.Controllers.HtmlToPdfConversionController.GetHtmlToPdfConvertedByteArray(HtmlContentRequest htmlContentRequest) in D:\CreativeSoftware\DIPS\Projects\DocumentPublish-Service\Modules\DocumentPublish\Server\DIPS.DocumentPublish.Service.WebApi\Controllers\HtmlToPdfConversionController.cs:line 82
at lambda_method17(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
This is the error that we got from the sample project
Unhandled exception. System.Exception: Missing output file /tmp/pdftron/Trn-1-1679046986-3017cac5-4fb4-431f-8aa0-c4be20ce51bf
at PdfTronSample.Program.PdfTronConvert() in D:\CreativeSoftware\DIPS\Work\sicknote_alignment_issue\PdfTronSample\PdfTronSample\Program.cs:line 49
at PdfTronSample.Program.Main(String[] args) in D:\CreativeSoftware\DIPS\Work\sicknote_alignment_issue\PdfTronSample\PdfTronSample\Program.cs:line 16
PdfTronSample.zip (137.0 KB)
[I have removed the .so file from the `PdfTron/HTML2PDFLinux` ]