diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php
index a08981bff25..9f3c986bd13 100644
--- a/htdocs/comm/propal/apercu.php
+++ b/htdocs/comm/propal/apercu.php
@@ -207,6 +207,7 @@ if ($_GET["propalid"] > 0) {
// Chemin vers png aperçus
$relativepathimage = "${propalref}/${propalref}.pdf.png";
$relativepathimagebis = "${propalref}/${propalref}.pdf.png.0";
+ $relativepathimagebis2 = "${propalref}/${propalref}.pdf.png.1";
$fileimage = $file.".png"; // Si PDF d'1 page
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
@@ -257,7 +258,7 @@ if ($_GET["propalid"] > 0) {
$description = imagick_faileddescription( $handle ) ;
print "handle failed!
\nReason: $reason
\nDescription: $description
\n";
}
- imagick_writeimage( $handle, $file .".png");
+ imagick_writeimages( $handle, $file .".png");
} else {
$langs->load("other");
print ''.$langs->trans("ErrorNoImagickReadimage").'';
@@ -297,7 +298,8 @@ if (file_exists($fileimage))
// Si fichier png PDF de plus d'1 page trouvé
elseif (file_exists($fileimagebis))
{
- print '
';
+ print '.')
';
+ print '.')
';
}
diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php
index 6849769c5ab..dfff2e522bd 100644
--- a/htdocs/commande/apercu.php
+++ b/htdocs/commande/apercu.php
@@ -181,6 +181,7 @@ if ($_GET["id"] > 0) {
// Chemin vers png aperçus
$relativepathimage = "${commanderef}/${commanderef}.pdf.png";
$relativepathimagebis = "${commanderef}/${commanderef}.pdf.png.0";
+ $relativepathimagebis2 = "${commanderef}/${commanderef}.pdf.png.1";
$fileimage = $file.".png"; // Si PDF d'1 page
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
@@ -231,7 +232,7 @@ if ($_GET["id"] > 0) {
$description = imagick_faileddescription( $handle ) ;
print "handle failed!
\nReason: $reason
\nDescription: $description
\n";
}
- imagick_writeimage( $handle, $file .".png");
+ imagick_writeimages( $handle, $file .".png");
} else {
$langs->load("other");
print ''.$langs->trans("ErrorNoImagickReadimage").'';
@@ -289,7 +290,8 @@ if (file_exists($fileimage))
// Si fichier png PDF de plus d'1 page trouvé
elseif (file_exists($fileimagebis))
{
- print '
';
+ print '.')
';
+ print '.')
';
}
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index 09ce8853758..ffdcbcf3fc9 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -143,6 +143,8 @@ if ($_GET["facid"] > 0)
// Chemin vers png aperçus
$relativepathimage = "${facref}/${facref}.pdf.png";
$relativepathimagebis = "${facref}/${facref}.pdf.png.0";
+ $relativepathimagebis2 = "${facref}/${facref}.pdf.png.1";
+
$fileimage = $file.".png"; // Si PDF d'1 page
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
@@ -200,7 +202,7 @@ if ($_GET["facid"] > 0)
print "handle failed!
\nReason: $reason
\nDescription: $description
\n";
}
- imagick_writeimage( $handle, $file .".png");
+ imagick_writeimages( $handle, $file .".png");
}
else
{
@@ -239,7 +241,8 @@ if (file_exists($fileimage))
// Si fichier png PDF de plus d'1 page trouvé
elseif (file_exists($fileimagebis))
{
- print '
';
+ print '.')
';
+ print '.')
';
}