0
私はそのバグか、何か間違っていることを知りたい。私はそれを作家に報告する前に誰かがそれを確認できますか?TCPDF ImageSVG画像ローテーション
SVG(file.svg):
<svg style="overflow: hidden; position: relative;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1226" version="1.1" height="826"><image transform="matrix(1.0364,-0.3305,0.3305,1.0364,-41.846,108.0143)" preserveAspectRatio="none" x="10" y="10" width="205" height="154" xlink:href="wallpaper.jpg" opacity="1" stroke-width="1"></image><rect transform="matrix(1.0364,-0.3305,0.3305,1.0364,-41.846,108.0143)" x="165" y="114" width="50" height="50" r="0" rx="0" ry="0" fill="#C0C0C0" stroke="#000" opacity="0" stroke-width="1"></rect><image transform="matrix(1.1575,0.2385,-0.2385,1.1575,-442.1395,-145.4163)" preserveAspectRatio="none" x="500" y="10" width="205" height="154" xlink:href="wallpaper.jpg" opacity="1" stroke-width="1"></image><rect transform="matrix(1.1575,0.2385,-0.2385,1.1575,-442.1395,-145.4163)" x="655" y="114" width="50" height="50" r="0" rx="0" ry="0" fill="#C0C0C0" stroke="#000" opacity="0" stroke-width="1"></rect></svg>
PHPコード:
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setLanguageArray($l);
$pdf->AddPage();
$pdf->ImageSVG($file='file.svg', $x=15, $y=30, $w='', $h='', $link='', $align='', $palign='', $border=0, $fitonpage=false);
$pdf->Output('sample.pdf', 'F');
SVGファイルがブラウザで正常に見えるが、thefinished PDF内の画像側が問題を抱えている:彼らは見て
http://img215.imageshack.us/img215/816/pdfproof.jpg
PDF_IMAGE_SCALE_RATIOとは何ですか?それを増やすとどうなりますか?あなたが変更しようとする可能性のあるsetImageScaleがあると思います。 pdf-> setImageScale(1.53); –
残念ながら、問題とは関係ありません.TCPDF :: setImageScale($ scale)\t ピクセルをユーザー単位に変換する調整係数を設定します。 =それは画像を大きく/小さくする – user1140774
これは間違いなくTCPDFの問題ですか? InDesignまたはIllustratorを使用して同様のPDFを生成し、同じように見えるかどうかを確認できますか?私はTCPDFを使用していませんが、私の経験から、PDF仕様の古いバージョンはアンチエイリアスがないか、または貧弱です(これは、「saw」エッジを削除した効果です)。 Acrobatの表示設定を確認するか、以前の形式の場合はPDFの最新バージョンとして保存してみてください。 –