gmanny / Pechkin

.NET Wrapper for WkHtmlToPdf static DLL. Allows you to utilize full power of the library.
401 stars 128 forks source link

Solution for issues: #5, #12, #26, #43, #56 #42

Closed tuespetre closed 10 years ago

tuespetre commented 11 years ago

CHANGES:

.NET 2.0 compatible.

No instantiating Pechkins. Consumers will invoke Factory.Create(GlobalConfig config) to obtain an IPechkin interface. (Behind the scenes, the object consumers receive is a remoting proxy that remotes to a private AppDomain, discussed below.)

No more SynchronizedPechkin projects, synchronization is default now. Factory manages delegating calls to wkhtmltopdf to a synchronized thread. If desired, synchronization may be disabled by setting Factory.UseSynchronization = false.

Factory manages loading wkhtmltopdf in a private AppDomain and freeing wkhtmltopdf after unloading the AppDomain. When setting up the private AppDomain, it will attach (if applicable) to an IIS AppDomain's DomainUnload event to ensure that on redeploy, the wkhtmltopdf library is freed so the new IIS AppDomain will be able to load it again. Consumers may also set Factory.UseDynamicLoading = true to cause the Factory to unload its private AppDomain whenever it detects that all of its produced proxies have been disposed.

Querying for ExtendedQt and Version are now methods on Factory rather than PechkinStatic.

DISCLAIMER:

I have tested this code in both debug and production environments as well as the obvious unit tests in the project. I of course cannot give any guarantee but I am confident in the code I have written. I will actively work to correct any issues with it if or when they appear.

Also, I know nothing about NuGet so I haven't bothered to deal with any of that.

chadsowald commented 11 years ago

Hello and thanks for creating this wonderful library! I've got Pechkin 5.8.1 from NuGet, but can't find "Factory.Create(...". Are these changes not published in NuGet, yet?

Thank you!

tuespetre commented 11 years ago

They are not In NuGet. I didn't increment the version but I imagine this would be 6.0.0 or something. You can clone my fork to have the changes on your machine. Thanks

chadsowald commented 11 years ago

Thank you so much for the information. I intermittently see the "AccessViolationException", so I'll grab your latest source and give it a try.

On Fri, Sep 6, 2013 at 5:14 AM, Derek notifications@github.com wrote:

They are not In NuGet. I didn't increment the version but I imagine this would be 6.0.0 or something. You can clone my fork to have the changes on your machine. Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/gmanny/Pechkin/pull/42#issuecomment-23935745 .

tuespetre commented 11 years ago

Cool, let me know if you run into any issues from using the source. We are using it in a customer and employee-facing environment so I am all ears if there is a potential problem.

MetaRecursion commented 11 years ago

This looks promising. I'm finding Pechkin tends to freeze up AppDomains when running in IIS otherwise (I've moved to scheduled job invocations from a background process for most uses to try and address this, but if this addresses those issues awesome!).

tstade commented 11 years ago

@tuespetre You're the man

kmpm commented 11 years ago

Works for me. When can we expect it to be included in an official release?

efraimt commented 10 years ago

Hi,

Thanks @gmanny & @tuespetre for this work. I am new to Git (using windows GUI), maybe somone can explain me how to get the repo with @tuespetre changes.

Thanks, I really appriciate!

efraimt commented 10 years ago

Hi,

I have mannged to fetch it from: https://github.com/tuespetre/Pechkin/ but when I compile it VS2012 I get that the proccess exits with some error code and I can't run it. The only way I have managed to run it, is to go to Project -> Properties -> Debug and turn on the option "Enable native code debugging" on the TestApp??!!

tuespetre commented 10 years ago

What process are you running? Are you running the tests? What error are you getting? The more information the better.

CountMurphy commented 9 years ago

Did this ever get merged? I'm having all sorts of issues with Pechkin that I think were addressed in this fork.