doc_raptor-perl

Perl Wrapper for the DocRaptor API.

Usage

Code

Make a new DocRaptor client using your API Key:

my $doc_raptor = DocRaptor->new(api_key => 'YOUR_API_KEY_HERE');

Create an options object representing your request parameters:

my $options = DocRaptor::DocOptions->new(
    document_url  => 'http://example.com',
    is_test       => 1,
    document_type => 'pdf',
    document_name => 'perl-example.pdf'
);

Make a request to DocRaptor using the client:

my $response = $doc_raptor->create($options);

The $response object is of type HTTP::Response, and thus responds to methods like #code and #content.

You can see a full example, including writing the response to disk at https://github.com/expectedbehavior/doc_raptor-perl/blob/master/script/docraptor_usage.pl.

Get Help

If you think there is a problem with the Perl library itself, please create a new issue.

If you need help with your document generation, please [contact DocRaptor support](mailto:support@docraptor.com?subject=Perl Help).

Check the documentation.

Development

Setup

<version> below was 5.22.0 for me, but YMMV.

Handy commands: perlbrew list-modules, perlbrew available

Releasing a New Version