如何使用 php imagemagick 从 pdf 中获取转换后的图像的名称?
我将一些 pdf 转换为 png
exec("convert readme.pdf readme.png")
然后我需要将任何给定 pdf 生成的图像文件名存储在 mysql 数据库中。
这是因为当我以这种方式转换并且源pdf超过一页时,我得到一系列: readme-0.png readme-1.png readme-2.png
所以问题是:我如何确定转换后生成的图像文件名?
预先感谢,希望我说清楚了。
Im converting some pdfs to pngs wth
exec("convert readme.pdf readme.png")
And then i need to store in a mysql database the resulting image filenames from any given pdf.
This is because when i convert in this manner and the source pdfs are more than one page i get a series of: readme-0.png readme-1.png readme-2.png
So the question is: how can i determine after conversion the resulting image filenames?
Thanks in advance, hope i made myself clear.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于多页转换,它始终是originalname-#.png。
It'll always be originalname-#.png for multi-page conversions.