Item892: Convert GenPDFAddOn to Foswiki namespace
Priority: Normal
Current State: Closed
Released In:
Target Release:
Task to convert
GenPDFAddOn from TWiki space to Foswiki.
The genpdf command exists in bin as an alternative to the view command. The new Engine architecture required some changes in this area. Below is the initial approach:
-
genpdf
command is a clone of view
with FOSWIKI_ACTION= set to genpdf
- Added a
switchboard
entry in the LocalSite.cfg to call the Foswiki::Contrib::GenPDF
- viewPDF
command
Initial tests, this seems to work fine, but this needs feedback.
I would like to preserve the bin/genpdf command - many of our users know how to change "view" to "genpdf" in the URL and redesigning this would involve some retraining.
Ready for release, but needs some broader testing
- Changed to not read preferences from plugin topic
- Rewrote recursive search to use %SEARCH instead of native fgrep
- Images read using Func API and saved to Foswiki tmp directory. Avoids potential security exposure by reading files directly from file system
- Regex matches <img tags is more tolerant of parameters
- Added debug logging using Func: API
- PDF COPYRIGHT metadata is now optional. Bug in htmldoc up through 1.8.27 appends copyright to author metadata field.