private static string GeneratePage(IEpubMetadata metadata, IHtmlResourceManager resourceManager, ICssStyleManager styleManager) { var document = new DocumentMarkupNode( "Content", ListOf( new HeaderMarkupNode( metadata.Title, 1, ListOf( new ListMarkupNode( ListStyle.Numbered, from page in metadata.Pages select new HyperlinkMarkupNode( page.Uri.GetPackagePath(), ListOf(new TextRunMarkupNode(page.Title)) ) ) ) ) ) ); var compiler = new HtmlCompiler(resourceManager, styleManager); var html = compiler.Compile(document); return html.ToString(); }
public EpubPublisherProcessor(WikiContent content, ICssStyleManager styleManager, string targetPath) { this.content = content; this.targetPath = targetPath; resourceManager = new EpubResourceManager(this); htmlCompiler = new HtmlCompiler(resourceManager, styleManager); packager = new EpubPackager(content.Title, resourceManager, styleManager); }