Home » File Formats » File_PDF » Bug #5686
Font family/size not correctly restores after addPage
Details
| Submitted | 2005-10-13 16:32 UTC |
|---|---|
| From | kevin dot barr at qwest dot com |
| Status | Duplicate |
| Package | File_PDF |
| PHP Version | 4.3.11 |
| OS | Linux |
| 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);
}