开发者

Creating a thumbnail of a web page

On my site, I'm allowing users to create pages of content, and I'd like to be able to show them a preview version at various times. Basically, the page elements are stored in the database, along with t开发者_Go百科heir sizes and positions, and when they view the page, the elements are retrieved and put together to reform the page. However, for the smaller versions, I've been trying to do the same thing, but scaled down. It kind of works, but things are a bit 'off', probably due to rounding off errors in the calculations.

Now I'm wondering if it would be better to convert the html to an image or something like that, which can then be scaled. I'd need to be able to do it 'inline' though, so with my php code.

Anyone have any ideas?

Thanks!


I've seen a couple of web services that can generate thumbnails for you. http://www.thumboo.com/

They also have an API so that might or might not meet your criteria for being "inline".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜