Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tuespetre committed May 9, 2014
1 parent eb979e9 commit 00ab485
Showing 1 changed file with 33 additions and 18 deletions.
51 changes: 33 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,58 @@
Pechkin
=======

#TuesPechkin
.NET Wrapper for [WkHtmlToPdf](http://github.com/antialize/wkhtmltopdf) DLL, a library that uses the Webkit engine to convert HTML pages to PDF. This fork supports .NET 2.0 and up and *now runs in both 64 and 32-bit environments*!

NOTE:
Azure does not play nice with wkhtmltox.dll because it uses the GDI libraries.
TuesPechkin is available as a *NuGet package* (see: https://www.nuget.org/packages/TuesPechkin/) for your convenience.



## Things to know



### Reporting issues
If you experience any problems using TuesPechkin, please be sure to create the issues on the TuesPechkin repository and not the original Pechkin repository. I am so grateful to gmanny for his contribution but at this point I see my fork evolving further away from the original and I would like to continue to support it for us.



### Windows Azure usage
Azure does not play nice with wkhtmltox.dll because it uses the GDI libraries. Chances are it will not work for you. Any opened issues in regards to this will be closed.

See: http://social.msdn.microsoft.com/Forums/windowsazure/en-US/eb48e701-8c0b-4be3-b694-2e11cc6ff2e1/wkhtmltopdf-in-windows-azure?forum=windowsazurewebsitespreview

New in 0.9.3
------
The unmanaged DLLs that Pechkin depends upon have been packaged as *embedded resources* so you don't have to worry about messing around with pre- or post-build events to copy the files wherever they go in your solution. When the library is first accessed in the application lifetime, it will copy the embedded resources to a temporary directory (if they do not exist there already) and invoke WinApi to load them up.

The dependencies now consist of just wkhtmltox.dll (in both the 32-bit and 64-bit builds for Windows).

TuesPechkin 0.9.3 is also available as a *NuGet package* (see: https://www.nuget.org/packages/TuesPechkin/) for your convenience.
### wkhtmltox.dll
The unmanaged DLLs that TuesPechkin depends upon have been packaged as *embedded resources* so you don't have to worry about messing around with pre- or post-build events to copy the files wherever they go in your solution. When the library is first accessed in the application lifetime, it will copy the embedded resources to a temporary directory named after the version of TuesPechkin and the base directory from which your application is running (if they do not exist there already.)


If you experience any problems using TuesPechkin, please be sure to create the issues on TuesPechkin and not the original Pechkin branch. I am so grateful to gmanny for his contribution but at this point I see the codebase evolving further away from the original and I would like to continue to support it for you (and myself! ;))

### Release notes

FAQ
---
#### 0.9.3.2
- Made the library unpack wkhtmltopdf in a folder named specifically for the running application since only one process can use the dll.
- Compressed the wkhtmltopdf dependencies with gzip to reduce the size of the solution and the NuGet packages

### Q: Why does the produced PDF lack background images and colors? ###


## FAQ

#### Q: Why does the produced PDF lack background images and colors? ###

**A:** By default, all backgrounds will be omitted from the document (note: this is similar to how Google Chrome operates when printing to PDF.)

You can override this setting by calling `SetPrintBackground(true)` on the `ObjectConfig` supplied with the HTML document to the `Convert()` method of the converter.

### Q: Do I need to install wkhtmltopdf on the machine for the library to work? ###
#### Q: Do I need to install wkhtmltopdf on the machine for the library to work? ###

**A:** No. Version 0.12 of wkhtmltox.dll is embedded into the package and unpacked on library initialization.

### Q: Why is my website or application locking up when using TuesPechkin?
#### Q: Why is my website or application locking up when using TuesPechkin?

**A:** If you do not dispose of the IPechkin object properly, the converter will not be properly 'cleaned up' and so the next time you create and run a converter, the wkhtmltox.dll library will hang up. Be sure to dispose of your IPechkin objects every time!

Usage
-----


##Usage
Pechkin is both easy to use....

```csharp
Expand Down

0 comments on commit 00ab485

Please sign in to comment.