library pdf-helper
Utilities for working with ZendPdf
mabujo/pdf-helper
Utilities for working with ZendPdf
- Thursday, September 24, 2015
- by mabujo
- Repository
- 1 Watchers
- 0 Stars
- 27 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 5 Versions
- 0 % Grown
Ari / PdfHelper
Utilities for working with ZendPdf:, (*1)
- Text Measurement
- Text wrapping into lines at closest length or specified characters
Sample Usage
<?php
use ZendPdf\PdfDocument;
use ZendPdf\Page;
use ZendPdf\Font;
use ZendPdf\Color\GrayScale;
use Ari\PdfHelper\Paragraph;
$pdf = new PdfDocument();
$page = new Page(Page::SIZE_A4);
$font = Font::fontWithName(Font::FONT_HELVETICA);
$gray = new GrayScale( 0.8 );
$page->setFont( $font, 8 );
$para = new Paragraph( $page, 2 /* line spacing */ );
$para->setDebug( true );
$para->setDebugLineColor( $gray );
$para->draw( $reallyLongTextUnicode, // default encoding assumes UTF-8
20 /* x position */,
780 /* y position */,
240 /* paragraph width */ );
// You can customise the character encoding
$para->setStringFnByte( 'ISO-8859-1' );
$para->setStringFnMultiByte( 'UTF-16BE' );
// You can get the number of lines
$para->getLineCount();
// And the total height in points
$para->getHeight();
// ---
$pdf->pages[] = $page;
header('Content-Type: application/pdf');
echo $pdf->render();
dev-master
9999999-dev
Utilities for working with ZendPdf
Sources
Download
The Requires
The Development Requires
by
John Henson
1.0.4
1.0.4.0
Utilities for working with ZendPdf
Sources
Download
The Requires
The Development Requires
by
John Henson
1.0.3
1.0.3.0
Utilities for working with ZendPdf
Sources
Download
The Requires
The Development Requires
by
John Henson
1.0.2
1.0.2.0
Utilities for working with ZendPdf
Sources
Download
The Requires
The Development Requires
by
John Henson
1.0.0
1.0.0.0
Utilities for working with ZendPdf
Sources
Download
The Requires
The Development Requires
by
John Henson