initLocalSizeAttribute($node, "font-size", "pt"); $this->initLocalAttribute($node, "font-family"); $this->initLocalAttribute($node, "font-style"); $y = $this->getContext("yOrig") + $this->getContext("y"); $x = $this->getContext("xOrig") + $this->getContext("x"); $width = $this->getContext("width"); $height = $this->getContext("height"); $fontFamily = $this->getContext("font-family"); $fontStyle = $this->getContext("font-style"); $fontSize = $this->getContext("font-size"); $pdf = $this->getPdf(); $oldFontFamily = $pdf->GetFontFamily(); $oldFontStyle = $pdf->GetFontStyle(); $oldFontSize = $pdf->GetFontSize(); $txt = $node->nodeValue; if ($pdf->FontExists($fontFamily, $fontStyle)) { $pdf->SetFont($fontFamily, $fontStyle, $fontSize); } else if($pdf->FontExists($oldFontFamily, $fontStyle)) { $pdf->SetFont($oldFontFamily, $fontStyle, $fontSize); } else { $pdf->SetFont($oldFontFamily, $oldFontStyle, $fontSize); } $pdf->Text($x, $y, $txt); //reset font $pdf->SetFont($oldFontFamily, $oldFontStyle, $oldFontSize); } } ?>