View Full Version : Save Text Button
Lacuna
June 10th, 2005, 06:16 AM
I have a news article site which loads its information from an sql database. I need the page to have a dl button so that the article with proper formatting and images can be saved as a document on the users computer.
Has anyone ever done smth like this? I'd get the user to just dl a pdf or smth but it will all have to be automated as the administrator had edit rights to the articles and can change them constantly....
~ Lacuna :love:
transmogrify
June 10th, 2005, 07:06 AM
Depending what server you're using, you can still generate PDF documents on the fly. If you're using a windows server with ASP, you can generate a PDF document using something like - http://www.asppdf.com so the pdf document will contain any edits and changes to the page up until the point the user downloads. You could do the same thing if you're using PHP with http://www.fpdf.org/
Basically just before your user downloads the document, the PDF document is generated from the sql database and then this is offered to the user. Job done.
Welly
Lacuna
June 10th, 2005, 07:59 AM
thanks for that! that looks good but im looking for more of an open source method. Any recommendations there?
~ Lacuna :love:
transmogrify
June 10th, 2005, 08:59 AM
probably PHP then :) thats pretty open source and I'm 99% sure it can generate PDF files on the fly. The second link to fpdf.org should be the open source method you're looking for.
Lacuna
June 10th, 2005, 09:12 AM
yea, once again, thanks for that :S but my server supports asp not php
~ Lacuna :love:
teiz77
June 10th, 2005, 09:47 AM
The problem with generating such document are the image. They somehow must be converted into the document. You can use pdf for this, but your server must have pdflib installed. It must be possible to use the Microsoft Word com-object to do the trick. But for this microsoft word must be installed on the server.
The problem ASP is the lack of an open-source minded community, free scripts and turorials on this subject are scarse. If your server supports asp.net I'd use that instead of asp. It's much better for such jobs.
here are some examples: http://www.codeproject.com/aspnet/wordapplication.asp
http://weblogs.asp.net/cnagel/archive/2004/09/25/234188.aspx
this one looks most promising, it looks it supports images:
http://www.codeproject.com/aspnet/aspnethtml2mht.asp
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.