codaxy / wkhtmltopdf

C# wrapper around excellent wkhtmltopdf console utility.
265 stars 92 forks source link

Moved from tempfile to stdout #14

Closed fean closed 8 years ago

fean commented 8 years ago

I re-wrote a part of the code to support stdout instead of writing to a tempfile and reading that file into memory. It didn't work, which explains the approach used in this library. I also added support for the async pattern, this way the end-user can easily choose between synchronous or asynchronous implementation. And added some comments so that it's easier for users to implement.

And I fixed issue #13 as well with this update.

Also a note, because of the support of stdout for data writing, all console output has been moved to stderr.

mstijak commented 8 years ago

Thanks. I'm a little busy right now, so I'll try to review it and merge before the end of the week.

fean commented 8 years ago

Take your time, I have to patch out a problem as well.

fean commented 8 years ago

Well, I think it's ready for review now. Take your time, no one is in a hurry around Christmas ;)

fean commented 8 years ago

I thought I could move everything into one commit by deleting and re-forking. Well, that didn't work out... The commit that would've fixed the legacy was partly undone because I work in several projects. Sorry for the mess.

mstijak commented 8 years ago

I reverted this as it hanged when running tests. Writing to a file does not use application's memory so I think that it's better to leave this as is.