Advertisement
Guest User

pechkin

a guest
Nov 20th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1.           var document = new HtmlToPdfDocument {
  2.                 GlobalSettings = {
  3.                     ProduceOutline = true,
  4.                     DocumentTitle = "Pretty Websites",
  5.                     PaperSize = PaperKind.A4, // Implicit conversion to PechkinPaperSize
  6.                     Margins = {All = 1.375, Unit = Unit.Centimeters},
  7.                 },
  8.                 Objects = {new ObjectSettings {
  9.                     HtmlText = html,
  10.                     ProduceForms = false,
  11.                     IncludeInOutline = false
  12.                 }}
  13.             };
  14.  
  15.             IPechkin pechkin = Factory.Create();
  16.  
  17.             byte[] pdfBuf = pechkin.Convert(document);
  18.             return pdfBuf;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement