有谁知道用于嵌入 pdf 对象的 jQuery 放大插件吗?

发布于 2024-09-11 12:20:20 字数 80 浏览 3 评论 0原文

到目前为止,我发现的所有放大插件的缩放功能都是针对图像的,我需要一些可以在将鼠标悬停在嵌入对象标签 .pdf 文件上时起作用的东西。有什么想法吗?

So far all the zoom of magnifying plugins I have found are for images and I need something that will work when hovered over an embedded object tag .pdf file. Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

水水月牙 2024-09-18 12:20:20

基本上,图像可以从浏览器正确呈现,并且可以“嵌入”到网页中,而 PDF 不能直接嵌入到 html 中,这就是它们不能缩放的原因。

您无法在页面中看到 PDF 预览。嗯,这是可能的,但不能用纯 JavaScript。您可以使用如下方式将该文件嵌入网页中:https://docs.google.com/viewer

这是一个示例:http://code.a> google.com/apis/books/docs/viewer/examples/book-animate.html

,但我不相信可以达到您喜欢的效果。

Basically images can be rendered properly from the browser and can be "embedded" into a web page, while the PDF cannot be embedded directly into html, and that's why they cannot be zoomed.

You cannot see a PDF preview in a page. Well, it's possible, but not with pure JavaScript. You can embed the file in a web page using something like this: https://docs.google.com/viewer

here is an example: http://code.google.com/apis/books/docs/viewer/examples/book-animate.html

but I don't believe it's possible to achieve the effect you like.

素衣风尘叹 2024-09-18 12:20:20

最简单的方法是使用 Flash。您可以使用 Scribd 之类的工具,并在您的网站上使用嵌入代码。或者制作您自己的基于 Flash 的 PDF 阅读器。

另一种方法是将 PDF 文件转换为一系列图像(在 Acrobat 上,使用“文件”->“导出”->“图像”)。然后,您可以将这些放大插件之一与所有图像结合使用。如果您的 PDF 文件非常长,您可以使用 jQuery 在页面加载时自动加载图像(类似于新的 Google Images 的无限滚动方式)。

The easiest way to do this would be to use Flash. You can use something like Scribd, and use the embed code on your site. Or make your own flash-based PDF Reader.

Another way to do this would be to convert the PDF file into a series of images (On Acrobat, use File->Export->Image). Then, you can use one of those magnification plugins in conjunction with all the images. If your PDF file is really long, you can use jQuery to automatically load the images as the page loads (similar to how the new Google Images has endless scrolling).

坦然微笑 2024-09-18 12:20:20

除了 Scribd 和制作您自己的 Flash 应用程序来阅读本文之外,您还可以使用 Adob​​e Captivate 之类的程序,该程序可以获取各种文件并从中创建 Flash 演示文稿。

Scribd 可能是最简单的。 Google Docs Viewer 也有很好的支持,但 Scribd 查看器只是......更整洁。

Along with Scribd and making your own Flash application to read this, you could also use something like the program Adobe Captivate, which takes all manner of files and creates Flash presentations out of them.

Scribd is probably the easiest. Google Docs Viewer has great support too, but the Scribd viewer is just.. tidier.

月棠 2024-09-18 12:20:20

如果我猜你正在寻找预览之类的东西,那么我会说它没有意义,因为无论什么(iframe/object)中嵌入的pdf都会在悬停或其他东西上进行任何预览魔法之前下载整个PDF。

但如果你真的想使用一些好的插件来处理 pdf 渲染并获得一些好的效果,那么看看 JQuery 媒体插件

If I guess you are looking for preview kind of thing, then I would say there's no point in it, coz embedded pdf in whatever (iframe/object) will download the whole PDF anyway before any preview magic on hover or something else.

But if you really want to play with some good plugin that handle pdf rendering with some good effects, then have a look at JQuery Media Plugin.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文