public void MakePdf_BookStyleIsBooklet_OutputsPdf()
{
var maker = new PdfMaker();
using (var input = TempFile.WithExtension("html"))
using (var output = new TempFile())
{
File.WriteAllText(input.Path, "<html><body>Hello</body></html>");
File.Delete(output.Path);
RunMakePdf(maker, input.Path, output.Path, "A5", false, false, false,
PublishModel.BookletLayoutMethod.SideFold, PublishModel.BookletPortions.BookletPages);
//we don't actually have a way of knowing it did a booklet
Assert.IsTrue(File.Exists(output.Path), "Failed to convert trivial HTML file to PDF (BookletPages)");
var bytes = File.ReadAllBytes(output.Path);
Assert.Less(1000, bytes.Length, "Generated PDF file is way too small! (BookletPages)");
Assert.IsTrue (bytes [0] == (byte)'%' && bytes [1] == (byte)'P' && bytes [2] == (byte)'D' && bytes [3] == (byte)'F',
"Generated PDF file started with the wrong 4-byte signature (BookletPages)");
}
}