Solved

JavaScript library to create PDF

Posted on 2011-03-14
6
1,059 Views
Last Modified: 2012-06-27
Hi experts,

I have to write javascript code that reads some text from a web page, and writes it to a PDF file. This code is used in an ASP.NET custom web server control which has been developed with VS2010.

I've tried to find some kind of javascript library that could be used in VS2010 and used to create PDF. I found the following:

http://snapshotmedia.co.uk/blog/jspdf
http://www.collinssoftware.com/Pdf/Download.htm
http://www.adobe.com/devnet/acrobat/downloads.html

I'm not sure that "Adobe Acrobat SDK" can be used with VS2010, see http://forums.adobe.com/thread/721878?tstart=-3

Is there anybody of you who knows, and eventually used, such a javascript library?

Thank you in advance.
0
Comment
Question by:kathysmith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 25

Expert Comment

by:Rouchie
ID: 35142185
When you say Javascript do you mean JSscript?  Javascript is client side but you are needing to do something server side.  Anyhow, there's iTextSharp but I haven't used it... http://www.4guysfromrolla.com/articles/030911-1.aspx
0
 

Author Comment

by:kathysmith
ID: 35142994
@Rouchie: Thanx for the answer.
I've ment JavaScript as defined here: http://no.wikipedia.org/wiki/JavaScript
I know about iTextSharp and I've read the article from Scott Mitchel some days ago. Very good article, and the code is right there. But iTextSharp can be used with .NET platform, while I need something that can be used from JavaScript code and can be referred from Visual Studio 2010 (where I have my js files).

0
 

Author Comment

by:kathysmith
ID: 35143021
"Adobe Acrobat SDK 9" can't be used as a plug in with Visual Studio 2010, only with VS2005 (which is also requested when installing Adobe Acrobat SDK 9).
So now I'm trying to find something like jsPDF (see: http://snapshotmedia.co.uk/blog/jspdf). jsPDF seems very easy to use, but it doesn't work with IE. It should work in all major browsers.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 25

Accepted Solution

by:
Rouchie earned 500 total points
ID: 35145058
No it won't work I'm afraid.  Javascript is a client-side language that operates in a 'safe' environment to stop malicious coders damaging users' computers.  By allowing JS to create/alter files, users would be put in direct risk of attack.
Therefore, the products you are looking at require a browser extension to function (that is, the hard work is done by the extension which will run with escalated privileges).  The Javascript is merely triggering the process.
Therefore, it will have to be run server side in order to work across all browsers, thus taking away the risk from users.
0
 

Author Comment

by:kathysmith
ID: 35145858
@Rouchie: your explanation is good, and helps med to take a decision. I intend to adapt our ASP.NET custom web server control so that we can use iTextSharper to generate PDFs. Thanx.
0
 

Author Closing Comment

by:kathysmith
ID: 35145861
500 points goes to @Rouchie, the only expert who tried to help me in taking a decision.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question