开发者

Alternative to pdf to use with asp.net

the problem come from converting other files like docx xlsx to pdf it so 开发者_JS百科defuclt by manged code or costly by 3rd party solution, so what is the altenative to pdf that i can easly convert docx to and then i can view it in web browser by asp.net c# code


If you have your own server you can use Word automation to accomplish that. Check out this example from Microsoft: Saving Word 2007 Documents to PDF and XPS Formats. This solution requires Word 2007 and 2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS installed on server machine.

Also, check out this solution: Scripting PDF Creation

They are saying that you can install virtual printer that will print postscript to a file, and then using a GhostScript to convert postscript to PDF. All this can be automated, but also requires bunch of software installed and configured on server machine.

For any other solution like "Direct DOCX to PDF converter" without Word 2007 installation you will have to purchase some other 3rd component/library. If you will choose that solution, my suggestion is: Aspose.Words for .NET.

If you really want to avoid all this i mentioned earlier then take your time, download Open XML SKD, download iTextSharp library and start writing a code that will transform Open XML format that Word 2007 is based on to PDF. I would suggest this only if you dont have anything else to do and you have "a lot" of free time.


You can use XPS format, that you can get from office 2007 or 2010. But only Vista and 7 has built-in support. For Windows XP your customer must install .NET Framework 3 because XPS Viewer is a part of it and using framework libraries. There are others XPS Viewers, you can find even based on Silverlight because xps format is similar with xaml, but they are all commercial.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜