le monde include images
This commit is contained in:
parent
92a98c13eb
commit
cb706113cd
16
epub.php
16
epub.php
|
@ -42,7 +42,7 @@
|
|||
if (isset($_POST['lemonde']) && $_POST['lemonde'])
|
||||
{
|
||||
// hardcoded for now
|
||||
$includeimages = false;
|
||||
$includeimages = true;
|
||||
$includecover = false;
|
||||
$url = $_POST['lmurl'];
|
||||
|
||||
|
@ -112,21 +112,15 @@
|
|||
$imageid = $image->ContentItemId;
|
||||
$imageurl = preg_replace('/GetPublicationContentItems-.*\.json/', 'Image-MEDIUM-' . $imageid . '.jpg', $url);
|
||||
|
||||
$tempimgpath = './temp/' . $imageid . '.jpg';
|
||||
$tempcontent = file_get_contents($imageurl);
|
||||
file_put_contents('temp/' . $imageid, $tempcontent);
|
||||
|
||||
//$epub->AddImage('temp/' . $imageid, false, false );
|
||||
|
||||
$pagecontent .= '<div><img src="' . $imageurl . '"></div>';
|
||||
if ($image->HtmlText)
|
||||
{
|
||||
$pagecontent .= $image->HtmlText;
|
||||
}
|
||||
file_put_contents($tempimgpath, $tempcontent);
|
||||
$pagecontent .= '<div><img src="' . $tempimgpath . '"></div>';
|
||||
}
|
||||
}
|
||||
|
||||
$pagecontent .= $articlebody->HtmlText;
|
||||
$epub->AddPage($pagecontent, false, strip_tags($articlebody->Title));
|
||||
$epub->AddPage($pagecontent, false, strip_tags($articlebody->Title), true);
|
||||
}
|
||||
}
|
||||
write_epub($epub);
|
||||
|
|
Loading…
Reference in New Issue