简体   繁体   English

GIF格式的幻灯片-是否要转换为1个PDF文件(使用PHP)?

[英]Slides in GIF format - Would like to convert into 1 PDF file (using PHP)?

I have a series of images that are screenshots of PowerPoint slides. 我有一系列图像是PowerPoint幻灯片的屏幕截图。 I would like to join these images into 1 PDF file using PHP. 我想使用PHP将这些图像合并为1个PDF文件。

Can anyone direct me to a script or tutorial that does this? 谁能将我定向到执行此操作的脚本或教程?

Here is an example of series of images that I wold like to convert into a single PDF document: 这是我希望将其转换为单个PDF文档的一系列图像的示例:

Thanks. 谢谢。

The Image method can do that for you: Image方法可以为您做到这一点:

require ('fpdf.php');

$pdf = new FPDF();

for ($i = 0; $i < 5; $i++){
    $pdf->AddPage('L');
    $pdf->Image($i.'.gif', 0, 0, 250, 200);
}

$pdf->Output();

This will put each slide on a new page. 这会将每张幻灯片放到新页面上。 You might want to adjust the image proportions (the last two parameter). 您可能需要调整图像比例(最后两个参数)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM