The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::Mxpress::PDF - A utility application for generating PDFs

VERSION

Version 0.21

SYNOPSIS

        plackup `which app-mxpress-pdf.psgi'

routes

'/'

Returns the html - single page application.

/api/login

Authenticate to the api, the default username and password is username and password. This can be updated inside of the conf.yml file.

        header('Token', $csrf_token);
        post('/api/login', {
                username => Types::Standard::Optional->of(Str),
                password => Types::Standard::Optional->of(Str)
        });

/api/logout

Logout of the session.

        header('Token', $csrf_token);
        post('/api/logout')

/api/session

Check whether the current session is valid.

        get('/api/session')

/api/generate/pod

Generate a pdf from pod.

        header('Token', $csrf_token);
        post('/api/generate/pod', {
                styles => Str,
                type => Enum[qw/module distribution raw/],
                name => StrMatch[ qr{([a-zA-Z0-9\-\:]+)} ],
                module => Types::Standard::Optional->of(StrMatch[ qr{([a-zA-Z0-9\-\:]*)} ]),
                distribution => Types::Standard::Optional->of(StrMatch[ qr{([a-zA-Z0-9\-\:]*)} ],),
                raw => Types::Standard::Optional->of(Str)
        });

/api/generate/pdf

Generate a pdf from a template

        header('Token', $csrf_token);
        post('/api/generate/pdf', {
                params => HashRef,
                name => StrMatch[ qr{([a-zA-Z0-9\-\:]+)} ],
                styles => Types::Standard::Optional->of(Str),
                size => Types::Standard::Optional->of(Enum[qw/A1 A2 A3 A4 A5 A6/]),
                template => Types::Standard::Optional->of(Str)
        });

/api/templates

        get('/api/templates')

/api/create/template

        header('Token', $csrf_token);
        post('/api/create/template', {
                name => StrMatch[ qr{([a-zA-Z0-9\-\:]+)} ],
                styles => Str,
                size => Enum[qw/A1 A2 A3 A4 A5 A6/],
                template => Str
        });

/api/delete/template

        header('Token', $csrf_token);
        post('/api/delete/template', {
                name => StrMatch[ qr{([a-zA-Z0-9\-\:]+)} ],
                size => Enum[qw/A1 A2 A3 A4 A5 A6/],
        })

AUTHOR

lnation, <email at lnation.org>

BUGS

Please report any bugs or feature requests to bug-metacpan-client-pod-pdf at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Mxpress-PDF. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

        perldoc App::Mxpress::PDF
  

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2020 by lnation.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)