W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2019

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

From: Caravan StartUp <caravaan@outlook.com>
Date: Sun, 3 Feb 2019 12:51:11 +0000
To: "html-tidy@w3.org" <html-tidy@w3.org>
Message-ID: <VI1PR0402MB35025BD448BF026E5D21722FD56C0@VI1PR0402MB3502.eurprd04.prod.outlook.com>
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.

  <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'; }
  <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 style="font-size: 25px; font-family: Roboto, arial, sans-serif;">
   انتخاب بهترین برندها از برترین گاوصندوق ها!
   <li>BioConnect Version 1 - Capture</li>
  <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">

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

Received on Monday, 4 February 2019 13:15:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 4 February 2019 13:15:49 UTC