Hello, Could you please give me a little help for my problem? I am using the
FreeTextBox to create a html text that later I want to export to pdf. I am
using iText# and the HTMLWorker. This is my code: 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;
} the problem is that in PDF, the line spacing is too big and the client
wants it smaller. and I couldn't find a solution to do that. Thanks, Gabriel
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
iText-questions mailing list
[email protected]
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