Notifications
Clear all

horizontal images in pdf

2 Posts
2 Users
0 Likes
2,636 Views
(@beatriz.sancho)
New Member
Joined: 9 years ago
Posts: 2
Topic starter  

Hello, I am using the Woocommerce PDF & Print. I would like to have the gallery images ($wpp_gallery) in horizontal. I have tried to extract the urls and set the gallery by concatenation of the urls but it always print one below the other...

Any idea?

In save_as_pdf.php I have:

<?php
$STR = '<table width="700" border="0" bgcolor="#CCCCCC" cellspacing="1" cellpadding="5">
<tr>
<td bgcolor="#FDFDFD" style="font-size:14px; color:#666666;"> '. $wpp_sku .'
<h1>'. $wpp_title .'</h1>
'.$wpp_featured_image.' '.((!empty($wpp_gallery)) ? "<p>".$wpp_gallery_images.'</p><p><img src="'.$imageniconos.'"></p>
' : '' ).' '.(($wpp_price_html) ? $wpp_price.'<br>
' : '' ).''.(($wpp_permalink) ? '<p><b>Ver en la web</b>: <a href="'.$wpp_permalink.'">'.$wpp_permalink.'</a></p><br>
' : "rn" ).''.(($wpp_summary) ? "<p>".$wpp_summary.'</p><br>
' : '' ).''.(($wpp_description) ? "<p>".$wpp_description.'</p><br>
<img src="'.$wpp_gallery1.'"><img src="'.$wpp_gallery2.'"><img src="'.$wpp_gallery3.'"><img src="'.$wpp_gallery4.'"><img src="'.$wpp_gallery5.'">' : '' ).'

</td>
</tr>
</table>';
?>


   
Quote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4173
 

Hi Beatriz,

Thank you for using our plugin.

Please do not make any changes in save_as_pdf.php template file, it doesn't reflect the PDF document structure, it's just a global layout corrector.

PDF doesn't support HTML and it doesn't have any rules for alignment and image float . That's a hard work to make those horizontal, there should be lots of calculations about image coordinates and other things. However we'll work on that and will add this change in next version.


   
ReplyQuote
(@beatriz.sancho)
New Member
Joined: 9 years ago
Posts: 2
Topic starter  

Ups! Sorry I didn't know it...

Maybe it would be easier the main image and the other images of the gallery in vertical on the right.

Something like this? 

Just an idea, thank you very much for your work!


   
ReplyQuote
Share:
Scroll to top