Solved

JavaScript library to create PDF

Posted on 2011-03-14
6
1,046 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

13 Experts available now in Live!

Get 1:1 Help Now