Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

JavaScript library to create PDF

Posted on 2011-03-14
6
Medium Priority
?
1,066 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

721 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