2013-07-05 32 views
0

我試圖將html表格轉換爲pdf格式。當我在瀏覽器中查看錶格時,沒有出現白線,但是當我將其導出到pdf時,每個表格單元格和行之間都有白線。我已經嘗試過每種CSS風格來解決它,但是它們都不起作用。我正在使用Winnovative HTML to PDF Converter。有沒有人有這個問題或知道如何解決它?PDF中的白線

.pricelistcontainer table { 
width: 100%; 
display: table; 
padding: 0; 
margin: 0; 
font-size: 100%; 
border-collapse: collapse; 
/*margin-top: 25px; 
margin-left: 52px;*/ 
border: none; 

}

.pricelistcontainer table th { 
     border: none; 
     background: #000000; 
     vertical-align: top; 
     color: #ffffff; 
     font-family: arial,sans-serif; 
     /*line-height: 1.5;*/ 
     font-weight: bold; 
     padding: 4px; 
    } 



.pricelistcontainer table td { 
     /*line-height: 1.5;*/ 
     border: none !important; 
     margin: 0; 
     background: #dae2eb; 
     vertical-align: middle; 
     font-family: arial,sans-serif; 
     padding-left: 2px; 
     color: #000; 
     padding-top: 4px; 
     padding-right: 4px; 
     padding-left: 4px; 
    } 
+1

請顯示您的html。你使用不可見/白色邊框還是使用無邊框? – mnagel

回答

0

您可以使用dopdf,只需安裝它,然後按Ctrl + P鍵在網頁時。它會顯示打印選項。選擇默認打印機dopdf並保存。

0

據我所知Winnovative使用Internet Explorer渲染引擎,所以你可能想檢查你在IE中看到的內容,然後調整你的CSS。

或者,您可以使用基於webkit的解決方案,如wkhtmltopdfhtm2pdf提供的API。