configure(array('scalepoints' => false)); $pipeline->fetchers = array(new MyFetcherMemory($html, "")); $pipeline->data_filters[] = new DataFilterHTML2XHTML(); $pipeline->destination = new DestinationFile("test.pdf"); parse_config_file('../html2ps.config'); $media = Media::predefined("A5"); $pipeline->_prepare($media); return $pipeline->_layout_item("", $media, 0, $context, $positioned_filter); } function testNoteCallWidthClean() { $tree = $this->runPipeline('
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT
'); $p = $tree->get_element_by_id('p'); $content = $p->content[0]; $max_right = $p->get_left(); foreach ($content->content as $text) { $max_right = max($max_right, $text->get_right()); }; $this->assertTrue($max_right < $p->get_right(), sprintf('Right edge of paragraph content (%s) is greater than paragraph right edge (%s)', $max_right, $p->get_right())); } function testNoteCallWidth() { $tree = $this->runPipeline('TEXT FOOTNOTE TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT
'); $p = $tree->get_element_by_id('p'); $content = $p->content[2]; $max_right = $p->get_left(); foreach ($content->content as $text) { $max_right = max($max_right, $text->get_right()); }; $this->assertTrue($max_right < $p->get_right(), sprintf('Right edge of paragraph content (%s) is greater than paragraph right edge (%s)', $max_right, $p->get_right())); } } ?>