Welcome to Geeklog, Anonymous Monday, November 04 2024 @ 07:19 pm EST

New PDF features in 1.3 CVS Tree

  • Monday, June 07 2004 @ 05:13 pm EDT
  • Contributed by:
  • Views: 10,586
Geeklog Ok, I've updated CVS for, hopefully, the last time. Here is a quick feature rundown of the PDF functionality:
  1. PDF feature completely driven by config.php and is disabled by default since it requires installation of third party software.
  2. Stories now have a pdf icon (similar to print and email icons) that will take the HTML Geeklog generates during the print mode and generates the PDF from it
  3. Optionally, admins can enable an ad-hoc PDF generation feature that would allow users to enter any URL and generate a PDF. This is disabled by default but is always excessible by Root users when the PDF feature is enabled.
  4. Optional support of HTML tidy. Again, this requires yet another third party tool to be installed so this is disabled by default
  5. Font point size is configurable
  6. TTL on generated PDF's is supported (i.e. you can tell Geeklog to delete PDF's more than one day old) NOTE: untested
  7. Supports get & post parameters so integration with other GL plugins is easy.
This needs testing, particularly on windows. The original code I had was very unix-centric and I did my best to make it OS independent.

I haven't confirmed the TTL feature is working yet (next on my to-do list) but the code is there and looks right ;-) .

Also, thinking of forward compatibility, this feature uses the $_REQUEST PHP super global which means that a fairly recent version of PHP is required. I plan to add some code soon to check the PHP version and manually build the $_REQUEST array if it isn't supported but I didn't get around to that yet.

Finally, I did some refactoring of the code I got but a lot more is needed. I had grand visions of making this 100% OO but just didn't have the time.

This code also deserves a look from the security perspective. I'm thinking some sort of speed limit would be a good start. Anything else?

One last time, if you have a chance to test this a quick note on whether it worked or not and what your configuration is would sure be helpful.