2017-07-12 34 views
0

HTML/PHPでこの出力実行罰金:あなたが見ることができるだけのようの出力はPHP = ok、DOMPDF = wrongです。 (ディスプレイ)

<?xml version="1.0" encoding="utf-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es"> 
<head> 
<title>(PAbi)</title> 
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> 
<link rel="icon" href="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico" type="image/x-icon" /> 
<link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico" type="image/x-icon" /> 
<style type="text/css">html,body{margin:0;padding:0;background:#000;color:#fff;font-family:helvetica;} 
.pie{position:fixed;width:100%;bottom:0;color:#000;background:#fff9f2;font-size:6.5pt;text-align:center;border-top:1px dashed #aa0000;} 
#indice{width:430px;margin:auto;} 
#indice dt{float:left;width:300px;overflow:hidden;white-space:nowrap;} 
#indice dd{margin:0;float:left;width:100px;overflow:hidden;} 
#indice dt span:after{content:".....................................................";} 
</style></head> 
<body><div id="cosmos"><br /> 
<h1 class="marin">index</h1> 
<ul id="indice"> 
<dt><span>Índice</span></dt><dd>2</dd> 
<dt><span>intro</span></dt><dd>3</dd> 
<dt><span>functions</span></dt><dd>4</dd> 
</ul></div> 
<div class="pie">Aliens is here</div> 
</body></html> 

、私はその後、私は、この「doits」を必要とする、インデックスページを作成する必要がある、私がこのコードを取得する:

CSS Justify text, fill space with dots

しかし、私はDOMPDFでPDFにエクスポートするとき、表示が悪い行く...私は?おかげでページ数にdoitsを使用してページ「インデックス」を作成することができますに任意の助けによって

ありがとう!

答えて

0

よろしくお願いします。ページ番号

問題を示すために "doits" と

  • XHTML
  • DOMPDF
  • インデックス情報:私は私の "ページインデックス" を使用して "を作成" することができ、このコードを使用して

    あなたがCSSから使用したときです。[TAG:after {content: "...あなたの文字列はここに...";}] DOMPDFは永遠に改行を入れて、ドキュメントPDFに "page index"の表示が間違っています。

    多分すべての人は、このオプションを使用したい...

    <?php 
    // I put excesive doits only by do test xD 
        $puntos = str_repeat('.', 999); 
    
        echo '<?xml version="1.0" encoding="utf-8"?> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es"> 
    <head><title>(PAbi)</title> 
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> 
    <link rel="icon" href="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico" type="image/x-icon" /> 
    <link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico" type="image/x-icon" /> 
    <style type="text/css"> 
    table{width:650px;border-spacing:0.5em;} 
    #indice1 td{overflow:hidden;max-width:400px;border-radius:2em;padding:0.3em;} 
    #indice1 span:after{content:"'.$puntos.'";} 
    .numpa{text-align:center;width:20px;background:#d3dbfa;border:1px solid #000;} 
    .info{width:205px;background:#d1f6a5;border:1px solid #000;} 
    </style></head><body> 
    <table id="indice1"><tr> 
    <td class="info">ÍNDICE</td> 
    <td class="puntos"><span></span></td> 
    <td class="numpa">2</td></tr><tr> 
    <td class="info">Introducción</td> 
    <td class="puntos"><span></span></td> 
    <td class="numpa">3</td></tr><tr> 
    <td class="info">Características del servicio</td> 
    <td class="puntos"><span></span></td> 
    <td class="numpa">4</td> 
    </tr></table></body></html>'; 
    ?> 
    
0

は残念ながらDOMPDF(現在のリリースであることv0.8.0)は、その特定のスタイリングを処理することができません。主な問題は、Dompdfが行末で浮動小数点数を正しくリフローしないことです。しかし、たとえそれを強制したとしても、#indice dd + dt { clear: both; } Dompdfは浮動小数点を適切にクリアせず、浮動小数点数の書き込みを続けて、同じ行に浮動小数点を浮動させます。

関連する問題