将网址转换为pdf [英] converting url into pdf

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

问题描述

嗨朋友们,



我正在尝试将网页网址转换为我的网络应用程序中的PDF文档,但我仍然无法实现这一点。



让我知道是否有任何编码技术可以解决这个问题?



提前谢谢





A.Arockiasamy

解决方案

您好b $ b

似乎没有免费软件将URL转换为PDF。我找到了一些免费的开源资源,例如:

http://www.htmldoc.org

http://www.pdfsharp.net/



我试图实现简单的转换器,并意识到主要的问题是从URL收集所有图像,CSS和JS。你遇到过同样的问题吗?

最简单但最难看的方法是创建.Net WebBrowser,导航到指定的URL并保存它:)此外,你可以尝试使用正则表达式来提取图像,CSS,脚本等。



很抱歉,但我还没有完成解决方案来回答你的问题......


首先抱歉我的英语。



我必须在几个月之前做类似的事情。但是在Winforms应用程序中。



可以将它变成网络应用程序。



第1步:



使用WebBrowser对象。使用隐藏方法(DrawToBitmap)。

将网址保存为图像



第2步:

随着iTesxtSharp,pdfsharp.net或类似的工具。我用1张图片标签制作了一张空白的pdf。把图像放在里面。



步骤3

保存pdf。



完成。



如果您想要我的应用程序进行测试,请告诉我



欢呼


你好。目前我使用的是在线转换器,如 http://kitpdf.com/ [ ^ ] ...我喜欢它,因为它工作得非常快,节省了我很多时间。让我知道你的想法。 :)

Hi friends,

I'm trying to convert the web page url into PDF document in my web application but I still could not achieve that.

Let me know is there any coding technique to solve that problem?

Thanks in advance


A.Arockiasamy

解决方案

Hi
Seems that there is no freeware way to convert URL to PDF. I have found some free opensources, like:
http://www.htmldoc.org
http://www.pdfsharp.net/

I have tried to implement simple convertor and realize that the main problem is to collect all images, css and JS from URL. Did you met the same problem?
The simplest but ugly way is to create .Net WebBrowser, navigate to specified URL and save it :) Also, u can try to use regex to extract images, css, scripts, etc.

Sorry, but I have not finished solution to answer your question...


Hi, first sorry about my english.

I have to do somthing similar a few moths ago. But in Winforms app.

May be you can turn it into web app.

Step 1:

With WebBrowser object. Use the hidden method (DrawToBitmap).
Save the url as a Image

Step 2:
With iTesxtSharp, pdfsharp.net or some similar tool. I make a blank pdf with 1 image tag. Put the image inside.

Step 3
Save the pdf.

Done.

Let me know if you want my App for testing

cheers


Hello. At the moment I am using an online converter like http://kitpdf.com/[^] ... I like it because it works pretty fast and saves me o lot of time. Let me know what you think. :)


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

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