Modification des références vers les css, images et scripts javascript dans le html enregistré pour le PDF
This commit is contained in:
parent
27918af266
commit
4d98b294f2
@ -10,7 +10,9 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract
|
||||
if ($page->exportable('pdf')){
|
||||
$layout = $this->_response->getBody();
|
||||
$filename = $page->filename('pdf', $this->_request->getParams());
|
||||
file_put_contents(APPLICATION_PATH.'/../cache/pages/'.$filename.'.html', $layout);
|
||||
$content = preg_replace('@<link href="/@si','<link href="./',$layout);
|
||||
$content = preg_replace('@src="/@si','src="./',$content);
|
||||
file_put_contents(APPLICATION_PATH.'/../cache/pages/'.$filename.'.html', $content);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user