LoginSignup
1
0

More than 5 years have passed since last update.

fpdfの開発例(余白を無くす設定例)

Last updated at Posted at 2018-04-07

phpで下記の様に記述する

<?php
require("fpdf/mbfpdf.php");

//用紙サイズA5の場合 $pdf=new MBFPDF('P', 'mm','A5');とするがとpdf->SetXY(x,y)のxyの規定範囲が狭いので
//以下の様に用紙サイズカスタム設定

$pdf=new MBFPDF('P', 'mm', array(170,250));

$pdf->AddMBFont(GOTHIC ,'SJIS');

for($i=0;$i<=1;$i++){

$pdf->AddPage();

$pdf->SetFont(GOTHIC,'',20);

$pdf->SetXY(0, 0.0);

$pdf->Write(10,'文字列の出力',0,0,"L");

$pdf->SetXY(30.0, 30.0);

$pdf->Write(10,'次の文字列',0,0,"L");

$pdf->SetXY(0,190);

$pdf->Write(10,'その次の文字列',0,0,"L");

}
$pdf->Output();
?>
pdftest_img001.jpg

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0