By Date: <-- -->
By Thread: <-- -->

iText-questions digest, Vol 1 #3966 - 6 msgs



Hello Bruno,

 

Topic: Creating a PDF file using String object with HTML content

 

I am getting an error (see below) when I parse my HTML string using HTMLWorker

 

ERROR

--------------

java.lang.IllegalArgumentException: The number of columns in PdfPTable constructor must be greater than zero.

          at com.lowagie.text.pdf.PdfPTable.<init>(Unknown Source)

          at com.lowagie.text.html.simpleparser.IncTable.buildTable(Unknown Source)

          at com.lowagie.text.html.simpleparser.HTMLWorker.endElement(Unknown Source)

          at com.lowagie.text.pdf.SimpleXMLParser.parse(Unknown Source)

          at com.lowagie.text.html.simpleparser.HTMLWorker.parse(Unknown Source)

          at PDF.main(PDF.java:25)

--------------

CODE

--------------

Transform trans = new Transform();

String htmlOP = trans.transform("D:\\work\\SEACR.xsl","D:\\work\\SEACR.xml");

System.out.println(htmlOP);

StringReader strReader = new StringReader(htmlOP);

PdfWriter.getInstance(document, new FileOutputStream("test.pdf"));

document.open();

document.resetPageCount();

//document.add(new Paragraph("Hi, this is your PDF file!"));

HTMLWorker html = new HTMLWorker(document);

html.parse(strReader);

--------------

 

My AIM is to create a PDF file with the html string “htmlOP”. Thank you very much.

 

Regards

Mazhar Shaikh

 

-----Original Message-----
From: itext-questions-admin (at) lists.sourceforge.net [mailto:itext-questions-admin (at) lists.sourceforge.net] On Behalf Of itext-questions-request (at) lists.sourceforge.net
Sent: Wednesday, May 31, 2006 1:15 PM
To: itext-questions (at) lists.sourceforge.net
Subject: iText-questions digest, Vol 1 #3966 - 6 msgs

 

Send iText-questions mailing list submissions to

          itext-questions (at) lists.sourceforge.net

 

To subscribe or unsubscribe via the World Wide Web, visit

          https://lists.sourceforge.net/lists/listinfo/itext-questions

or, via email, send a message with subject or body 'help' to

          itext-questions-request (at) lists.sourceforge.net

 

You can reach the person managing the list at

          itext-questions-admin (at) lists.sourceforge.net

 

When replying, please edit your Subject line so it is more specific

than "Re: Contents of iText-questions digest..."

 

 

Today's Topics:

 

   1. RE: Problem with HeaderFooter (Srinivas P)

   2. Creating a PDF file using String object with HTML content (Mazhar Shaikh)

   3. Image in Signature (Anja Kaiser)

   4. Re: Image in Signature [Complete] (Khurram Saleem)

   5. Re: Creating a PDF file using String object with

       HTML content (bruno)

 

--__--__--

 

Message: 1

From: "Srinivas P" <peddineni.s (at) four-soft.com>

To: <itext-questions (at) lists.sourceforge.net>

Subject: RE: [iText-questions] Problem with HeaderFooter

Date: Wed, 31 May 2006 09:19:36 +0530

Reply-To: itext-questions (at) lists.sourceforge.net

 

This is a multi-part message in MIME format.

 

------=_NextPart_000_000C_01C68493.56086ED0

Content-Type: text/plain;

          charset="US-ASCII"

Content-Transfer-Encoding: quoted-printable

 

Thanks for replying Bruno,

 

=20

 

Srinivas P wrote:

 

=20

 

> =20

 

>=20

 

> Hi,

 

>=20

 

> =20

 

>=20

 

> I am using HeaderFooter class to display header and footer in my page, =

 

 

> but I got one problem i.e I need to display both image and some  text=20

 

> in Header area ,but it is allowing me to add either image or text not=20

 

> both how to add both ,

 

>=20

 

1) Using the HeaderFooter class is not very wise, use page events =

instead

 

=20

 

Initially I used Page events only but while using text is overlapping =

with

header for certain margins(because in my case the margins are not hard =

coded

by me, these are specified by end user)that's why I moved to =

HeaderFooter

class with this I felt some what comfortable with margins,

 

=20

 

=20

 

2) Can't you compose a Phrase that contains an Image chunk AND some =

text?

 

=20

 

I tried but unable to compose a Phrase with both Image and text, will it =

be

possible?

 

=20

 

br,

 

Bruno

 

=20

 

=20

 

-------------------------------------------------------

 

All the advantages of Linux Managed Hosting--Without the Cost and Risk!

 

Fully trained technicians. The highest number of Red Hat certifications =

in

 

the hosting industry. Fanatical Support. Click to learn more

 

http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D107521&bid=3D248729&dat=3D=

121642

 

_______________________________________________

 

iText-questions mailing list

 

iText-questions (at) lists.sourceforge.net

 

https://lists.sourceforge.net/lists/listinfo/itext-questions

 

 

"The information contained in this communication is intended solely for ="">

the use of the individual or entity to whom it is addressed and others =

authorized to receive it. It may contain confidential or legally =

privileged information and may not be disclosed to anyone else. If you =

are not the intended recipient you are hereby notified that any =

disclosure, copying, distribution or taking any action in reliance on =

the contents of this information is strictly prohibited and may be =

unlawful. If you have received this communication in error, please =

notify us immediately by responding to the sender of this email and then =

delete it from your system. Four Soft is neither liable for the proper =

and complete transmission of the information contained in this =

communication nor for any delay in its receipt".

 

------=_NextPart_000_000C_01C68493.56086ED0

Content-Type: text/html;

          charset="US-ASCII"

Content-Transfer-Encoding: quoted-printable

 

<HTML >

<HEAD>

<META http-equiv=3D"Content-Type" content=3D"text/html; =

charset=3Dus-ascii">

 

 

 

<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">

<style>

<!--

 /* Style Definitions */

 p.MsoNormal, li.MsoNormal, div.MsoNormal

          {margin:0in;

          margin-bottom:.0001pt;

          font-size:12.0pt;

          font-family:"Times New Roman";}

a:link, span.MsoHyperlink

          {color:blue;

          text-decoration:underline;}

a:visited, span.MsoHyperlinkFollowed

          {color:purple;

          text-decoration:underline;}

p.MsoPlainText, li.MsoPlainText, div.MsoPlainText

          {margin:0in;

          margin-bottom:.0001pt;

          font-size:10.0pt;

          font-family:"Courier New";}

(at) page Section1

          {size:8.5in 11.0in;

          margin:1.0in 77.95pt 1.0in 77.95pt;}

div.Section1

          {page:Section1;}

-->

</style>

 

</HEAD>

<BODY lang=3DEN-US link=3Dblue vlink=3Dpurple>

<DIV>

 

<div class=3DSection1>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>Thanks for replying Bruno,<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>Srinivas P wrote:<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt;&nbsp; <o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt;<o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt; Hi,<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt;<o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt;&nbsp; <o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt;<o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt; I am using HeaderFooter class to display header and footer =

in my

page, <o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt; but I got one problem i.e I need to display both image and

some&nbsp; text <o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt; in Header area ,but it is allowing me to add either image =

or text

not <o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt; both how to add both ,<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>&gt;<o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 color=3Dred face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:red'>1) Using the HeaderFooter class is =

not very

wise, use page events instead<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 color=3Dblack face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p=

> 

 

<p class=3DMsoPlainText><font size=3D2 color=3Dblue face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:blue'>Initially I used Page events >

but while

using text is overlapping with header for certain margins(because in my =

case the

margins are not hard coded by me, these are specified by end =

user)that&#8217;s why

I moved to HeaderFooter class with this I felt some what comfortable =

with

margins,<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 color=3Dblack face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p=

> 

 

<p class=3DMsoPlainText><font size=3D2 color=3Dblack face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p=

> 

 

<p class=3DMsoPlainText><font size=3D2 color=3Dred face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:red'>2) Can&#8217;t you compose a Phrase =

that

contains an Image chunk AND some text?<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 color=3Dblack face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p=

> 

 

<p class=3DMsoPlainText><font size=3D2 color=3Dblue face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:blue'>I tried but unable to compose a =

Phrase with

both Image and text, will it be possible?<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 color=3Dblack face=3D"Courier =

New"><span

style=3D'font-size:10.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p=

> 

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>br,<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>Bruno<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>-------------------------------------------------------<o:p></o:p=

></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>All the advantages of Linux Managed Hosting--Without the Cost =

and Risk!<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>Fully trained technicians. The highest number of Red Hat =

certifications

in<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>the hosting industry. Fanatical Support. Click to learn =

more<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>http://sel.as-us.falkag.net/sel?cmd=3Dlnk&amp;kid=3D107521&amp;bi=

d=3D248729&amp;dat=3D121642<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>_______________________________________________<o:p></o:p></span>=

</font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>iText-questions mailing list<o:p></o:p></span></font></p>

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>iText-questions (at) lists.sourceforge.net<o:p></o:p></span></font></p=

> 

 

<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =

style=3D'font-size:

10.0pt'>https://lists.sourceforge.net/lists/listinfo/itext-questions<o:p>=

</o:p></span></font></p>

 

</div>

 

</DIV>

<DIV STYLE=3D"FONT-SIZE: 9pt; FONT-FAMILY: Courier New" =

ALIGN=3D"justify"><BR><BR><FONT FACE=3D"Times New Roman" =

SIZE=3D"3">&#8220;The information contained in this communication is =

intended solely for the use of the individual or entity to whom it is =

addressed and others authorized to receive it. It may contain =

confidential or legally privileged information and may not be disclosed =

to anyone else. If you are not the intended recipient you are hereby =

notified that any disclosure, copying, distribution or taking any action ="">

in reliance on the contents of this information is strictly prohibited =

and may be unlawful. If you have received this communication in error, =

please notify us immediately by responding to the sender of this email =

and then delete it from your system. Four Soft is neither liable for the =

proper and complete transmission of the information contained in this =

communication nor for any delay in its receipt&#8221;.</FONT>

</DIV></BODY></HTML>

 

------=_NextPart_000_000C_01C68493.56086ED0--

 

 

--__--__--

 

Message: 2

Date: Wed, 31 May 2006 11:05:59 +0530

From: "Mazhar Shaikh" <m.shaikh (at) zensar.com>

To: <itext-questions (at) lists.sourceforge.net>

Subject: [iText-questions] Creating a PDF file using String object with HTML content

Reply-To: itext-questions (at) lists.sourceforge.net

 

This is a multi-part message in MIME format.

 

------_=_NextPart_001_01C68474.20692D7C

Content-Type: text/plain;

          charset="us-ascii"

Content-Transfer-Encoding: quoted-printable

 

Dear Users,

 

=20

 

I have transformed my XML and XSL to a StringWriter object like this

 

=20

 

// Transformation code

 

StringWriter writer =3D new StringWriter();

 

transformer.transform(new StreamSource(xml), new StreamResult(writer));

 

=20

 

String str_with_html_tags =3D writer.toString();

 

=20

 

The result of the transformation i.e "str_with_html_tags" is then passed

to the PDF generation code.

 

=20

 

// PDF Generation code

 

PdfWriter.getInstance(document, new FileOutputStream("filename.pdf"));

 

document.open();

 

document.add(str_with_html_tags);

 

=20

 

=20

 

But as a result when I open the PDF document I could see text with all

HTML tags embedded in it.

 

=20

 

My Questions.

 

=20

 

1.       Why the PDFWriter doesn't understand the HTML tags and format

the text accordingly in the PDF document?

2.       Is there any other way to generate a PDF document from a String

object having HTML tags embedded in it?

 

=20

 

Note: I am using HTML in my XSL document.

 

=20

 

Please ask me if you have any questions.=20

 

=20

 

Thanks and regards,

 

=20

 

Mazhar Shaikh

 

Handy: +91 9860687474

 

 

This email may contain confidential or privileged information for the=20

intended recipient(s) and the views expressed in the same are not=20

necessarily the views of Zensar Technologies Ltd. If you are not the =

intended=20

recipient or have received this e-mail by error, its use is strictly=20

prohibited, please delete the e-mail and notify the sender. Zensar=20

Technologies Ltd. does not accept any liability for virus infected =

mails.

 

 

------_=_NextPart_001_01C68474.20692D7C

Content-Type: text/html;

          charset="us-ascii"

Content-Transfer-Encoding: quoted-printable

 

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =

xmlns=3D"http://www.w3.org/TR/REC-html40">

 

<head>

<meta http-equiv=3DContent-Type content=3D"text/html; =

charset=3Dus-ascii">

<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">

<style>

<!--

 /* Font Definitions */

  (at) font-face

          {font-family:Verdana;

          panose-1:2 11 6 4 3 5 4 4 2 4;}

 /* Style Definitions */

 p.MsoNormal, li.MsoNormal, div.MsoNormal

          {margin:0in;

          margin-bottom:.0001pt;

          font-size:12.0pt;

          font-family:"Times New Roman";}

a:link, span.MsoHyperlink

          {color:blue;

          text-decoration:underline;}

a:visited, span.MsoHyperlinkFollowed

          {color:purple;

          text-decoration:underline;}

span.EmailStyle17

          {mso-style-type:personal-compose;

          font-family:Verdana;

          color:windowtext;

          font-weight:normal;

          font-style:normal;

          text-decoration:none none;}

(at) page Section1

          {size:8.5in 11.0in;

          margin:1.0in 1.25in 1.0in 1.25in;}

div.Section1

          {page:Section1;}

 /* List Definitions */

  (at) list l0

          {mso-list-id:397367117;

          mso-list-type:hybrid;

          mso-list-template-ids:953601382 67698703 67698713 67698715 67698703 =

67698713 67698715 67698703 67698713 67698715;}

(at) list l0:level1

          {mso-level-tab-stop:.5in;

          mso-level-number-position:left;

          text-indent:-.25in;}

ol

          {margin-bottom:0in;}

ul

          {margin-bottom:0in;}

-->

</style>

 

</head>

 

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

 

<div class=3DSection1>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>Dear Users,<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>I have transformed my XML and XSL to a StringWriter =

object

like this<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><b><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana;font-weight:bold'>// Transformation =

code<o:p></o:p></span></font></b></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>StringWriter writer =3D new =

StringWriter();<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>transformer.transform(new StreamSource(xml), new

StreamResult(<b><span =

style=3D'font-weight:bold'>writer</span></b>));<o:p></o:p></span></font><=

/p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>String <b><span =

style=3D'font-weight:bold'>str_with_html_tags</span></b>

=3D writer.toString();<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>The result of the transformation i.e =

&#8220;<b><span

style=3D'font-weight:bold'>str_with_html_tags&#8221;</span></b> is then =

passed to

the PDF generation code.<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><b><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana;font-weight:bold'>// PDF Generation =

code<o:p></o:p></span></font></b></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>PdfWriter.getInstance(document, new

FileOutputStream(&quot;filename.pdf&quot;));<o:p></o:p></span></font></p>=

 

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>document.open();<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>document.add(<b><span =

style=3D'font-weight:bold'>str_with_html_tags</span></b>);<o:p></o:p></sp=

an></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>But as a result when I open the PDF document I =

could see

text with all HTML tags embedded in it.<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>My Questions.<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<ol style=3D'margin-top:0in' start=3D1 type=3D1>

 <li class=3DMsoNormal style=3D'mso-list:l0 level1 lfo1'><font size=3D2 =

face=3DVerdana><span

     style=3D'font-size:10.0pt;font-family:Verdana'>Why the PDFWriter =

doesn&#8217;t

     understand the HTML tags and format the text accordingly in the PDF

     document?<o:p></o:p></span></font></li>

 <li class=3DMsoNormal style=3D'mso-list:l0 level1 lfo1'><font size=3D2 =

face=3DVerdana><span

     style=3D'font-size:10.0pt;font-family:Verdana'>Is there any other =

way to

     generate a PDF document from a String object having HTML tags =

embedded in

     it?<o:p></o:p></span></font></li>

</ol>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><b><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana;font-weight:bold'>Note</span></font></b><font =

size=3D2

face=3DVerdana><span style=3D'font-size:10.0pt;font-family:Verdana'>: I =

am using

HTML in my XSL document.<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>Please ask me if you have any questions. =

<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>Thanks and regards,<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'><o:p>&nbsp;</o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>Mazhar Shaikh<o:p></o:p></span></font></p>

 

<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =

style=3D'font-size:10.0pt;

font-family:Verdana'>Handy: +91 9860687474<o:p></o:p></span></font></p>

 

</div>

 

</body>

 

<!--[object_id=3D#zensar.com#]--><P align=3Dleft><FONT face=3DTahoma =

size=3D2>This email may contain confidential or privileged information =

for the intended recipient(s) and the views expressed in the same are =

not necessarily the views of Zensar Technologies Ltd. If you are not the =

intended recipient or have received this&nbsp;&nbsp;&nbsp;&nbsp; e-mail =

by error, its use is strictly prohibited, please delete the e-mail and =

notify the sender. Zensar Technologies Ltd. does not accept any =

liability for virus infected mails.</FONT></P></html>

 

------_=_NextPart_001_01C68474.20692D7C--

 

 

--__--__--

 

Message: 3

Date: Wed, 31 May 2006 09:03:02 +0200

from: Anja Kaiser <anja.kaiser (at) gmx.net>

to: itext-questions (at) lists.sourceforge.net

Subject: [iText-questions] Image in Signature

Reply-To: itext-questions (at) lists.sourceforge.net

 

Hi,

 

is it possible to include an image in the visible signature of a PDF document with iText. And if yes, how?

 

Thanks for your help & best regards

 

Anja

 

 

--__--__--

 

Message: 4

To: itext-questions (at) lists.sourceforge.net

From:  Khurram Saleem <khurram.saleem (at) ascertia.com>

Date: Wed, 31 May 2006 07:21:15 +0000 (UTC)

Subject: [iText-questions] Re: Image in Signature [Complete]

Reply-To: itext-questions (at) lists.sourceforge.net

 

Anja Kaiser <anja.kaiser <at> gmx.net> writes:

 

>

> Hi,

>

> is it possible to include an image in the visible signature of a PDF document

with iText. And if yes, how?

>

> Thanks for your help & best regards

>

> Anja

>

> -------------------------------------------------------

> All the advantages of Linux Managed Hosting--Without the Cost and Risk!

> Fully trained technicians. The highest number of Red Hat certifications in

> the hosting industry. Fanatical Support. Click to learn more

> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

>

 

 

Hi Anja

 

Yeah it is possible here is sample code:

 

 

    import com.lowagie.text.*;

    import com.lowagie.tools.*;

    import com.lowagie.text.pdf.*;

   

    public PdfStamper m_objPDFStamp = null;

    public PdfSignatureAppearance m_objSigApp = null;

 

 

    //Getting Image Instance

    Image obj_pic = Image.getInstance("1.gif");

 

    //Creating Signature

    m_objPDFStamp = PdfStamper.createSignature(m_objPDFIn, m_objfos, '\0',

null, true);

 

    //Getting Signature Appearance

    m_objSigApp = m_objPDFStamp.getSignatureAppearance();

 

&nb