how to export brushes(java, sql, c) to a pdf file while using syntaxHighlighter

FOEWSFRARGE

New Member
I want to export html data to pdf file. I also need to export some \[code\]java code\[/code\] to pdf file and that java code should be displayed with syntaxhighlighter classes but it is not. e.g. \[code\]this text is to be export to pdfPublic Static Void Main(){ Console.Writeline("hello");}\[/code\]I am using this line of code.\[code\] HtmlPipelineContext htmlContext = new HtmlPipelineContext(null); htmlContext.SetTagFactory(iTextSharp.tool.xml.html.Tags.GetHtmlTagProcessorFactory()); ICSSResolver cssResolver = XMLWorkerHelper.GetInstance().GetDefaultCssResolver(true); cssResolver.AddCssFile(Server.MapPath("~/App_Themes/codeviewer/styles/shCore.css"), true); cssResolver.AddCssFile(Server.MapPath("~/App_Themes/codeviewer/styles/shThemeDefault.css"), true); IPipeline pipeline = new CssResolverPipeline(cssResolver, new HtmlPipeline(htmlContext, new PdfWriterPipeline(document, pdfWriter))); XMLWorker worker = new XMLWorker(pipeline, true); XMLParser Parser = new XMLParser(true, worker); Parser.Parse(reader);\[/code\]but css classes are not being applied to the \[code\]java code\[/code\] which are being loaded from some js file. please help. thanks in advance.
 
Back
Top