我如何通过使用v.net编码将文件保存在asp.net中的pdf格式中? [英] How I can save file in asp.net in forat of pdf by using of v.net coding?

查看:59
本文介绍了我如何通过使用v.net编码将文件保存在asp.net中的pdf格式中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请您告诉我如何将文件保存为pdf格式,我需要它是非常紧急

解决方案

否,这并不紧急.尽管我们很乐意在适合我们的时候为您提供帮助,但我们真的不在乎您不知道如何做自己的工作.

您不想保存ASP.NET文件,我假设您想保存它生成的HTML.您可以使用httppost获得此HTML,但是在很多方面,编写带有Web浏览器的winforms应用程序,将其指向站点并从那里保存HTML都容易得多.有免费的库可让您另存为PDF,这是完全不同的事情.为此,最好的选择是获取您的Web浏览器控件的屏幕截图并保存.当然,您将获得图像,而不是可搜索的文本. PDF与HTML的格式不同,因此,我只能看到的另一种选择是打印为PDF的打印驱动程序.

您可能需要告诉我们为什么要这样做,以便我们提出更好的建议.


您可以找到许多用于.NET的PDF库.

首先,查看基于iText的iTextSharp(最初为Java): http://en.wikipedia.org/wiki/ITextSharp [ ^ ],http://itextpdf.com/ [ ^ ].该软件根据GNU Affero通用公共许可证或商业用途所需的商业许可证提供.

尝试找到更多信息: http://en.lmgtfy.com/?q=PDF+%22. NET%22 [ ^ ].

—SA


一种可能性是,如果您可以将数据(需要在PDF文档中)打印到打印机,则可以使用打印机驱动程序打印到pdf文档.一个示例: http://www.cutepdf.com/products/cutepdf/writer.asp [ ^ ]


Please can you tell me that how I can file save in pdf format please I need it it is very urgent

解决方案

No, it''s not urgent. We don''t really care that you don''t know how to do your job, although we''re happy to help at a time that suits us.

You don''t want to save an ASP.NET file, I assume you want to save the HTML it generates. You can get this HTML with a httppost, but it''s easier in a lot of ways to write a winforms app that has a web browser in it, point it to the site, and save the HTML from there. There are free libraries that let you save as PDF, which is a whole different thing. To do that, your best bet is to take screenshots of your web browser control and save those. Of course, you will have an image, not searchable text. A PDF is in a different format to HTML, so the only other option I can see, is a print driver that prints to PDF.

You probably need to tell us why you want to do this, so we can make better suggestions.


You can find a number of PDF libraries for .NET.

First of all, looks at iTextSharp based on iText (originally in Java): http://en.wikipedia.org/wiki/ITextSharp[^], http://itextpdf.com/[^]. This software is provided either under the GNU Affero General Public License or commercial license required for commercial use.

Try to find some more: http://en.lmgtfy.com/?q=PDF+%22.NET%22[^].

—SA


One possibility is that if you can print the data (that you want in the PDF document) to the printer then you could use a printer driver which prints to a pdf document. One example: http://www.cutepdf.com/products/cutepdf/writer.asp[^]


这篇关于我如何通过使用v.net编码将文件保存在asp.net中的pdf格式中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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