Could you please guide me to a link where there is an implementation example in
C# that could help me write with XMLWorker what I wrote here with HMTL worker?
private byte[] RanderHTMLtoPDF(string html)
{
byte[] doc = null;
iTextSharp.text.Document idocument = new
iTextSharp.text.Document(iTextSharp.text.PageSize.A4, 32, 32, 50, 50);
using (MemoryStream m = new MemoryStream())
{
iTextSharp.text.pdf.PdfWriter.GetInstance(idocument, m);
idocument.Open();
using (TextReader sReader = new StreamReader(new
MemoryStream(System.Text.Encoding.Default.GetBytes(html)), Encoding.Default))
{
iTextSharp.text.html.simpleparser.HTMLWorker worker = new
iTextSharp.text.html.simpleparser.HTMLWorker(idocument);
worker.StartDocument();
worker.Parse(sReader);
worker.EndDocument();
}
idocument.Close();
doc = m.ToArray();
}
return doc;
}
I can't make the transition to XMLWorker and I am a bit pressed by time
Thanks,Gabriel > Date: Mon, 5 Mar 2012 13:40:59 +0100
> From: i...@1t3xt.info
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] HR tag error - Object reference not set to an
> instance of an object.
>
> Op 5/03/2012 13:36, Stefanescu Gabi schreef:
> > Ok, thanks, I have found it, but only for java (the .jar files). is it
> > available for c# too?
> Yes, http://sourceforge.net/projects/itextsharp/files/xmlworker/
> We're working on the 1.1.2 release. It's much better than 1.1.1.
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php