public function setUp() { if (!ezcBaseFeatures::hasExtensionSupport('haru')) { $this->markTestSkipped('This test requires pecl/haru installed.'); } parent::setUp(); }
public function setUp() { parent::setUp(); $style = new ezcDocumentPcssStyleInferencer(); $style->appendStyleDirectives(array(new ezcDocumentPcssLayoutDirective(array('article'), array('font-family' => 'serif', 'text-columns' => '2', 'font-size' => '10pt', 'line-height' => '1')), new ezcDocumentPcssLayoutDirective(array('title'), array('font-family' => 'sans-serif', 'text-columns' => '2')), new ezcDocumentPcssLayoutDirective(array('page'), array('page-size' => 'A5')))); $this->docbook = new ezcDocumentDocbook(); $this->docbook->loadFile(dirname(__FILE__) . '/../files/pdf/long_text.xml'); $this->renderer = new ezcDocumentPdfMainRenderer(new ezcDocumentPdfSvgDriver(), $style); }
public function setUp() { if (!ezcBaseFeatures::hasExtensionSupport('haru')) { $this->markTestSkipped('This test requires pecl/haru installed.'); } parent::setUp(); // Change error reporting - this is evil, but otherwise TCPDF will // abort the tests, because it throws lots of E_NOTICE and // E_DEPRECATED. $this->oldErrorReporting = error_reporting(E_PARSE | E_ERROR | E_WARNING); }
public function setUp() { parent::setUp(); $this->document = new DOMDocument(); $this->document->registerNodeClass('DOMElement', 'ezcDocumentLocateableDomElement'); $this->document->load(dirname(__FILE__) . '/../files/pdf/paragraph.xml'); $this->xpath = new DOMXPath($this->document); $this->xpath->registerNamespace('doc', 'http://docbook.org/ns/docbook'); $this->styles = new ezcDocumentPcssStyleInferencer(); $this->styles->appendStyleDirectives(array(new ezcDocumentPcssLayoutDirective(array('article'), array('font-size' => '8mm')), new ezcDocumentPcssLayoutDirective(array('page'), array('page-size' => 'TEST', 'margin' => '0', 'padding' => '10')), new ezcDocumentPcssLayoutDirective(array('para'), array('margin' => '0mm', 'padding' => '0')))); $this->page = new ezcDocumentPdfPage(1, 108, 108, 108, 100); $this->page->x = 0; $this->page->y = 0; }
public function setUp() { parent::setUp(); $this->styles = new ezcDocumentPcssStyleInferencer(); $this->styles->appendStyleDirectives(array(new ezcDocumentPcssLayoutDirective(array('page'), array('page-size' => 'TEST', 'margin' => '0', 'padding' => '10')), new ezcDocumentPcssLayoutDirective(array('blockquote'), array('font-size' => '6mm')))); }
protected function setUp() { parent::setUp(); $this->driver = new ezcDocumentPdfTransactionalDriverWrapper(); $this->driver->setDriver($this->mock = $this->getMock('ezcDocumentPdfDriver', array('createPage', 'getCurrentLineHeight', 'calculateWordWidth', 'setTextFormatting', 'drawWord', 'drawImage', 'drawRectangle', 'save'))); }