Solved

JavaScript library to create PDF

Posted on 2011-03-14
6
1,054 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
  • 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

816 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now