将当前的html网页另存为pdf文件 [英] Save current html webpage as pdf file

查看:565
本文介绍了将当前的html网页另存为pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我实现了一个应用程序,用于在VC ++中将网页另存为图像文件.
我不知道如何将当前的html网页另存为.pdf格式.

请提供 code 方向,以将网页另存为VC ++中的.pdf文件.
请紧迫.

感谢您的进步.

解决方案

方式之一:教程:如何使用PDFDoc Scout库在VC ++(Visual C ++)中创建PDF文档 [ ^ ]

与其他替代方法详细讨论的类似问题:此处. [ ^ ]

System.Net.WebClient webClient = new System.Net.WebClient(); 
webClient.DownloadFile("http://samplesite/index.aspx", "C:\\temp.html"); 



然后使用 ITextSharp [ pdf API (如果您愿意这样做).您可以将其构建到您的代码中.很好,因为您不必使用任何库,并且它可以在任何语言中使用.


Hi,

I implemented a application to save webpage as Image file in VC++.
I don''t know how to save current html webpage as .pdf format.

Please provide codedirection to save webpage as .pdf file in VC++.
Please its urgent.

Thanks for advance.

解决方案

One of the ways: Tutorial: how to create PDF document in VC++ (Visual C++) using PDFDoc Scout library[^]

Similar question discussed at length with other alternatives: here.[^]


System.Net.WebClient webClient = new System.Net.WebClient(); 
webClient.DownloadFile("http://samplesite/index.aspx", "C:\\temp.html"); 



And convert this html file to a pdf file using ITextSharp[^]


DocRaptor.com has a useful pdf api if you''d rather do it that way. You can build it into your code. It''s nice because you don''t have to use any libraries, and it works in any language.


这篇关于将当前的html网页另存为pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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