PerlDoc

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview


Parent package: Foswiki::Contrib
Child packages:

    =head1 Foswiki::Contrib::GenPDFAddOn

    Foswiki::Contrib::GenPDFAddOn - Displays Foswiki page as PDF using HTMLDOC

    =head1 DESCRIPTION

    See the GenPDFAddOn Foswiki topic for a description.

    =head1 METHODS

    Methods with a leading underscore should be considered local methods and not called from outside the package.

    =head2 _fixTags($text)

    Expands tags in the passed in text to the appropriate value in the preferences hash and returns modified $text.

    =head2 _getRenderedView($webName, $topic)

    Generates rendered HTML of $topic in $webName using Foswiki rendering functions and returns it.

    =head2 _extractPdfSections

    Removes the text not found between PDFSTART and PDFSTOP HTML comments. PDFSTART and PDFSTOP comments must appear in pairs. If PDFSTART is not included in the text, the entire text is return (i.e. as if PDFSTART was at the beginning and PDFSTOP was at the end).

    =head2 _getHeaderFooterData($webName)

    If header/footer topic is present in $webName, gets it, expands local tags, renders the rest, and returns the data. "Local tags" (see _fixTags()) are expanded first to allow values passed in from the query to have precendence.

    =head2 _createTitleFile($webName)

    If title page topic is present in $webName, gets it, expands local tags, renders the rest, and returns the data. "Local tags" (see _fixTags()) are expanded first to allow values passed in from the query to have precendence.

    =head2 _shiftHeaders($html)

    Functionality from original PDF script.

    =head2 _fixHtml($html)

    Cleans up the HTML as needed before htmldoc processing. This currently includes fixing img links as needed, removing page breaks, META stuff, and inserting an h1 header if one isn't present. Returns the modified html.

    =head2 _getPrefs($query)

    Creates a hash with the various preference values. For each preference key, it will set the value first to the one supplied in the URL query. If that is not present, it will use the Foswiki preference value, and if that is not present and a value is needed, it will use a default.

    See the GenPDFAddOn topic for a description of the possible preference values and defaults.

    =head2 viewPDF

    This is the core method to convert the current page into PDF format.

    Topic revision: r1 - 2022/06/24, ProjectContributor
    This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
    Ideas, requests, problems regarding Foswiki? Send feedback