Generate a PDF from a site running javascript - javascript

I need a way to generate a pdf-file of a site that runs alot of javascript.. any ideas of how to do it..or is there any package that I can use or something?
Thanks in advance!
EDIT
Should add that I need to generate this server-side using asp.net.

Doing it server-side I would recommend iTextSharp or Docmosis, and the Docmosis cloud services could also let you create it by a http post from Javascript). They both allow your application to create PDF documents with a rich set of features for layout and content. If you say more about what is in the PDFs you need to create then it might be clearer which you would choose. Please note I work for the company that created Docmosis.

Related

Export html tables to Excel using (or not) javascript

I made an statistics application which only permits actually to display various informations, using angular. Now i want to improve it.
On a page i have 3 big html tables containing the statistics and i'd like to let the users download them to use them on excel.
I've seen many ways to do it only in javascript but it's a bit too basic and for example, we can ony create one sheet by excel file. I used for a previous project a php Class to create my excel files which was really better.
Can you advise me about a way to create a more complex excel file, on my angular application, by calling maybe an external script or something?
Thank you very much
There are a plenty of solutions for your problem. All depends of your application, backend capabilities, frameworks used and so on...
A solution could be to create a webservice that uses the Apache POI apis.

Web app : Best technology to develope an interface for a database?

I am new to web development;
I am trying to develop some web application to view data and do insert and delete on a little database including two tables.
I use Node.js for my server.
Currently, the data is saved in two XML files. I do my operations(insert,delete,...) by changing the XML at clientside and sending the XML over to server to be saved.
However, I guess this is the hard and native way and there should be some library or some technology to help, because this is such a common scenario.
I also think that using some database rather than XML may help, though the database management utilities are not much needed really.
Note: I don't browse all the data directly from database. the database includes path of some images which are loaded for the user to be viewed.
Any idea is appreciated. Thanks.
I would suggest sqlite as the way to go! U will find an abundance of information on how to use it if U google it.
Have a look at this : https://codeforgeek.com/2014/07/node-sqlite-tutorial/ it may be the answer to the question U are asking :)

JavaScript file manager with column view

I would like to share documents on my homepage in column-view, so it feels like browsing in Marlin or Finder. How would I start out to do this with JavaScript? Possibly any JS libraries?
I do not have access to any serverside coding, though the server supports PHP5.
You can use UI library. Alternatives with similar UI controls are Sencha, jQWidgets, KendoUI, Wijmo.
For example you can use the jqxMenu by jQWidgets.
The file browsing can be done using the File API but probably you'll need already defined list of files (the use of the File API will be for extra file information).
the guys at sencha make a cracking library which could mimick the Finder style/look, have a look at some of their examples at http://docs.sencha.com/ext-js/4-1/#!/example but would require some serverside coding to return the file data you wish to display...

how to generate a pdf file of an html page through java script programming

In my html5 hybrid iPad application i am generating a report in one of the pages . What i want is to generate a PDF file of that report and save it in ipad.Please help me with this. I am using JavaScript and mobile jQuery for this.
It is highly inefficient to do this client-side(via Javascript). You should consider doing it server-side(using PHP, ASP/.NET or such). PHP uses a service called iTextSharp for this, PHP uses DOMPDF.
If you want to it with Javascript, http://html2canvas.hertzen.com/ is the best tool you will find! It uses the DOM style to generate an image. The only thing you need to do is then wrap it in a PDF. Have a look at their examples! For example:
http://html2canvas.hertzen.com/examples/artificial/index.html
You can use an open-source library for generating PDF documents, I have already use this library and works fine:
http://code.google.com/p/jspdf/
Try it, I hope that is what you want

blogengine without php or asp.net etc

Is there a way to have a blog directly integrated into my HTML/javascript-only website, without having to have something like a SQL-database and a dynamic engine like PHP or MySQL?
Maybe there is some service in the web that offers this (hopefully without ads :) ). Or maybe I can have a blog engine entirely written in javasript?
Entirely written in JavaScript? Surely that defeats the entire point of having a "blog-engine" in the first place? The point being that the data is stored somewhere and dynamically retrieved. To avoid using anything server-side (which seems to be your intent), and only use HTML/JavaScript, you'd have to store all the data for the blog in files that are served up to each visitor, and then retrieve the data from the particular, local, locations using JavaScript.
Sorry if I'm misunderstanding the point here... but this seems to be an utterly useless way of trying to go about things. Blogs are, in general, either written statically (in HTML [even though this is rare]), or are dynamically generated from a database by a server-side scripting language (most common).
Edit: As an additional point, I suppose you could include some third-party blog feed, or service, in your page, via use of JavaScript... but I'm unsure as to which (if any) blogging services would directly support this method of working. Additionally, this is quite an unreliable way of including third-party data in a page...
Here's a thought. It's not really a blog engine - but a wiki.
Entirely javascript/html/css. All lives in a single html file:
http://www.tiddlywiki.com/
not sure how it would work on a real live site, but their site is using it:
* A personal notebook
* A GTD ("Getting Things Done") productivity tool
* A collaboration tool
* For building websites (this site is a TiddlyWiki file!)
* For rapid prototyping
* ...and much more!
You could use github pages. You will get a generated blog with version control.
Other option is to use a Desktop blog tool and then update your site.
You can user iWeb if you have a Mac or CityDesk on Windows or you may try this open source tool
Edit Today I came across this tool: Zeta producer that may help.
http://code.google.com/p/showdown-blog/
Blog engine written in just JS and XML [v0.6] {JavaScript, XML}
So, what you want is to have a blog where you're website provider doesn't provide a way to serve dynamic content?
The only way I see that you can do it in that case is writing html-files (or text-files if you prefer) and adding them to the site. After that you can have some JavaScript to add them to your "blog-page".
You of course need to upload them to the website in the same way as you do for the other files, and then have a way for the JavaScript to know which pages it should fetch.
I am not aware of any JavaScript blog-engines, but you can have a look at the templating functions in for instance Prototype
Of course, that means that you will have to fetch both the template and the content through Ajax and let the client do all the processing (could be slow and possibly insecure), and you still need to have a place to upload the content and update it.
Your best bet is going to be using a generator to create the HTML/CSS/JS to upload to your server, take a look at Webby: http://webby.rubyforge.org/
IF you really need to you can use a public api for a service that lets you post small bits of info and retrieve it using javascript.
for example if you only need small posts you can make a blog in html.javascript that utilizes twitter as the engine. of course you will be limited to 140 chars. I am sure there are other services that will allow a similar idea but with less restrictions.
And of course the best option - Get a blog software or host your blog with a service provider and link to it from you site.
Good luck
One solution would be to use some application that generates the static web pages of your blog, and uploads them to your web server. This way you'd have a blog with static content that could all be managed in javascript alongside your existing site, without needing to install database, daemon software, or additional dynamic web programming languages on your server. The static content generation could happen directly on your server if possible, or you could run the html generation tool locally and upload the output.
MoveableType has a tool like this. You still need somewhere to store the content of your blog, and for this MoveableType uses MySQL by default, so you'd still need to install a database somewhere, but the database could simply be one your local desktop.
MoveableType also has support via plugins or older versions that can retrieve data from a sqlite or other database. The advantage of sqlite is that it doesn't require installing daemons like MySQL does, you can just put a sqlite file on disk somewhere, give MoveableType the path to the file, and run the script to generate your static content.
There are likely other tools like MoveableType, and I have in the past generated blog-like web pages simply by writing small scripts to generate HTML. The main issue is just that you need somewhere for these scripts to fetch data from.
Another option might be to develop your blog using XSLT, ... with XSLT, you'd put the content of your pages in XML files, and then write a template in XSL that converts your XML to HTML.
If you google for 'static blog site generation' you might find other ideas/options, including Jekyll/github mentioned in one of the other responses.

Categories