Re: How to avoid unwanted white space getting add in PDF generated using pdfHtml?

Aside from the fact that this "HTML" is horribly
broken, so that it needs to be corrected using
something like HTML Tidy, what does this have to
do with HTML Tidy?  Tidy does no PDF conversion.

On Tue, 5 Feb 2019 at 02:17, Caravan StartUp <caravaan@outlook.com> wrote:

> I'm using pdfHtml of iText to generate PDF from HTML, but I can see lots
> of white spaces has got added in between two elements in generated PDF.
>
>
>
> Please see below HTML and PDF
>
>
>
> Highlighted part in below image shows unwanted white spaces in between two
> lines.
>
>
>
> space between two below lines .
>
>
>
> Below is the source HTML content.
>
>
>
> <html>
>
> <head></head>
>
> <body>
>
>   <meta name="generator" content="HTML Tidy for Java (vers. 2009-12-01),
> see jtidy.sourceforge.net">
>
>   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>
>   <style type="text/css">
>
> * { font-family: 'Arial Unicode MS'; }
>
>     </style>
>
>   <title></title>
>
>   <img border="0" style="margin-left: 370px;" width="340.6"
> src="file:Docs_a0s29000000qTxeAAE/01529000000ITQ8.PNG">
>
>   <div style="font-size: 25px; font-family: Roboto, arial, sans-serif;">
>
> حفظ امنیت در خانه
>
>   </div>
>
>   <div style="font-size: 25px; font-family: Roboto, arial, sans-serif;">
>
>    انتخاب بهترین برندها از برترین گاوصندوق ها!
>
>   </div>
>
>   <ul>
>
>    <li>BioConnect Version 1 - Capture</li>
>
>   </ul>
>
>   <p> <span style="font-size: 25px; font-family: Roboto, arial,
> sans-serif;">嘿!这是结算模板</span> </p>
>
>   <div style="margin-right: 500px;">
>
>    گاوصندوقهای ژاپنی
>
>    <img border="0" src="null" style="margin-right: 500px;" width="112.5">
>
>    <br>中文2
>
>    <br>中文3
>
>    <br>中文4
>
>    <br>中文5
>
>    <br>中文6
>
>   </div>
>
>  </body>
>
> </html>
>
> http://spitaman.com
>
>
>
>
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>

Received on Tuesday, 5 February 2019 11:49:18 UTC