Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item892: Convert GenPDFAddOn to Foswiki - Initial checkin, a lot of c…
…leanup is still required. git-svn-id: http://svn.foswiki.org/trunk/GenPDFAddOn@2222 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
- Loading branch information
GeorgeClark
authored and
GeorgeClark
committed
Jan 29, 2009
1 parent
4f66b34
commit 328115d
Showing
11 changed files
with
168 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,45 @@ | ||
#!/usr/bin/perl -wI. | ||
#!/usr/bin/perl -wT | ||
# | ||
# pdf (converts TWiki page to PDF using HTMLDOC) | ||
# (based on PRintUsingPDF pdf script) | ||
# Foswiki - The Free and Open Source Wiki, http://foswiki.org/ | ||
# | ||
# This script Copyright (c) 2005 Cygnus Communications | ||
# and distributed under the GPL (see below) | ||
# | ||
# TWiki WikiClone (see wiki.pm for $wikiversion and other info) | ||
# | ||
# Based on parts of Ward Cunninghams original Wiki and JosWiki. | ||
# Copyright (C) 1998 Markus Peter - SPiN GmbH (warpi@spin.de) | ||
# Some changes by Dave Harris (drh@bhresearch.co.uk) incorporated | ||
# Copyright (C) 1999 Peter Thoeny, peter@thoeny.com | ||
# Additional mess by Patrick Ohl - Biomax Bioinformatics AG | ||
# January 2003 | ||
# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org and TWiki Contributors | ||
# Copyright (C) 2008-2009 Foswiki Contributors. | ||
# All Rights Reserved. TWiki Contributors and Foswiki Contributors | ||
# are listed in the AUTHORS file in the root of this distribution. | ||
# NOTE: Please extend that file, not this notice. | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# of the License, or (at your option) any later version. For | ||
# more details read LICENSE in the root of this distribution. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details, published at | ||
# http://www.gnu.org/copyleft/gpl.html | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# | ||
# As per the GPL, removal of this notice is prohibited. | ||
|
||
|
||
use strict; | ||
use warnings; | ||
|
||
BEGIN { | ||
# Set default current working directory (needed for mod_perl) | ||
if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ /^(.+)\/[^\/]+$/ ) { | ||
chdir $1; | ||
if ( defined $ENV{GATEWAY_INTERFACE} ) { | ||
$Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; | ||
use CGI::Carp qw(fatalsToBrowser); | ||
$SIG{__DIE__} = \&CGI::Carp::confess; | ||
} | ||
# Set library paths in @INC, at compile time | ||
unshift @INC, '.'; | ||
else { | ||
$Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; | ||
require Carp; | ||
$SIG{__DIE__} = \&Carp::confess; | ||
} | ||
$ENV{FOSWIKI_ACTION} = 'genpdf'; | ||
@INC = ('.', grep { $_ ne '.' } @INC); | ||
require 'setlib.cfg'; | ||
} | ||
|
||
use strict; | ||
use TWiki::Contrib::GenPDF; | ||
|
||
TWiki::Contrib::GenPDF::viewPDF(); | ||
|
||
use Foswiki; | ||
use Foswiki::UI; | ||
$Foswiki::engine->run(); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.