home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / SvgCgiSerialize.pm < prev    next >
Encoding:
Perl POD Document  |  2003-03-01  |  1.9 KB  |  98 lines

  1. package Apache::AxKit::Plugin::SvgCgiSerialize;
  2.  
  3. use strict;
  4. use Apache::Constants qw(OK);
  5.  
  6. sub handler
  7. {
  8.     my $r  = shift;
  9.     my %in = $r->args();
  10.     
  11.     if( $in{mime_type} )
  12.     {
  13.         $r->pnotes( 'axkit_mime_type', $in{mime_type} );
  14.     }
  15.     
  16.     return OK;
  17. }
  18.  
  19. 1;
  20.  
  21. __END__
  22.  
  23. =pod
  24.  
  25. =head1 NAME 
  26.  
  27. Apache::AxKit::Plugin::SvgCgiSerialize - CGI-Parameter Plugin
  28.  
  29. =head1 SYNOPSIS
  30.  
  31.   AddHandler axkit .svg
  32.  
  33.   ## Fairly important to cache the output because
  34.   ## transformation is highly CPU-Time and Memory consuming
  35.   AxCacheDir /tmp/axkit_cache
  36.  
  37.   ## When using SvgCgiSerialize this is vital 
  38.   ## because the cgi-parameters are not used
  39.   ## by default to build the cache
  40.   AxAddPlugin Apache::AxKit::Plugin::QueryStringCache
  41.  
  42.   <Files ~ *.svg>
  43.     AxAddStyleMap application/svg2anyformat Apache::AxKit::Language::Svg2AnyFormat
  44.     AxAddProcessor application/svg2anyformat NULL
  45.  
  46.     ## optional with this variable you can
  47.     ## overwrite the default output format 
  48.     ## PNG
  49.     ## Supported Values:
  50.     ##    image/jpeg
  51.     ##    image/png
  52.     ##    image/gif
  53.     ##    application/pdf
  54.     PerlSetVar SVGOutputMimeType image/jpeg
  55.   
  56.     ## optional module to pass the format using cgi-parameters
  57.     ## to the module. For supported values see above
  58.     ## and the man-page of the plugin
  59.     AxAddPlugin Apache::AxKit::Plugin::SvgCgiSerialize   
  60.   </Files>
  61.  
  62. =head1 DESCRIPTION
  63.  
  64. This plugin reads out the CGI-Parameter mime_type and passes it into the
  65. Module.
  66.  
  67. =over
  68.  
  69. =item 
  70.  
  71. PNG: http://localhost/my.svg?mime_type=image/png
  72.  
  73. =item 
  74.  
  75. JPG: http://localhost/my.svg?mime_type=image/jpeg
  76.  
  77. =item 
  78.  
  79. GIF: http://localhost/my.svg?mime_type=image/gif
  80.  
  81. =item 
  82.  
  83. PDF: http://localhost/my.svg?mime_type=application/pdf
  84.  
  85. =back
  86.  
  87. =head1 VERSION
  88.  
  89. 0.01
  90.  
  91. =head1 SEE ALSO
  92.  
  93. L<Apache::AxKit::Language::Svg2AnyFormat>
  94.  
  95. =head1 AUTHOR
  96.  
  97. Tom Schindl <tom.schindl@bestsolution.at>
  98.