Skip to content
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

Could not load file or assembly System.Configuration.ConfigurationManager #59

Open
amura11 opened this issue Jan 12, 2022 · 0 comments
Open

Comments

@amura11
Copy link

amura11 commented Jan 12, 2022

Steps to Reproduce

  1. Install the WkHtmlToXSharp.Bundle Nuget package
  2. Try to run the following code:
WkHtmlToXLibrariesManager.Register(new Linux32NativeBundle());
WkHtmlToXLibrariesManager.Register(new Linux64NativeBundle());
WkHtmlToXLibrariesManager.Register(new Win32NativeBundle());
WkHtmlToXLibrariesManager.Register(new Win64NativeBundle());

using (MultiplexingConverter converter = new MultiplexingConverter())
{
	//WkHtmlToPdfConverter converter = new WkHtmlToPdfConverter();
	converter.GlobalSettings.Size.PageSize = PdfPageSize.Letter;

	byte[] data = converter.Convert(@"
	<!DOCTYPE html>
	<html>
	<body>

	<h1>My First Heading</h1>

	<p>My first paragraph.</p>

	</body>
	</html>
	");

	File.WriteAllBytes("test.pdf", data);
}

Obviously the fix is to install System.Configuration.ConfigurationManager but the dependencies of WkHtmlToXSharp should probably include this so it gets installed automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant