Op 31/01/2011 19:41, Jorge Saá-Gerbier schreef:

I have the following definition (asp.net):

stringpathPDF = System.Web.HttpContext.Current.Server.MapPath("~/commande en ligne/devis_pdf/devis.pdf");

PdfReaderreader = new PdfReader(pathPDF);

string newFile = System.Web.HttpContext.Current.Server.MapPath("~/commande en ligne/devis_pdf/devis_" + (string)Session["Ref_String"] + ".pdf");

PdfStamper stamper = new PdfStamper(reader, new FileStream(newFile, FileMode.Create ));

Response.ContentType = "application/pdf";

Response.AddHeader("Content-disposition", "attachment; filename=" + pathPDF);

        fields.SetField("pdf_nombreconvives",   lbl_013.Text);

fields.SetField("pdf_dateheure", lbl_011.Text + " " + lbl_012.Text);

        fields.SetField("pdf_montosupple",      monto_supple.Text);

        fields.SetField("pdf_montopaellas",     monto_paella.Text);

        fields.SetField("pdf_montototal",       monto_total.Text);

fields.SetField("pdf_msg_monto_supple", lbl_009.Text); ßField /defined as//*text-rich*/in “Adobe LiveCycle Designer”

However, I receive in the field /pdf_msg_monto_supple/the following string “/Ce service aura une charge <b>supplémentaire</b> de : <b>32,13 € </b> étant donné que <b>votre adresse</b> est située à <b>53,54 Km</b> de la <b>notre</b>./”, which obviously is not a */text-rich/*.

I would like to know if */iTextSharp/* supports the field */text-rich/* and if so, which would be the right definition so that it shows the field correctly.

I assume that your form is hybrid: you are filling the AcroForm fields at the same time as the XFA fields. Rich text, the way it's defined in the XFA spec isn't supported in the AcroForm technology, therefore the HTML isn't parsed.

This will only work if you fill out a pure XFA form (without any AcroForm technology) using the method fillXfaFrom() (and it's not possible to flatten such a form).

If you want to flatten the form, you need to stick with AcroForm fields and use HTMLWorker to parse the HTML into iText objects. Add these objects using a ColumnText object as described in Chapter 8 of the book.

PS:
you have posted a mail to [email protected] but you weren't subscribed.
You are receiving this answer because I've added your mail address in Bcc:
I will do this only once! Further answers will be sent to the mailing-list only (you won't receive them if you don't subscribe). Further questions to the mailing-list will be rejected unless you subscribe. Further questions sent to the 1t3xt address will be ignored. Please understand that, as long as you don't subscribe, somebody has to MANUALLY approve your mail among a huge load of SPAM. You can help us avoid this boring administrative job by following the rules: http://itextpdf.com/support.php
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Reply via email to