将网站转换为 pdf 的最佳解决方案 [英] Best solution for turning a website into a pdf

查看:43
本文介绍了将网站转换为 pdf 的最佳解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的公司有我们开发的 CBT 系统.我们必须通过我们系统中的内容来制作书籍,我开发了一个程序,可以通过并下载我们系统中的所有内容,并创建不同培训模块的离线版本.

The company I work for we have a CBT system we have developed. We have to go through and create books out of the content that is in our system, I have developed a program that goes through and downloads all of the content out of our system and creates a offline version of the different training modules.

我创建了一个程序,该程序使用 CBT 的离线版本创建 PDF 文档.它的工作原理是使用网站屏幕截图创建不同页面的屏幕截图,然后使用 iTextSharp 从这些图像创建一个 PDF 文档.

I created a program that creates PDF documents using the offline version of the CBT. It works by using Websites Screenshot to create a screen shot of the different pages and then using iTextSharp it creates a PDF Document from those images.

这似乎是一个记忆拥抱,而且缓慢而痛苦.它需要将 40 个 CBT 模块变成书籍.即使每次创建一本书后,我都会采取每一步来清除记忆.大约 2 本书后它崩溃了,因为没有剩余的内存.

It seams to be a memory hug and painfully slow. There are 40 CBT Modules that it needs to turn into books. Even though I take every step to clear the memory after each time it creates a book. After about 2 books it crashes because there is no memory left.

是否有更好的方法来执行此操作,而不必对页面进行屏幕截图,以便在 pdf 文档中生成与网页相同的外观?

Is there a better way to do this instead of having to take a screen shot of the pages that will yield the same look of the web page inside the pdf document?

推荐答案

PrinceXML 是一种商业软件,可生成来自网站的 pdf.

PrinceXML is commercial software that generates pdf from websites.

这篇关于将网站转换为 pdf 的最佳解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆