나는이 간단한 스크립트를 사용하여 PHP 라이브러리 TCPDF에 PDF를 작성합니다. 이것은 스크립트입니다PDF 파일에 TCPDF로 공백 쓰기
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Label Creator');
$pdf->SetTitle('labels');
$pdf->SetSubject('Labels di prova');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE,0);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// set font
$pdf->SetFont('times', '', 15);
//left margin
$pdf->SetMargins(18,15,18,FALSE);
// add a page
$pdf->AddPage();
$label="Hello world, i'm michele";
$pdf->Cell(0, 0 , $label, 0, 1, 'C', 0, '', 0,FALSE,'T','M');
//Close and output PDF document
$pdf->Output('../../labels.pdf', 'F');
echo 'Labels generate!';
문제는 스크립트가 작동하지만 파일에 내가 공백없이 텍스트를 볼 수 있다는 것입니다! 이렇게 : helloworld, i'mmichele 누군가 해결책을 가지고 있습니까? !!
무엇이 <<< EOD 및 EOD입니까? ?? – trullallero
미안하지만 $ label = "Hello world, i 'm michele"; $ pdf-> Cell (0, 0, $ label, 1, 1, 'C', 0, '', 3; 공백을 쓰지 않습니다 ... – trullallero
문제가 해결되었습니다. 브라우저의 PDF 플러그인 비주얼 라이저! – trullallero