C# 如何从网页上的 SWF 播放器中提取 PDF?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12111355/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-09 22:06:20  来源:igfitidea点击:

How to extract a PDF from an SWF player on a web page?

c#pdfflash

提问by Franva

There is a book on this page (http://img.docin.com/players/DocinViewer.swf?productId=463932528), and it is inside a swf player. Previously there was a software which can extract all pages in the swf player and store them as a pdf file.

这个页面上有一本书(http://img.docin.com/players/DocinViewer.swf?productId=463932528),它在一个swf播放器里面。以前有一个软件可以提取swf播放器中的所有页面并将它们存储为pdf文件。

So there should be 3 steps:

所以应该有3个步骤:

  1. Find the file source inside the swf player
  2. Extract all pages from the swf player.
  3. Save them as a whole pdf file.
  1. 找到swf播放器里面的文件源
  2. 从 swf 播放器中提取所有页面。
  3. 将它们保存为一个完整的 pdf 文件。

How might one accomplish this?

怎么可能做到这一点?

采纳答案by Kit

I don't know the exact answer, but perhaps someone can expand. It seems to me that using these two references, you could search for the PDF in the stream you get back in the SWF to identify the SWF header, and structure, and the PDF header and footer and then reconstitute the PDF directly from the stream:

我不知道确切的答案,但也许有人可以扩展。在我看来,使用这两个引用,您可以在返回到 SWF 的流中搜索 PDF,以识别 SWF 标题、结构以及 PDF 页眉和页脚,然后直接从流重新构建 PDF:

Alternatively maybe an existing tool will do the trick:

或者,也许现有的工具可以解决问题:

Or update the open source project below, mentioned by a commenter to the level you need, using the references for the newer SWF and PDF formats:

或者使用更新的 SWF 和 PDF 格式的参考将评论者提到的以下开源项目更新到您需要的级别: