sdglhm / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Page with tables change footer color to the last used color #344

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate a page with several html tables (some breaks through on the other 
page)
2. Generate a horizontal line with some text (page count, date, ...) as footer. 
Set the color via RGB array(0,0,0) (= black)
3. generate the PDF

What is the expected output? What do you see instead?
Expected is a rendered PDF page where the footer on every page is black (has 
the colour as defined).
Instead the footer colour changes to the last used color before the footer 
appears.

What version of the product are you using? On what operating system?
dompdf_0-6-0_beta2.zip
SUSE Linux Enterprise Server 11 (x86_64)
PHP 5.2.14

Please provide any additional information below.
The code to genreate the PDF footer is set as inline PHP.
<color>

$font = Font_Metrics::get_font("Helvetica");
$size = 8;
$text_height = Font_Metrics::get_font_height($font, $size);
$y += $text_height;
$date = date("D, d. M Y");
$text = $date . "  -  Page {PAGE_NUM} of {PAGE_COUNT}";
$pdf->page_text(445, $y, $text, $font, 8, array(0,0,0));

</color>

Original issue reported on code.google.com by ukarr...@gmail.com on 30 Aug 2011 at 2:07

GoogleCodeExporter commented 9 years ago
As you can see on the attached files, the colour changes from black to light 
grey to dark grey.

And the text colour in the footer always match the last used colour on the page 
(here the very thin last line of the table above).

Original comment by ukarr...@gmail.com on 30 Aug 2011 at 2:37

Attachments:

GoogleCodeExporter commented 9 years ago
We're looking into this one. The current work-around is to use a color slightly 
off from black, e.g. array(.01,.01,.01).

Original comment by eclecticgeek on 22 Sep 2011 at 2:42

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16