简体   繁体   English

在asp.net MVC中创建PDF

[英]PDF creation in asp.net MVC

I want to develop an asp.net MVC application that will allow the user to create his/her pdf document. 我想开发一个asp.net MVC应用程序,该应用程序将允许用户创建他/她的pdf文档。 i googled many sites and found info to create a single pdf document. 我在许多网站上进行了搜索,并找到了创建单个pdf文档的信息。 In my application whenever user clicks on create PDF link he should be allowed to create a new PDF document. 在我的应用程序中,每当用户单击“创建PDF”链接时,都应允许他创建一个新的PDF文档。 How can I do so? 我该怎么办?

Okay what you basically trying to achieve here is convert html to pdf. 好的,您基本上想在此处实现的是将html转换为pdf。

you have a <div id="myPDFCanvas"></div> and inside that canvas u have text, images blah blah blah all the stuff you need. 您有一个<div id="myPDFCanvas"></div>并且在该画布中您拥有文本,图像等等所有您需要的东西。 Then you need to convert this div canvas into pdf. 然后,您需要将此div画布转换为pdf。

WkHtmlToXSharp will solve your problem WkHtmlToXSharp将解决您的问题

for a demo check this out 为演示检查了这一点

I dont what do you want, if you want to create PDF you can use this library 我不想要什么,如果要创建PDF,可以使用此库

Scryber PDF Generator is the open source library for quickly creating dynamic PDF documents with style.This project holds the source for the guides and examples Scryber PDF Generator是一个开放源代码库,用于快速创建具有样式的动态PDF文档。该项目提供了指南和示例的源代码

For PDF :- 对于PDF:-

I think you should use itextSharp . 我认为您应该使用itextSharp You can go through this link 你可以通过这个链接
http://www.codeproject.com/Articles/81118/ITextSharp-Helper-Class http://www.codeproject.com/Articles/81118/ITextSharp-Helper-Class
You can download it (.dll) from here 您可以从这里下载(.dll)
http://sourceforge.net/projects/itextsharp/ http://sourceforge.net/projects/itextsharp/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM