|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
PHP allows you to put material directly into a new PDF file. It can also put data into a MySQL database for you.
BUT... Why would you want to put the data into a PDF? If all the necessary stuff is input via a form and stored on the database, why not display the data directly from the database in a PHP page. That way you can change the format down the road by editing the PHP/CSS instead of having to rebuild every PDF file. |
|
||||
|
Thanks Dave,
I thought PHP/MySQL would be the way to go but I don't know how to do it. The PDF output idea was because we want visitors to be able to print the files easily. Reading 10-30,000 words for each article on-screen would be a tough task.
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC) |
|
||||
|
PHP is certainly the best method to use but the programming required to make this happen is not simple. I would suggest combining both the database and PDF to handle tracking and searching more easily. There are many freelancers out there and on these forums that are capable of handling such a project.
|
|
||||
|
With the right CSS setup, printing nicely to read is straightforward. I would definately avoid PDF unless you have a really good reason for using it.
Setting up the PHP for this is pretty simple. I doubt it's much more than an hours work. E-mail me: david@activeminds.ca with all the details if you want some help and I'll send you a quote. |
|
|||
|
>I would like to enable authors to submit articles of 10-30,000 words via a form
Do you already have a web site up and are looking to add this functionality? There are many well known open source programs such as Joomla that work as articles sites, allow contents to be emailed, printed or saved as pdf. Joomla is also free but has a huge userbase with thousands of plugins. However, if you already use a custom solution, Joomla wouldn't work. Just a thought, Chris BTW: PDF articles are also indexed via many search engines like Google, Yahoo, Fast, Alltheweb ECT. PDF's files can also bring additional traffic. Just make sure the author has credit in the file with a link saying it came from your site. |
|
|||
|
Hello,
Also, if you check out pdflib.org, you can do this using php and mysql easily. Here are the basics. Code:
<?php // create handle for new PDF document $pdf = pdf_new(); // open a file pdf_open_file($pdf, "philosophy.pdf"); // start a new page (A4) pdf_begin_page($pdf, 595, 842); // get and use a font object $arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10); // print text pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,", 50, 750); pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50, 730); // end page pdf_end_page($pdf); // close and save file pdf_close($pdf); ?> Hope this helps, Chris |
|
||||
|
Thanks Chris,
The site is still at the planning stage and I am currently developing the specification. I am familiar with Joomla and am building another site with it at the moment. I'll search through the extensions to see if there's something that will do the job. Cheers Edit: Thanks for the code
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC) |
|
|||
|
Sorry for posting again. I said pdf.org but that was wrong. The correct URL is;
http://www.pdflib.com/pdflib-gmbh/ Chris |
|
||||
|
Excellent link! Looks like just the thing, thanks.
Why are PDFs unpopular with some developers? Dave, if you're still following this, why would you 'avoid PDF unless you have a really good reason for using it'?
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC) |
|
|||
|
Hello Tim,
Read your last post. I am no longer really into the developer side of this unless I need it for a specific purpose. However, in regards to PDF, I am simply busy all of the time. So I come across a lot of good articles about things but I don't have the time to sit at the site and read an entire article. So I can save a pdf file to read later in the evening when things slow down. One site I visit a lot, http://www.bizreport.com/ offers whitepapers usually in standard pdf format. PDF files I'm guessing are a matter of personal opinion for many but for myself. I find them useful. Just my thoughts, Chris |
|
||||
|
Quote:
PDFs usually take longer to download than HTML pages. Their format is fixed and inflexible. The only real use for a PDF is to print it and read it later (something I never do). Even if this is your preference, it can be achieved with CSS which can also give you a dynamic screen layout that changes to suit the browser size you like to use. |
|
|||
|
Hello Tim,
I'm new to this board, but thought Id throw in a couple pennies. I work for a custom dev shop, and we have been creating dynamic/automated pdf documents in one form or another since Acrobat v3. It is an old technology, but it still works. There's nothing wrong with it. There are other methods to render text, CSS has been mentioned, this will work well for the browser. Currently, we use XSLFO, which gives you nice control over page layout when rendering dynamic content. I would suggest just building an administrative area that would allow a user to choose PDF or HTML versions. Your project is pretty straightforward, you just need to find a good web developer. Things to think about... the pdf storage may become an issue, size wise, and portability issues. Also, think about access levels in your admin area. Someone may need to edit the docs, while others can only pull down and view. The one "gotcha" in the project may be in HOW an author posts up an article/story. They probably aren't going to write the whole thing on your website form field. They will be using all sorts of crazy text editors each with differing character subsets. Try allowing users to copy paste 10 pages from MSWord... Fun fun fun! Getting clean data in the DB is important. Ramble is over.... Back to your question. What's the best way to do it? Hire a good web programmer with a SQL/PHP/PDF/XML/XSL track record. Jeremy H. |
|
||||
|
Very useful stuff Jermooski,
PDF was my chosen format because we believe most visitors will be printing our 'articles/stories' to read later. CSS is the best way to format both screen and print pages but, as far as I know, PDFs are unique and universal as 'packages'. They are bulky and compared to XHTML pages, slow to load, but they are searchable and a handy format to pass around. They may well be superseded by a fresh technology but, as I understand it, Adobe are still developing the technology. We realise that we need to hire a programmer and are already advertising. Your suggested skill set will be very useful. Thank you.
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC) |
|
||||
|
Tim,
I hope you don't mind me "hijacking" this thread but I have almost the same problem so it seems sensible not to start a new thread. I am producing web sites for insurance and would like to generate policies, cover notes, etc on the fly so people can download them and print them. PDF would seem ideal because they can't change them. Each one would need to have the users details inserted into an otherwise standard PDF file. The only other way I can think of is to generate a printer friendly page that they can print but not save. However this means problems with different fonts possibly making the layout into a mess. So far I have not found any reliable way to do this but would really appreciate any advice.
__________________
http://carsalesasia.com http://deep-field-relaxation.com http://motorcycleasia.net etc |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |