The images that dont work come from the slave sites's "images/stories" folder.
Code: |
$pdf = new JDocumentPDF();
$pdf->setTitle($article['title']);
$pdf->setName($article['alias']);
$pdf->setDescription($article['metadesc']);
$pdf->setMetaData('keywords', $article['metakey']);
$pdf->setBuffer($article['introtext'] . $article['fulltext']);
$this->writeFile($pdf, $folder);
|
Code: |
function writeFile($pdf, $folder) {
$data = $pdf->render();
$file = fopen($this->_getDestinationFilePath($pdf->getTitle(), $folder), "w");
fwrite($file, $data);
fclose($file);
}
|
I must be missing something simple I guess, but the code works for everything, except images from the slave site... in the slave site.
I'm using the core Joomla PDF exporter (TCPDF) and writing the content to a file.