PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » File_PDF » Bug #5686

Font family/size not correctly restores after addPage

Details

Submitted2005-10-13 16:32 UTC
Fromkevin dot barr at qwest dot com
StatusDuplicate
PackageFile_PDF
PHP Version4.3.11
OSLinux
Roadmaps(Not assigned)

Comments

[2005-10-13 16:32 UTC] kevin dot barr at qwest dot com

Description:
------------
When File/PDF is extended to provide a custom page header, the font family and size are not properly restored by the default addPage() function.

Test script:
---------------
/******
Current code from addPage() function
******/

$style = $this->_font_style . ($this->_underline ? 'U' : '');
$size = $this->_font_size_pt;

...

/* Restore font. */
if ($this->_font_family) {
$this->setFont($this->_font_family, $style, $this->_font_size_pt);
}

/******
Suggested code for addPage() function
******/

$family = $this->_font_family
$style = $this->_font_style . ($this->_underline ? 'U' : '');
$size = $this->_font_size_pt;

...

/* Restore font. */
if ($this->_font_family) {
$this->setFont($family, $style, $size);
}