-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't generate on a second request #174
Comments
how about this |
public void ConfigureServices(IServiceCollection services) |
I'm having the same issue, has anyone solved this problem? I already add this code builder.Services.AddSingleton(typeof(IConverter), new SynchronizedConverter(new PdfTools())); and also I already add load library manually string libraryPath = "";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
// Load .dll for Windows
libraryPath = "libwkhtmltox.dll";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
// Load .so for Linux
libraryPath = "libwkhtmltox.so";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// Load .dylib for macOS
libraryPath = "libwkhtmltox.sylib";
}
var loadContext = new CustomAssemblyLoadContext();
var fullpath = Path.Combine(Directory.GetCurrentDirectory(), libraryPath);
IntPtr libraryHandle = loadContext.LoadUnmanagedLibrary(Path.Combine(Directory.GetCurrentDirectory(), libraryPath));
// Pastikan library berhasil dimuat
if (libraryHandle == IntPtr.Zero)
{
Console.WriteLine("Failed to load the library.");
return;
}
Console.WriteLine("Library loaded successfully.");
var builder = WebApplication.CreateBuilder(args); but the problem still same, the second request response properly, I suspect So is there anyone already solve this problem? btw I user docker linux here |
same on maui windows app |
Hello, I'm using the lib in a project, but I can generate the normal pdf in the first request, but if I make a second request, it doesn't call, it just waits, so I can get another request, I have to rebuild the api, does anyone know how to solve this?
The text was updated successfully, but these errors were encountered: