CairoX::Pager - pager for pdf , image surface backend.


CairoX-Pager documentation  | view source Contained in the CairoX-Pager distribution.

Index


NAME

Top

CairoX::Pager - pager for pdf , image surface backend.

VERSION

Top

Version 0.02

DESCRIPTION

Top

Cairo::PdfSurface supports pages , but image surface doesn't. this module page both pdf or image for you. for image type surface , we export page to a directory and give them a formatted name on finish_page method. for pdf surface , we create pdf document at start , and call cairo context show_page function to start a new page.

* svg , ps type surface are not supported yet.

SYNOPSIS

Top

export pages pdf:

    my $pager = CairoX::Pager->new(
        pdf => { filename => $filepath },
        page_spec => { width =>  , height => },
    );

    for ( ... ) {
        $pager->new_page( );

        my $surface = $pager->surface();   # get cairo surface 
        my $cr = $pager->context();    # get cairo context




        # draw something




        $pager->finish_page( );
    }

    $pager->finish();

export pages as svg :

    my $pager = CairoX::Pager->new( 
        svg => { 
            directory => $path,
            filename_format => "%04d.png",
        },
        page_spec => { width =>  , height => },
    );

export pages as png :

    my $pager = CairoX::Pager->new( 
        png => { 
            directory => $path,
            filename_format => "%04d.png",
            dpi => 600,
        },
        page_spec => { width =>  , height => },
    );

FUNCTIONS

Top

new

current_filename

new_page

finish_page

finish

AUTHOR

Top

c9s, <cornelius.howl at gmail.com>

BUGS

Top

Please report any bugs or feature requests to bug-cairox-pager at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CairoX-Pager. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

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

    perldoc CairoX::Pager

You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=CairoX-Pager

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/CairoX-Pager

* CPAN Ratings

http://cpanratings.perl.org/d/CairoX-Pager

* Search CPAN

http://search.cpan.org/dist/CairoX-Pager/

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


CairoX-Pager documentation  | view source Contained in the CairoX-Pager distribution.