gmanny / Pechkin

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

Text does not show up #81

Open ivopashov opened 9 years ago

ivopashov commented 9 years ago

Hi, Trying to do a simple export but text and svg don't show up when exporting with your library while styles obviously kick in. Same html file exported with wkhtmltopdf tools shows styles and text (no svg though). Is there a setting that can make text show up.

The results:

with pechkin

exportwithpechkin

with wkhtmltopdf

exportedwithwkhtmltopdf

Here is my code:

var oc = new ObjectConfig(); oc.SetPrintBackground(true) //we need this for sure .SetAllowLocalContent(false) .SetScreenMediaType(true); //we need this for sure

byte[] pdfBuf = new SimplePechkin(new GlobalConfig().SetMargins(10, 10, 10, 10) .SetPaperSize(PaperKind.A4).SetOutputFile("c:\Users\i.pashov\Desktop\exportedWithPechkin.pdf")).Convert(oc, line);