如何在不使用c#中的任何第三方工具/ dll的情况下将html页面转换为pdf文件 [英] How to convert html page to pdf file without using any 3rd party tools/dlls in c#

查看:90
本文介绍了如何在不使用c#中的任何第三方工具/ dll的情况下将html页面转换为pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不使用第三方工具/ dll如何在c#中编码html到pdf的转换#



我尝试了什么:



我已经搜索但他们提供了一些工具dll但我想知道如何在c#

Without using 3rd party tools/dlls how to code html to pdf conversion in c#

What I have tried:

I already searched but they gave some tools dlls but i want to know how to code it in c#

推荐答案

中编码请查看PDF的规范文档:

Adob​​e PDF 1.7规范(链接到adobe.com)



超过1300页,它代表了一种极其复杂的文档格式,如果你有一个项目,在任何合理的时间范围内交付,我建议(和其他人一样)使用图书馆。



我承认我自己使用的唯一库是iTextSharp虽然有许可证要求 - 版本4.1.6的MPL和LPGL我觉得v5 +是不同的许可证。



如果你有一个项目,一个客户,一个预算或一个时间表,那么使用一个库,你会比你的学习更快*交付你的产品PDF从头开始。



如果你真的想为自己的进展学习它,我认为纯粹的复杂性将超越一个善良的CodeProject成员只是提供代码 - >你将不得不陷入文件。



祝你好运!
Take a look at the Specification document for PDF:
Adobe PDF 1.7 specification (link to adobe.com)

At over 1300 pages it represents an incredibly complex document format and if you have a project to deliver in any reasonable timescale I'd suggest (as others have) to use a library.

I confess the only library I've used myself is iTextSharp although there are license requirements - MPL and LPGL for version 4.1.6 and I think v5+ is under a different license.

If you have a project, a customer, a budget or a timescale then use a library, you'll get your product delivered *much* faster than learning PDF from scratch.

If you genuinely want to learn it for your own progression, I think the sheer complexity is going to put it beyond a kindly CodeProject member just providing code -> you'll have to get stuck into the documentation.

Best of luck!


这篇关于如何在不使用c#中的任何第三方工具/ dll的情况下将html页面转换为pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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